Re: [R] constrained optimization -which package?

2010-09-29 Thread Hans W. Borchers
Leonardo Monasterio leonardo.monasterio at gmail.com writes: Dear R users, In the function bellow I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. I want to maximize: v-t(x)%*%distance%*%x Subject to: sum(x)=1 I do not see why you

[R] constrained optimization -which package?

2010-09-28 Thread Leonardo Monasterio
Dear R users, I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. So, I want to maximize: v-t(x)%*%distance%*%x Subject to: sum(x)=1 Where: x is a vector n X 1 distance is a matrix n*n and it is given. (In practive, the number of n can go up to

Re: [R] constrained optimization -which package?

2010-09-28 Thread Peng, C
?constrOptim -- View this message in context: http://r.789695.n4.nabble.com/constrained-optimization-which-package-tp2717677p2717719.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] constrained optimization -which package?

2010-09-28 Thread Leonardo Monasterio
Dear R users, In the function bellow I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. I want to maximize: v-t(x)%*%distance%*%x Subject to: sum(x)=1 Where: x is a vector n X 1 distance is a matrix n*n and it is given. (In practice, the number of

Re: [R] constrained optimization -which package?

2010-09-28 Thread Ravi Varadhan
-project.org Subject: Re: [R] constrained optimization -which package? ?constrOptim -- View this message in context: http://r.789695.n4.nabble.com/constrained-optimization-which-package-tp27176 77p2717719.html Sent from the R help mailing list archive at Nabble.com

Re: [R] constrained optimization -which package?

2010-09-28 Thread Peng, C
constrOptim() can do linear and quadratic programming problems! See the following example from the help document. ## Solves linear and quadratic programming problems ## but needs a feasible starting value # # from example(solve.QP) in 'quadprog' # no derivative

Re: [R] constrained optimization -which package?

2010-09-28 Thread Ravi Varadhan
) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Peng, C cpeng@gmail.com Date: Tuesday, September 28, 2010 7:58 pm Subject: Re: [R] constrained optimization -which package? To: r-help@r-project.org constrOptim() can do linear and quadratic programming problems! See

Re: [R] constrained optimization -which package?

2010-09-28 Thread Paul Smith
On Tue, Sep 28, 2010 at 9:47 PM, Leonardo Monasterio leonardo.monaste...@gmail.com wrote: In the function bellow I  want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1.  I want to maximize: v-t(x)%*%distance%*%x Subject to: sum(x)=1 Where: x is a