I need to solve a quadratic programming problem. The problem is small, 4 variables and 8 constraints, and has inequality constraints but not equality constraints. I am looking for a library in Java or C/C++ (to be called via JNI). At this point I am only considering open source software but if I can't find such a thing, then I would be interested to hear about commercial alternatives.

I am willing to write some code myself if it turns out that's feasible for the problem in question. Is it possible to reduce QP to another kind of problem which might be solved more easily? Is there a naive algorithm which is straightforward to implement? I am thinking that efficiency isn't so important given that the problem is small.

A web search turns up a number of possibilities but I am not familiar enough with the options to sort it out. Any advice on this topic is much appreciated.

EDIT: Here are my notes about some items I looked at. These should be understood as relating only to the version of the software at the present time (September 2018). This list is non-exhaustive.

EDIT 2: I ended up using qpOASES from COIN-OR. qpOASES is a C++ library and I found it straightforward to work with, and it seemed to work well for the purpose I was using it (as part of a larger model predictive control algorithm implemented in Matlab). See: https://projects.coin-or.org/qpOASES

  • Welcome to Software Recommendations SE, Robert! Commented Sep 11, 2018 at 22:42
  • Have you looked at open source constraint solver such as OptaPlanner and the COIN-OR stuff? Commented Jul 16, 2019 at 7:37
  • Hi Geoffrey, yes, I did end up using qpOASES from COIN-OR. I will make an edit to my question to mention that. Commented Jul 16, 2019 at 16:38

1 Answer 1


NM Dev has a number of quadratic programming solvers: Dual ActiveSet Minimizer and Primal Active Set

Alternatively, you can reformulate your problem as a Second Order Conic Programming (SOCP) problem and solve it using an SOCP interior point solver, or an implementation of SDPT3v4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.