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.
- oj! Algorithms (https://github.com/optimatika/ojAlgo) -- might be able to handle QP; I'm looking at it now.
- Stanford NLP (https://github.com/stanfordnlp/CoreNLP) -- has some functions for general unconstrained optimization, but I don't see anything for QP specifically or constrained problems.
- JOptimizer (http://www.joptimizer.com) -- appears to be able to handle QP with equality and inequality constraints.
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