Le 18/05/12 00:14, Nathan Stephens a écrit :
I have a very simple maximization problem where I'm solving for the vector
x:

objective function:
w'x = value to maximize

box constraints (for all elements of w):
low<  x<  high

equality constraint:
sum(x) = 1

But I get inconsistent results depending on what starting values I. I've
tried various packages but none seem to bee the very solver in Excel. Any
recommendations on what packages or functions I should try?


I had similar problem to solve (x were frequencies) and optimization stops before to reach the global maximum. As hwborch...@googlemail.com indicates, I fitted {x}-1 values because the last one is known by the equality constraint.
For the vector constraints, I used w <- -Inf when x goes out of the limits.

Finally I used Bayesian mcmc to get the convergence and it works much better.

I don't know why in this case the optim does not converge.

Hope it hepls,

Marc

--
__________________________________________________________
Marc Girondot, Pr

Laboratoire Ecologie, Systématique et Evolution
Equipe de Conservation des Populations et des Communautés
CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079
Bâtiment 362
91405 Orsay Cedex, France

Tel:  33 1 (0)1.69.15.72.30   Fax: 33 1 (0)1.69.15.73.53
e-mail: marc.giron...@u-psud.fr
Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
Skype: girondot

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to