I'm looking for an optimization library. My two requirements are that it does not use JNI and that it does not have license restrictions preventing it from being used on multiple computers commercially. The only one I've found that meets these requirements is Choco, but it is unusably buggy.
-
Similar question: http://stackoverflow.com/questions/143020/mathematical-optimization-library-for-java-free-or-open-source-recommendation – Zach Scrivena Feb 10 '09 at 04:28
-
possible duplicate of [Linear Programming Tool/Libraries for Java](http://stackoverflow.com/questions/260442/linear-programming-tool-libraries-for-java) – Raedwald Oct 29 '13 at 08:30
5 Answers
Since I couldn't find any optimization software in Java I wrote my own implementation of the Simplex Method and submitted it to Apache Commons Math library: https://issues.apache.org/jira/browse/MATH-246
-
2http://google-opensource.blogspot.com/2009/06/introducing-apache-commons-math.html – Ben McCann Jul 02 '09 at 02:18
-
@BenMcCann Is it possible to include lower and upper bounds on the solution in some way using Apache´s `SimpleBounds(double[] lb, double[] ub)`? – sehlstrom Mar 07 '13 at 13:55
-
1It seems to suffer from some of the same bugs that I've already fixed in Commons Math. You should consider taking all of the Commons Math unit tests and including them in your test suite. http://www.benmccann.com/dev-blog/commons-math-vs-ojalgo/ – Ben McCann Jan 23 '11 at 23:28
Recently JOptimizer, free and pure java, is available for linear programming and all other types of convex mathematical optimizations. It's simple to use and fully documented, the online site comes with a lot of examples.

- 11
- 1
Is your requirement to have any good, stable optimization library, or does it specifically need to apply the Simplex algorithm?
Drools Planner is pure Java (no JNI) and Apache licensed (fits your commercial needs), but instead of using Simplex, it uses metaheuristics (which scale well and deliver great results).

- 26,223
- 11
- 73
- 120
SuanShu has a suite of optimization algorithms, basic as well as advanced: