285. MILP Idioms

285.1. MILP Modeling Idioms

Phrasebook of LP/MILP modeling idioms — small algebraic constructs that encode logic, products, piecewise terms, and other structure as linear constraints.

Network / flow
𝑗𝑥𝑖𝑗𝑗𝑥𝑗𝑖=𝑏𝑖conservation: 𝑏𝑖 source/sink/0
𝑥𝑖𝑗𝑥𝑗𝑖net arc flow (single signed var)
0𝑥𝑖𝑗𝑢𝑖𝑗arc capacity
𝑖𝑆,𝑗𝑆𝑥𝑖𝑗flow across a cut
Conditional (Big-M)
𝑎𝑇𝑥𝑏+𝑀(1𝑦)active only if 𝑦=1
𝑎𝑇𝑥𝑏1+𝑀𝑦𝑎𝑇𝑥𝑏2+𝑀(1𝑦)either/or
tight 𝑀loose 𝑀 ruins relaxation
Binary ↔ continuous
𝑥𝑀𝑦fixed-charge on/off
𝑙𝑦𝑥𝑢𝑦semi-continuous: 0 or [𝑙,𝑢]
𝑥𝜀𝑦force strictly positive
Binary logic
𝑦𝑖1at most one
𝑦𝑖=1exactly one (SOS1)
𝑦𝑖1OR
𝑦𝑖𝑘𝑦𝑖𝑘cardinality
𝑦𝑎𝑦𝑏implication 𝑎𝑏
Products
𝑧𝑦1𝑧𝑦2𝑧𝑦1+𝑦21bin × bin
𝑧𝑢𝑦𝑧𝑥𝑧𝑥𝑢(1𝑦)𝑧0bin × cont, 𝑥[0,𝑢]
McCormick envelopecont × cont relaxation
Abs / norms
𝑥=𝑥+𝑥𝑥+,𝑥0|𝑥|=𝑥++𝑥 (L1)
𝑡𝑥𝑡𝑥|𝑥|, epigraph
Min / max
𝑡𝑓𝑖(𝑥)𝑖min 𝑡 ⇒ minimax
𝑡𝑓𝑖(𝑥)𝑖max 𝑡 ⇒ maximin
Piecewise-linear
λ-method + SOS2convex combo of breakpoints
δ-methodincremental encoding
Sequencing
𝑢𝑖𝑢𝑗+𝑛𝑥𝑖𝑗𝑛1MTZ subtour elim.
𝑠𝑗𝑠𝑖+𝑑𝑖precedence
Covering family
𝑎𝑖𝑗𝑥𝑗1set covering
𝑎𝑖𝑗𝑥𝑗1set packing
𝑎𝑖𝑗𝑥𝑗=1partitioning
𝑤𝑖𝑥𝑖𝑊knapsack
Slack / deviation
𝑎𝑇𝑥+𝑠=𝑏𝑠0slack (≤ → =); surplus 𝑠
𝑓(𝑥)+𝑑𝑑+=tgtgoal prog. / soft
Temporal
𝐼𝑡=𝐼𝑡1+𝑝𝑡𝑑𝑡inventory balance
Transforms
𝑥=1,𝑥0unit simplex
Charnes–Cooperlinear-fractional → LP
𝑦𝑖𝑦𝑖+1symmetry breaking