Search code examples
mathematical-optimizationlinear-programming

Integer linear programming: example and good tools?


Find a vector x which minimizes c . x subject to the constraint m . x >= b, x integer.

Here's a sample input set:

c : {1,2,3}
m : {{1,0,0},
     {0,1,0},
     {1,0,1}}
b : {1,1,1}

With output:

x = {1,1,0}

What are good tools for solving this sort of problem, and examples of how to use them?


Solution

  • Mathematica

    Mathematica has this built in. (NB: Mathematica is not free software.)

    LinearProgramming[c, m, b, Automatic, Integers]
    

    outputs:

    {1, 1, 0}