Skip to content

Max/Min w/ Non-linear constraints

1 message · Michael Roberts

#
C, are
easy to
to?

It looks like R's general optimization function, optim(), 
only allows for box constraints.  I, too, sometimes need to 
solve problems with linear and sometimes non-linear
functions as constraints.

When I was in grad. school (last year), our system administrator 
wrote a matlab wrapper for "NPSOLVE," which seemed  
superior in terms of speed and accuracy as compared to the 
optimizers packaged with matlab.  It also allowed for linear
and non-linear constraints.

I always figured I would try to write an R wrapper the next time I
felt
I needed such a thing, but that hasn't happened yet.

Has anyone out there written a wrapper for NPSOLVE?

Michael Roberts