4

My problem is in trying to solve a Binary Integer Program through Java. I want to run a series of experiments and an integral component of these experiments is to solve an integer program where the variables are constrained to be between 0 and 1.

In the past I have solved such problems in MatLab, with the function bintprog. In the search for such a function (or class? I'm very new to Java) to use in Java, I have come up empty handed.

Is there a Java library available to solve Integer Programs that has really good documentation?

In my search, I have seen suggestions to use a package called LP_Solve that has had a Java wrapper built around it, and a similar wrapper built for a package called GLPK (wrappers here and here) (which I have used before). The problem with these tools is that they are not strictly designed for Java, and thusly, lack the kind of documentation that I feel I need, and even worse have complicated instructions to even begin using them in my own code. As I am currently learning the Java language I am wondering if there are any really good packages available to solve Binary Integer Programs, Mixed Integer Linear Programs, or just Integer Programs from my own Java code.

As a side note, I really do not want to switch to another language because I am building off of past code and classes that perform the tasks I desire.

8
  • 2
    Java is general-purpose language. MatLab is a mathematics programming language. You will need to roll your own functionality, or find a 3rd-party library to do your calculations. Commented Feb 22, 2011 at 15:17
  • So, you are looking for a Java version of MATLAB's bigintprog? Commented Feb 22, 2011 at 15:24
  • @Matt Ball That is exactly what I am looking for. A library that will do the trick and that has good documentation on how to implement the procedure. Thank you for the opportunity to clarify my question. Commented Feb 22, 2011 at 15:26
  • @Walter: then you should clarify your question to say that. Remove the chaff, and ask what you mean. Commented Feb 22, 2011 at 15:28
  • @Matt Does my latest edit improve the quality of my question? I want to be sure that people can get to the heart of my question, but still have the ability to see some of the background for it. Commented Feb 22, 2011 at 15:36

4 Answers 4

1

How about Java Integer Linear Program Solver (JILPS)?

Sign up to request clarification or add additional context in comments.

2 Comments

I was really hopeful about this, but JILPS does not seem to be a complete project. It seems more like a working project with no available downloads or related information. Thank you though, and please feel free to correct me if I am missing something obvious in the link!
@Walter: It seems like the code is well-documented, but you'll have to do a checkout rather than a download. For an example, see this test program: code.google.com/p/jilps/source/browse/trunk/src/jilps/cop4j/…
1

LP_Solve with the Java wrapper is what I will be using. It is a free Mixed Integer Linear Program solver. LP_Solve for Java is very easy to install following these instructions. Included in the packages you download are files with lots of example code, which I have found useful. The only part of the installation that slowed me down was having to join the Yahoo group to find the files for download.

Comments

0

IBM cplex even though being c library has java wrappers and documentation

Comments

-1

if you want values 0 or 1 try the bool datatype...if your looking at probabilities (that lie between 0 to 1)try limiting a float value such that it is >= 0 and <=1;

1 Comment

Thank you for your answer, but it really does not address my question. I have edited my question to try and clarify what I am looking for.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.