When to construct LP, IP, or MIP model

127 Views Asked by At

After doing a few optimization word problems, I've noticed I'm struggling a bit when trying to determine whether or not to set up the problem as an Integer Program, Linear Program, or Mixed Integer Program when the question does not explicitly say which is required. How can I understand when to use integer or continuous variables? Can someone explain? Thanks!

2

There are 2 best solutions below

0
On

The variables are usually going to represent quantities that occur in the statement of the problem. You basically have to ask yourself whether the problem requires them to be integers (or integer multiplies of some fixed quantity), or whether arbitrary values in some interval would make sense.

There are some problems where it turns out that the solutions will automatically be in integers, even though you allow real values. The main examples of this are network flow problems

2
On

In writing down the problem, it comes down solely to whether it makes sense for each variable to take on a continuous value. Are you allowed to cut things up? If yes, then make it continuous.

In implementing the model, if you can relax any integer variables to continuous without changing the solution, then you should probably do that.