solve optimization problems with integer constraints
integer programming algorithms minimize or maximize a function subject to equality, inequality, and integer constraints. integer constraints restrict some or all of the variables in the optimization problem to take on only integer values. this enables accurate modeling of problems involving discrete quantities (such as shares of a stock or cells in a battery) or yes-or-no decisions. when there are integer constraints on only some of the variables, the problem is called a mixed-integer program (mip). example integer programming problems include portfolio optimization in finance, optimal dispatch of generating units (unit commitment) in energy production, design optimization in engineering, and scheduling and routing in transportation and supply chain applications.
integer programming is the mathematical problem of finding a vector \(x\) that minimizes the function:
\[\min_x f(x)\]
subject to the constraints:
\[\begin{eqnarray}g(x) \leq 0 & \quad & \text{(inequality constraint)} \\h(x) = 0 & \quad & \text{(equality constraint)} \\ x_i \in \mathbb{z} & \quad & \text{(integer constraint)} \end{eqnarray}\]
this is the most general form of integer programming and is called a mixed-integer nonlinear program (minlp).
many problems can be formulated with only linear objectives and constraints. in this case, the integer program is called a mixed-integer linear program (milp) and is written as:
\[\min_{x} \left\{f^{\mathsf{t}}x\right\}\]
subject to the constraints:
\[\begin{eqnarray}ax \leq b & \quad & \text{(inequality constraint)} \\a_{eq}x = b_{eq} & \quad & \text{(equality constraint)} \\lb \leq x \leq ub & \quad & \text{(bound constraint)} \\ x_i \in \mathbb{z} & \quad & \text{(integer constraint)} \end{eqnarray}\]
mixed-integer linear programming in matlab
integer programming algorithms can be implemented in software such as matlab®. solving milps typically requires using a combination of techniques to narrow the solution space, find integer-feasible solutions, and discard portions of the solution space that do not contain better integer-feasible solutions. common techniques for integer programming include:
- cutting planes: add additional constraints to the problem that reduce the search space.
- heuristics: search for integer-feasible solutions.
- branch and bound: systematically search for the optimal solution. the algorithm solves linear programming relaxations with restricted ranges of possible values of the integer variables.
the in optimization toolbox™ implements these techniques.
mixed-integer nonlinear programming in matlab
some minlps can be solved by adapting these integer programming techniques to nonlinear functions or by linearizing the nonlinear functions and solving a sequence of milps. when the nonlinear functions can only be evaluated at integral points, other techniques are needed. two algorithms applicable to these types of integer programs are implemented in global optimization toolbox.
- genetic algorithms: mimic a natural selection process that repeatedly modifies a population of individual solutions that are restricted to integral values.
- surrogate optimization: automatically build a surrogate model of the problem that can be relaxed and is then solved by adaptations of milp techniques to minlp.
for more information on integer programming, see optimization toolbox and global optimization toolbox.
how to
use cases
mixed-integer linear programming examples
mixed-integer nonlinear programming examples
software reference
see also: optimization toolbox, global optimization toolbox, linear programming, quadratic programming, nonlinear programming, genetic algorithm, investment management, energy trading, prescriptive analytics, surrogate optimization, power system simulation and optimization