Methods: Mixed integer Programming

Definition

As soon as an optimi­zation pro­blem includes cons­traints con­cer­ning the inte­gra­li­ty of varia­bles, it is refer­red to as an Inte­ger Pro­gram. The inte­gra­li­ty requi­re­ment for a varia­ble \(x_1\) is expres­sed as \(x_1 \in \mathbb{Z}\), whe­re \(\mathbb{Z}\) repres­ents the set of all integers.

When addi­tio­nal cons­traints are invol­ved, inclu­ding inte­gra­li­ty cons­traints on some of the varia­bles, the pro­blem is refer­red to as a Mixed Inte­ger Pro­gram (MIP). Depen­ding on the form of the objec­ti­ve func­tion \(f\) and the fea­si­ble set \(D\) in the optimi­zation problem

$$ \begin{align} \min_x ~~~& f(x) \\ \text{s.t.}
~~~&x \in D \\ ~~~& x_1, …, x_m\in \mathbb{Z} \end{align}$$

it is clas­si­fied as MILP (Mixed Inte­ger Line­ar Pro­gram), MIQP (Mixed Inte­ger Qua­dra­tic Pro­gram), MISDP (Mixed Inte­ger Semi­de­fi­ni­te Pro­gram), etc. Clas­sic optimi­zation pro­blems can be enhan­ced with inte­gra­li­ty cons­traints to make them more expressive.

Example 1

Con­sider \(x_1, x_2\) as the quan­ti­ties of two pro­ducts with manu­fac­tu­ring cos­ts of \(c_1\) and \(c_2\) respec­tively. The cons­traints that their sum should cover a demand of 2 and that \(x_1, x_2\) can only be pro­du­ced in dis­crete quan­ti­ties trans­la­te into the optimi­zation problem:

$$ \begin{align} \min_x ~~~& c_1x_1+c_2x_2 \\ \text{s.t.}
~~~&x_1 \ge 0 ~~~ x_2 \ge 0 \\  ~~~& x_1+x_2=2\\~~~& x_1, x_2\in \mathbb{Z} \end{align}$$

whe­re \(x\) are the optimi­zation varia­bles. This varia­ti­on of the arche­typ­al pro­duc­tion plan­ning exam­p­le is near­ly tri­vi­al: The fea­si­ble set con­sists of the three ele­ments \([0,2], [1,1], [2,0]\) and can be easi­ly exami­ned for its maxi­mum. In this case, the inclu­si­on of inte­gra­li­ty has made the optimi­zation pro­blem simp­ler. Howe­ver, this is not always the case.

Example 2

Ano­ther exam­p­le shows that inte­gra­li­ty is an unex­pec­ted­ly fle­xi­ble cons­traint. Con­sider the situa­ti­on as in exam­p­le 1; howe­ver, wit­hout the con­di­ti­ons \(x_1\in \mathbb{Z}, x_2\in \mathbb{Z}\). Ins­tead, at least one of the con­trac­tu­al con­di­ti­ons \(x_1 \le 1.5\) or \(x_2\ge 1.5\) must be ensu­red. This can be for­mu­la­ted as a Mixed Inte­ger Line­ar Pro­gram (MILP):

$$ \begin{align} \min_x ~~~& c_1x_1+c_2x_2 \\ \text{s.t.}
~~~&x_1 \ge 0 ~~~ x_2 \ge 0 \\  ~~~& x_1+x_2=2\\~~~& x_1 ‑M_1y_1 \le 1.5 ~~~~~~~~~~~~~~ M_1 \text{ upper limit for } x_1 \\ ~~~& ‑x_2 ‑M_2y_2 \le ‑1.5 ~~~~~~ M_2 \text{ upper limit for } ‑x_2 \\ ~~~& y_1+y_2=1 ~~~~ y_1,y_2\in \{0,1\}  \end{align}$$

whe­re \(x\) and \(y\) are the optimi­zation varia­bles. Here, \(y=[y_1,y_2]\) is eit­her \([0,1]\) or \([1,0]\), indi­ca­ting which of the two con­trac­tu­al con­di­ti­ons must be met.

Figu­re 1: Geo­me­tric inter­pre­ta­ti­on of an LP whe­re cons­traints are optio­nal but logi­cal­ly lin­ked. If one of two cons­traints must be met, the solu­ti­on to the LP is the mini­mum of two LPs.

Applications

The requi­re­ment for inte­gra­li­ty is an unex­pec­ted­ly fle­xi­ble cri­ter­ion. As shown in the exam­p­le abo­ve, it can be used to for­mu­la­te logi­cal­ly lin­ked cons­traints [1, p. 6]. Using logi­cal atoms such as AND, OR, and their com­bi­na­ti­ons, enti­re decis­i­on trees can be embedded in optimi­zation pro­blems. Inte­ger optimi­zation thus also pro­vi­des a basis for for­mu­la­ting sol­va­bi­li­ty problems.

Fur­ther­mo­re, non­line­ar terms in optimi­zation pro­blems can be repre­sen­ted as line­ar terms with inte­gra­li­ty con­di­ti­ons [2, pp. 396–396].

Figu­re 2: Non­line­ar func­tions can be mini­mi­zed by embed­ding their line­ar appro­xi­ma­ti­ons into a MILP. The num­ber of con­ti­nuous and inte­ger varia­bles increa­ses with the num­ber of sup­port points.

It is evi­dent that a for­ma­lism capa­ble of repre­sen­ting and sol­ving dis­crete, logi­cal, and non­line­ar pro­blems has many appli­ca­ti­ons. The­se are found, among other are­as, in opti­mal con­trol pro­blems with dis­crete input opti­ons such as the regu­la­ti­on of stock-depen­dent fishe­ries, super­mar­ket cold chains, air­craft con­trol inputs, and col­li­si­on avo­id­ance. They also ari­se in opti­mal design pro­blems with a dis­crete cha­rac­ter, such as trans­por­ta­ti­on net­work design, vehic­le rou­ting, goods flow con­trol, fac­to­ry lay­out, spa­ti­al arran­ge­ment of infra­struc­tu­re, test sequen­cing and expe­ri­men­tal design, sto­rage space manage­ment, and logi­cal fea­si­bi­li­ty pro­blems. More infor­ma­ti­on can be found here.

Solution procedure

Alt­hough inte­ger optimi­zation pro­blems are gene­ral­ly very chal­len­ging, the­re are exact solu­ti­on methods like the branch-and-cut algo­rithm that appear suf­fi­ci­ent­ly powerful in prac­ti­ce. The­se methods are based on the con­s­truc­tion of a tree struc­tu­re of appro­xi­ma­te LPs with an incre­asing num­ber of line­ar cons­traints that coll­ec­tively enforce the inte­gra­li­ty con­di­ti­ons [2, pp. 396–413].

This tree struc­tu­re can be effi­ci­ent­ly sear­ched using a com­bi­na­ti­on of depth-first search and the pru­ning of tree com­pon­ents that are pro­v­a­b­ly worse than pre­vious­ly eva­lua­ted solu­ti­ons. An exam­p­le of the imple­men­ta­ti­on of such a solu­ti­on algo­rithm is the GNU Line­ar Pro­gramming Kit with the GLPK_MI rou­ti­ne [3].

Practical aspects

Inte­ger optimi­zation pro­blems are not always sol­va­ble in a reasonable time frame. They belong to the most expres­si­ve but also the most chal­len­ging pro­blems known to mathe­ma­tics and com­pu­ter sci­ence [4]. From an empi­ri­cal stand­point, howe­ver, they often work well enough for prac­ti­cal pro­blems that do not exceed a few thousand inte­ger varia­bles. This is pri­ma­ri­ly a ques­ti­on of pro­blem structure.

Some pro­blem for­mu­la­ti­ons are easy to inter­pret becau­se they con­tain inte­ger dis­crete objects as optimi­zation varia­bles. Often, howe­ver, non­line­ar terms or logi­cal con­s­tructs must be trans­la­ted into cons­traints. This requi­res time, expe­ri­ence, and is not always feasible.

Code & Sources

Exam­p­le code: Methods_milp.py in our tuto­ri­al­fol­der

[1] Appa, G. M., Pitsou­lis, L., & Wil­liams, H. P. (2006). Hand­book on Model­ling for Dis­crete Optimi­zation. Ber­lin, Hei­del­berg: Springer.

[2] Van­der­bei, Robert J. (2013). Line­ar Pro­gramming: Foun­da­ti­ons and Exten­si­ons. USA: Sprin­ger US.

[3] GNU Line­ar Pro­gramming Kit: https://www.gnu.org/software/glpk/

[4] Pad­berg, M. (2005). Clas­si­cal Cuts for Mixed-Inte­ger Pro­gramming and Branch-and-Cut. Annals of Ope­ra­ti­ons Rese­arch, 139, 321–352.