Skip to content

how to obtain optimization with constraints

2 messages · Lin Pan, Ben Bolker

#
Hello All,

I have one function f(x, y, z) and wanted to optimize the function by
changing x, y and z values. But z has to be <= sqrt(x*y). Does anybody give
some advise on how to do it in R? thanks a lot.



Lin
#
Lin Pan <linpan1975 <at> yahoo.com> writes:
Put all the parameters on the log scale 
(so that log(z)- 0.5*log x -0.5*log y) <= 0),
then use constrOptim to set linear inequality constraints.
(This is assuming all the parameters are positive ...)

  Ben Bolker