Question

Are there any good libraries in c++ for sequential nonlinear optimization with constraints?

I am looking for inequality constraints and/or upper and lower bounds.

There is a stackoverflow question already for this but not all of them have constraints.

I know of NLopt, but it doesn't work well for my specific problem. Are there any others?


I finally found the solution that i was looking for if any one else is interested lpOpt

Was it helpful?

Solution

One SQP algorithm that you could try is DONLP2. It was originally written in Fortran 77 but there is an ANSI C version as well. It uses dense algebra, so it is primarily suitable for small to medium-sized problems. It is free for academic use. You need to request the code directly from the author, follow the instructions in the link.

UPDATE Sequential Quadratic Programming is only one approach to solving non-linear objective functions with constraints, there is also for example interior point methods. One very good large-scale open-source C++ alternative that applies the interior point approach is Ipopt (already mentioned in another answer). There is also for example the commercial package KNITRO. If you cannot or do not want to provide objective function and constraints gradients, you could also have a look at COBYLA2, of which a C version can be downloaded here.

For further inspiration, you could also consult the Decision Tree For Optimization Software, which lists different optimization codes suitable for a wide range of different problems.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top