Any good tools to solve integer programs on linux?

2019-03-20 11:40发布

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?

5条回答
趁早两清
2楼-- · 2019-03-20 12:02

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.

查看更多
看我几分像从前
3楼-- · 2019-03-20 12:06

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.

查看更多
beautiful°
4楼-- · 2019-03-20 12:08

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#.

查看更多
疯言疯语
5楼-- · 2019-03-20 12:11

You could try gnu octave - its a subset of matlab

查看更多
6楼-- · 2019-03-20 12:13

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.

查看更多
登录 后发表回答