Any good tools to solve integer programs on linux?

2019-03-20 11:46发布

问题:

Are there any good tools to solve integer programs on Linux?

I have a small problem that I want to compute to save time :D. It is kind of a subset sum problem. I have a list of around 20 Integer-Values and I want to compute the subset with the smallest sum that satisfies a certain minimum. You could formulate this with a integer program... something like

\sum_{i=1}^{n} w*x -> min

with

\sum_{i=1}^{n} w*x >= c with x \in \{0,1\}

Or is there an other good way to do this?

回答1:

I would try either GLPK or SCIP.

They have their own modeling language, GLPK has GNU MathProg and SCIP has ZIMPL, so you can conveniently code your LP problem.

GNU MathProg has the advantage of being compatible with AMPL. Thus, you could try the student version of AMPL with CPLEX or Gurobi with your GNU MathProg model. Keep in mind that AMPL, CPLEX and Gurobi are commercial software.



回答2:

Have you tried to do that with LibreOffice Calc Solver?

Microsoft Solver Foundation on Mono Framework could also do the job for you if you know C#.



回答3:

Try Lindo/Lingo. They are not free, but you can try them.

They allow you to specify your problem in a very neat mathematical way.



回答4:

You could try gnu octave - its a subset of matlab



回答5:

I wanted to add one more option to the GLPK suggestions that @Ali has made. I suggest that anyone interested in solving LPs/IPs also look into the optimization packages that the R Language offers.

If you already know and use R, then it is just a matter of downloading the right package. And even if you don't, this is a good way to get introduced to R, which is really taking off in the analytics space.

This vignette is very good way to know which R packages are relevant. For you, RSymphony or Rglpk might be the ones to start with.