Hi, I think this other post could help: http://stackoverflow.com/questions/7328104/optim-with-inequality-constraint
Regards, Carlos Ortega www.qualityexcellence.es On Thu, Sep 8, 2011 at 3:54 PM, Liu Evans, Gareth < gareth.liu-ev...@liverpool.ac.uk> wrote: > Dear All, > > I would like to minimise a nonlinear function subject to linear inequality > constraints as part of an R program. I have been using the constrOptim > function. I have tried all of the methods that come with Optim, but nothing > finds the correct solution. If I use the correct solution as the vector of > starting values, though, my program does output the correct solution and > optimum - the problem seems to be my choice of optimisation method. > > Optim includes a global optimisation method, SANN, but it doesn't make > sense to use this in constrOptim (see > http://tolstoy.newcastle.edu.au/R/e4/help/08/01/1328.html, also I tried it > unsuccesfully). Is there another global optimisation method that I can use? > > Regards, > Gareth > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.