[R] linear constrained optimization in R

sammyny sjain at caa.columbia.edu
Fri Mar 25 18:08:41 CET 2011


I am trying to use
http://rss.acs.unt.edu/Rdoc/library/stats/html/constrOptim.html in R to do
optimization in R with some given linear constraints but not able to figure
out how to set up the problem.

For example, I need to maximize $f(x,y) = log(x) + \frac{x^2}{y^2}$ subject
to constraints $g_1(x,y) = x+y < 1$, $g_2(x,y) = x > 0$ and $g_3(x,y) = y >
0$. How do I do this in R? This is just a hypothetical example. Do not worry
about its structure, instead I am interested to know how to set this up in
R.

thanks!

--
View this message in context: http://r.789695.n4.nabble.com/linear-constrained-optimization-in-R-tp3405903p3405903.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list