Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Mixed-integer linear programming (MILP)

Mixed-integer linear programming solver.

Finds the minimum of a problem specified by

$$\underset{x}{\mathrm{min}}{f}^{T}x\text{subjectto}\{\begin{array}{l}x(\text{intcon})\text{areintegers}\hfill \\ A\cdot x\le b\hfill \\ Aeq\cdot x=beq\hfill \\ lb\le x\le ub.\hfill \end{array}$$

*f*, *x*, intcon, *b*, *beq*, *lb*,
and *ub* are vectors, and *A* and *Aeq* are
matrices.

You can specify *f*, intcon, *lb*,
and *ub* as vectors or arrays. See Matrix Arguments.

Often, some supposedly integer-valued components of the solution

`x(intCon)`

are not precisely integers.`intlinprog`

deems as integers all solution values within`IntegerTolerance`

of an integer.To round all supposed integers to be exactly integers, use the

`round`

function.x(intcon) = round(x(intcon));

**Caution**Rounding solutions can cause the solution to become infeasible. Check feasibility after rounding:max(A*x - b) % See if entries are not too positive, so have small infeasibility max(abs(Aeq*x - beq)) % See if entries are near enough to zero max(x - ub) % Positive entries are violated bounds max(lb - x) % Positive entries are violated bounds

`intlinprog`

does not enforce that solution components be integer-valued when their absolute values exceed`2.1e9`

. When your solution has such components,`intlinprog`

warns you. If you receive this warning, check the solution to see whether supposedly integer-valued components of the solution are close to integers.`intlinprog`

does not allow components of the problem, such as coefficients in`f`

,`A`

, or`ub`

, to exceed`1e25`

in absolute value. If you try to run`intlinprog`

with such a problem,`intlinprog`

issues an error.Currently, you cannot run

`intlinprog`

in the Optimization app.

Was this topic helpful?