search for: projectlinear

Displaying 2 results from an estimated 2 matches for "projectlinear".

2018 May 05
1
adding overall constraint in optim()
Hi, You can use the projectLinear argument in BB::spg to optimize with linear equality/inequality constraints. Here is how you implement the constraint that all parameters sum to 1. require(BB) spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(p0)), b=1, meq=1)) Hope this is he...
2011 Sep 08
3
global optimisation with inequality constraints
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