23

I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available?

dacracot
  • 20,476
  • 26
  • 98
  • 148
  • Possible duplicate of http://stackoverflow.com/questions/143020/mathematical-optimization-library-for-java-free-or-open-source-recommendatio – Raedwald Oct 29 '13 at 08:34

3 Answers3

13

There were several suggestions from an earlier question that I posted:

and possibly more...

Community
  • 1
  • 1
Zach Scrivena
  • 27,585
  • 10
  • 60
  • 72
10

I used lp_solve with success. It looks like there is a native Java API, but I've only used the text file interface. It supports the semi-standard MPS and LP file formats, which I found more convenient for trying out different solvers (such as glpsol).

thoroughly
  • 697
  • 6
  • 8
  • 2
    I wouldn't recommend lp_solve for several reasons. 1) Crashes regularly for large LP problems. 2) Very hard to debug errors/crashes (e.g., xfree memory free error, corrupted double linked list etc. 3) Very bad API (the file interface is decent) but the array based C style API is horrible. – Apoorv May 18 '13 at 11:49
3

Currently, google digs up this Java Linear Programming libs:

Jörg
  • 2,274
  • 20
  • 35
  • Please don't post answers on obviously off-topic questions! [See: **Should one advise on off topic questions?**](http://meta.stackoverflow.com/q/276572/1768232) Off-topic questions can be closed and deleted, which could nullify your contribution. Here, this question is off-topic as it asks for off-site resources. It's very old and the rules were different back then, but today this kind of question is not acceptable on SO. – Kyll Mar 04 '16 at 09:02
  • 1
    @Kyll Thanks for the comment. Was not aware of this guidance yet. FWIW, this question paraphrased what I was looking for, which was how I found it in the first place. Next, I summarized my findings. – Jörg Mar 07 '16 at 14:22