7

I'm looking for a good easy to use Java based Quadratic Programming (QP) solver.

Googling around I came across ojAlgo (http://ojalgo.org).

However, I was wondering if there are any other/better alternatives.

josliber
  • 43,891
  • 12
  • 98
  • 133
dmcer
  • 8,116
  • 1
  • 35
  • 41
  • Which QP solver did you end up using? – dsg Mar 29 '11 at 01:39
  • @dsg - I couldn't find a QP solver inside Apache Commons Math and I wasn't sure how much community support was behind ojAlgo. So, I just ended up writing my own, but still build upon Apache Commons Math. – dmcer Mar 29 '11 at 03:41
  • @dsg - Not yet. It's part of JavaNLP (http://nlp.stanford.edu/software/index.shtml). But, it hasn't been released to the public. – dmcer Mar 29 '11 at 04:51

2 Answers2

2

Have a look at Apache Commons Math. I haven't used ojalgo, and I really can't say I've used Commons Lang enough to be able to provide you with a lot of details, but it did do what I needed.

Description from their website:

Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Commons Lang.

Guiding principles:

  1. Real-world application use cases determine development priority.
  2. This package emphasizes small, easily integrated components rather than large libraries with complex dependencies and configurations.
  3. All algorithms are fully documented and follow generally accepted best practices.
  4. In situations where multiple standard algorithms exist, a Strategy pattern is used to support multiple implementations.
  5. Limited dependencies. No external dependencies beyond Commons components and the core Java platform (at least Java 1.3 up to version 1.2 of the library, at least Java 5 starting with version 2.0 of the library).
Jack Leow
  • 21,945
  • 4
  • 50
  • 55
1

SuanShu has implemented the Active Set method to solve quadratic programming problem. Examples are found here:

http://redmine.numericalmethod.com/projects/public/repository/entry/Examples/src/main/java/com/numericalmethod/suanshu/examples/QuadraticProgramming.java

H Li
  • 15
  • 2
Ryu
  • 11
  • 1