Reputation: 6081
I'm looking for recommendations for C++ libraries for non-linear programming (not just for integers!).
Preference is for actively maintained F/OSS solutions, but actively maintained commercial solutions offering free evaluation versions are acceptable.
Thanks in advance!
Edit: As requested, here are more details:
The application I'm working on is simple, and it's about minimizing polynomials of degree 4 and higher (up to 11) with a small set (~20) of constraints expressed as inequalities (again, as polynomials, degree <= 4). I might also, occasionally, have to throw in some trigonometric function, though. In any case, it's always continuous, differentiable functions I'm dealing with. The number of variable ranges from 1 to 12, for now, and won't go much beyond that.
Finally, I need a solution that works on Windows, but cross-platform ones would be preferable.
Upvotes: 9
Views: 7679
Reputation: 21947
NLopt has solid C code for a good dozen algorithms, including COBYLA,
Constrained Optimization BY Linear Approximations for derivative-free optimization with nonlinear inequality and equality constraints, by M. J. D. Powell.
Added: here
are runs of several of the non-derivative optimizers in NLopt
.
For Rosenbrock and Powell test functions in 5d and 10d, they're all very sensitive to random startpoints; ymmv.
Upvotes: 2
Reputation: 58461
The most robust such library I know of is IPOPT.
It is astonishingly robust, it gave me results for chemical engineering problems that I could not solve even with commercial solvers. Look at the success stories for further examples of application.
Upvotes: 4
Reputation: 5015
I'm not sure, but maybe ROOT from CERN will be suitable for you. This is really huge library (ROOT::Math::Polynomial class, for example) from CERN itself.
I must say, it's not a 'one-minute-to-learn' library indeed, but has both: console to work with all math stuff in real time (looks similar to MathCAD cmd line) and libs and dlls you can link with your code statically. And it's a cross platform library. More to say, the most powerful feature of the ROOT is that you can build almost all kind of charts and plots.
Upvotes: 6