Mixed
integer
programming
methods
for
supply
chain
optimization
C
h
r
i
s
t
o
s
T.
M
a
r
a
v
e
l
i
a
s
Chemical and Biological Engineering
University of Wisconsin, Madison, WI 53706, USA
Outline
1. Supply
Chain
Management
2. Linear
Programming
3. Basic
Mixed
integer
Linear
Programming
4. Advanced
Mixed
integer
Linear
Programming
5. Software
Overview
6. Combinatorial
Optimization
7. Chemical
Production
Scheduling
The
Chemical
Supply
Chain
Supply chain (SC):
network of facilities and distribution options for the procurement of materials;
transformation of materials into intermediate and finished products; and
distribution of these finished products to customers.
The goal in supply chain management is to
coordinate
materials,
information
and
financial
flows
to
fulfill customer demands while improving competitiveness of the supply chain as a whole; in
coordinating these flows various decisions have to be made.
Suppliers Manufacturing Facilities Warehouses/ dist. centers Retailers CustomersChemical industry changes:
New products ⇒multiproduct (and batch?) processes Holistic view of operationsTayur ‐ FOCAPO 2003:
Inventories in SCs: ~ $10 trillion (10% of US GDP) Same customer satisfaction levels with 50% inventory Traditional PSE is concerned with the development of methods for the design, operation, and control of chemical systems.Supply
Chain
Planning
Matrix
(Meyr et
al.,
2002)
procurement production distribution salesPurchasing & Material Requirements Planning Distribution Planning Transport Planning Demand Planning Demand Fulfillment Long‐term Medium‐term Short‐term Strategic Planning Master Planning Scheduling Production Planning
Integration across time scales and
functions
Many
new
interesting problems
Power – industrial gases – steel SC
Oil – industrial gases – chemicals SC
under
power
constraints
Refinery Industrial
Gases Chemicals Customers
Supply
Chain
Planning
Matrix
(Meyr et
al.,
2002)
Sugarcane Sugarcane Wood Wood Switch grass Switch grass Wood waste Wood waste Sugars Sugars CornCorn CornCorn GrainGrain
Corn Stover Corn Stover Hydrolysis Hydrolysis Fractionation ‐Catalyst ‐Steam ‐Acid ‐Enzymes Fractionation ‐Catalyst ‐Steam ‐Acid ‐Enzymes Bio‐oils (Sugars, Acids) & Lignin Bio‐oils (Sugars, Acids) & Lignin Lignin Lignin Demethoxylation BTXBTX Hydrodeoxygenation Phenols &BTX Phenols &BTX Fast pyrolysis Fast pyrolysis Liquefaction Liquefaction Hydrolysis Hydrolysis Bagasse Bagasse Fermentation Fermentation Dehydration Dehydration Succinic acid Succinic acid Fumaric acid Fumaric acid Malic acid Malic acid Furfural Furfural Dehydration
Dehydration LevulinicLevulinicacidacid FDCA FDCA
C4
C5
C6 procurement production distribution sales
Purchasing & Material Requirements Planning Distribution Planning Transport Planning Demand Planning Demand Fulfillment Long‐term Medium‐term Short‐term Strategic Planning Master Planning Scheduling Production Planning
Integration across time scales and
functions
Many
new
interesting problems
Power – industrial gases – steel SC
Oil – industrial gases – chemicals SC
under
power
constraints
Supply
Chain
Planning
Matrix
(Meyr et
al.,
2002)
Integration of production planning and scheduling
Exxon Mobil: 2% reduction in operating costs, 20% inventory reduction (Shobrys & White, 2002)
DuPont: Capital tied up in inventory reduced from $165 to $90 million (Shobrys & White, 2002)
procurement production distribution sales
Purchasing & Material Requirements Planning Distribution Planning Transport Planning Demand Planning Demand Fulfillment Long‐term Medium‐term Short‐term Strategic Planning Master Planning Scheduling Production Planning
Integration across time scales and
functions
Many
new
interesting problems
Power – industrial gases – steel SC
Oil – industrial gases – chemicals SC
under
power
constraints
Outline
1. Supply
Chain
Management
2. Linear
Programming
3. Basic
Mixed
integer
Linear
Programming
4. Advanced
Mixed
integer
Linear
Programming
5. Software
Overview
6. Combinatorial
Optimization
7. Chemical
Production
Scheduling
Linear
Programming
Standard optimization problem:
max f(x) n - number of variables
s.t. g(x) = 0 m - number of equality constraints h(x)≤ 0 l – number of inequalities
x∈X
If functions f, g, h are linear and variables x are continuous, we have a Linear Programming (LP) Model.
Notes:
1. Free z∈ℜ variables can be replaced by two nonnegative variables x, y≥ 0:
z = x – y
2. Inequalities can be transformed to equalities with slack variables x1 + 2x2 ≤ 10 ⇒ x1 + 2x2 + s1 = 10, s1 ≥ 0
3. Minimization problems can be expressed as maximization problems: min f(x) ⇔ max –f(x)
Thus, we can use the standard LP form: (LP) max z = cTx
s.t. Ax = b x≥ 0
where x: (n+l)-vector; A:(m+l)×(n+l) matrix; c: (n+l)-vector; b: (m+l)-vector
LP
Geometry
A process is used for the production of products P1 and P2 from raw materials A and B according to: 2A + B
→
3P1 (1)A + 2B
→
3P2 (2)If the maximum availability of raw materials A and B is 10 kg/hr, the price of both chemicals is $100/kg, and the demand for products P1 and P2 is 12 and 13 kg/hr, respectively, what is the optimal production mix?
The problem can be represented as the following network (the labels refer to the streams, not species): A B P2 P1 SA SB SA1 SA2 SB2 SB1 Reaction 1 Reaction 2 S1 S2
If FP1 and FP2 are the amounts of products P1 and P2,
respectively, the optimization problem (P1) can be stated as follows: 13 0 , 12 0 30 2 30 2 . 100 100 max 2 1 2 1 2 1 2 1 ≤ ≤ ≤ ≤ ≤ + ≤ + + = P P P P P P P P F F F F F F st F F Z (P1) FP2 2FP1+ FP2≤30 FP1+ 2FP2≤30 FP1≤12 FP2≤13 30 20 10
LP
Geometry
x1 x2 2x1+ x2+ s1= 30 x1+ 2x2+ s2=30 x1+ s3=12 x2+ s4=13 10 20 30 30 20 10 max 10x1+10x2 s.t 2x1+ x2+ s1 = 30 x1+2x2 + s2 = 30 x1 + s3 = 12 x2 + s4 = 13 x1, x2, s1, s2, s3, s4≥0 max 10x1+10x2 s.t 2x1 + x2 ≤30 x1+2x2 ≤30 x1 ≤12 x2 ≤13 x1, x2≥0Definition: A basic solution to an (LP) is determined by fixing (n-m)
variables to 0, and solving the (m×m) system to obtain the remaining.
•Variables fixed at zero are non-basicvariables.
•Variables obtained by solving the equalities are basic.
Definition: A basic feasible solution to an (LP) is a basic solution that satisfies nonnegativity constraints.
Definition: x∈Fis an extreme point iff x= αx1+ (1-α) x2 and α∈(0,1), x1, x2∈F
implies x1= x2.
i.e. xcan not be obtained by linear combination of x1, x2∈F: x1≠x2.
⇒The basic feasible points of an LP are the extreme point of its feasible region.
Let A = [B | N], ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = N B x x
x where B: m×m full-rank, N: m×(n-m), xB: m-vector and xN: (n-m)-vector
Ax = BxB + NxN = b
If xN= 0 ⇒ xB = B-1b - B-1NxN Basic point
z = cBxB + (-cBT B-1N + cNT)xN Objective function
Theorem 1: A point xin Fis an extreme point iffxB= B1b≥0, x N= 0 Theorem 2: The optimal solution x*of (LP) lies at an extreme point of F. Theorem 3: Point x*is optimum if Reduced Cost RC = ‐c
BTB1N+ cNT≤0
Basic solution
Simplex
Method
Main idea of Simplex: If current basis non‐optimal, swap a non‐basic variable for a basic one until (‐cBTB‐1N + c NT) ≤0T x1 x2 (0,13) (4,13) (10,10) (6,12) (0,12) max 10x1+10x2 s.t 2x1+ x2+ s1 = 30 x1+2x2 + s2 = 30 x1 + s3 = 12 x2 + s4 = 13 x1, x2, s1, s2, s3, s4≥0 we start at x1=x2=0 ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 2 1 0 0 0 1 1 2 M M M M N B xB= B‐1b z= cBxB+ (‐cBTB‐1N+ c NT)xN xN= [x1, x2] = [0, 0] xB= [s1, s2, s3, s4] = [30, 30, 12, 13] z= 0 + 10x1+ 10x2 xN= [s3, x2] = [0, 0] xB= [s1, s2, x1, s4] = [6, 18, 12, 13] z= 120 + 10x2– 10s3 xN= [s3, s1] = [0, 0] xB= [x2, s2, x1, s4] = [6, 6, 12, 7] z= 180 + 10s3– 10s1 xN= [s2, s1] = [0, 0] xB= [x2, s3, x1, s4] = [10, 2, 10, 3] z= 200 – (10/3)s2– (10/3)s1
Simplex algorithm developed by G. Dantzig (1947)
Very popular due to wide range of applications formulated using LP
Considered as one of the most important algorithms in the 20
thcentury
Simplex
Method
Remarks
Initialization
It is not always easy to find an initial basis.
For instance, if after adding the slack variable we have some components of b that are negative.
In this case we apply Simplex in two phases.
Phase I: To each equality
∑
= ji j ijx b
a with b
i<0, subtract an artificial variable ui, add constraint ui≥ 0 and solve:
min Σui
s.t. Ax = b -u u≥ 0
The original LP has a feasible solution iff the auxiliary LP has an optimal solution with objective value equal to zero.
Phase II: Use the last basis of phase I as a starting basis for Phase II, after you delete artificial variables ui and change
objective function. Infeasible Æ
Termination
It is not guaranteed that a feasible LP has an optimal solution.
The problem can be unbounded. The simplex method detects such programs and returns a “proof” of unboundedness. ⇒ When checking to determine the leaving variable, no constraint becomes binding.
Degeneracy
A basic solution is degenerate if a basic variable is equal to zero.
In this case, the Simplex method may go through many iterations without increasing the value of the objective function, and the same basis is encountered again (Cycling).
Duality
I
Given a primal LP problem:min cT x (LP-P) s.t. Ax = b
x
≥
0the corresponding dual LP problem is formulated as: min bT y (LP-D)
s.t. ATy
≤
cHow do we construct (LP-D) from (LP-P)?
For each constraint of (LP-P), there is a variable in (LP-D)
For each variable of (LP-P), there is a constraint in (LP-D)
If (LP-P) is min problem, the dual is max.
If the constraints of (LP-P) are equalities (inequalities) the variables of (LP-D) are unconstrained (constrained)
If the variables of (LP-P) are free (non-negative), the constraints of (LP-D) are equalities (inequalities)
Non-negative variables result in ≤ inequalities in max problems
Non-negative variables result in ≥ inequalities in min problems
Duality
II
Let FP and FD be the feasible region of (LP-P) and (LP-D), respectively, we introduce the following convention:
If FP = ∅ =+∞ ∈ c x T F xinfP If FD = ∅ =−∞ ∈ y bT F y D sup
Theorem 1: For any (LP): c x bTy
F y T F
xinf∈ P ≥ sup∈ D [Proof]
Theorem 2: If either FP≠ 0 or FD≠ 0, then c x bTy F y T F x∈ P ∈ D = sup inf [Proof]
⇒ if one of these problems is solvable, then so is the other and c x bTy F y T F xmin∈ P =max∈ D Primal Dual
Optimal Infeasible Unbounded
Optimal √ - -
Infeasible - √ √
Duality
III
Sign of dual variables
Why equality constraints, have unrestricted dual variables?
What does the sign say about the RHS?
Nonnegative variables in (LP-P) result in ≤ inequalities in max problems
≥ inequalities in min problems
Furthermore, the dual solution provides us with
sensitivity
information
The dual variable corresponding to a primal constraint, indicates whether this constraint is active;
and
by how much
Dual values = shadow prices = marginal values
Thus, we can solve (LP-D) instead of (LP-P) if the first is easier.
Computationally, the number of constraints is more important than the no of variables
Duality
IV
Re-optimization
Let assume that we have solved to optimality (LP-P) to obtainz* = cTx* = bTy*
What happens if we add a new constraintam+1 x = bm+1 to (LP-P)?
⇒ (LP-P) may become infeasible.
What happens to (LP-D)?
We add a variable; if we set ym+1= 0, we still have a feasible solution ⇒ We can use the existing basis to continue.
Dual Simplex Method
In general, a feasible non-optimal point of (LP-P) corresponds to an infeasible point of (LP-D) [Why???]. In the simplex algorithm, we try to reduce infeasibility of the dual problem.
Dual simplex method
Commercial solvers use there three powerful LP algorithms:
Primal Simplex
Dual Simplex
Barrier method
Different methods perform better in different problems
Commercial solvers detect certain problem structures & automatically choose appropriate method
Outline
1. Supply
Chain
Management
2. Linear
Programming
3. Basic
Mixed
integer
Linear
Programming
4. Advanced
Mixed
integer
Linear
Programming
5. Software
Overview
6. Combinatorial
Optimization
7. Chemical
Production
Scheduling
MIP
in
Chemical
Engineering
Many decisions are discrete in nature:
Process Design:
9
Selection of equipment units (e.g. distillation vs. extraction) ‐
Superstructure
Optimization
9
Selection of equipment sizes
9
Matching in heat exchanger networks (hot
↔
cold pairs)
Process operations:
9
Decision to expand/retrofit a process
9
Split of customer orders to batches
9
Assignment of batches to equipment units
9
Sequencing of batches in the same unit
Process Control:
9
Selection of linearized model for MPC
9
On/off control action
Applications: Systems Biology
9
Gene addition and/or knock‐out
Discrete
Decisions
in
Process
Design
1. Separate HCl/C2H3Cl – C2H4Cl2 2. Separate HCl – C2H3Cl 1. Separate HCl – C2H3Cl/C2H4Cl2 2. Separate C2H3Cl – C2H4Cl2 Oxygen Air Ethylene Chlorine Vinyl Chloride Hydrogen Chloride Ethylene Dichloride Ethylene Dichloride Water Flash Direct Chlorination Oxychlorination Low P High P Purge Hydrogen Chloride Reactions: Direct chlorination C2H4+ Cl2→C2H4Cl2 Oxychlorination C2H4+ 2HCl + 1/2O2→C2H4Cl2+ H2O Pyrolisis C2H4Cl2→C2H3Cl + HCl Separation:HCl/C2H3Cl/C2H4Cl2mixtureExample:
What is the best way to produce Vinyl Chloride Monomer?
Optimization Decisions:
Distillation sequence (discrete), sizing (discrete or continuous), operating conditions (continuous)
Discrete variables are also used to:
Represent logic conditions
Enforce set of constraints (often including only continuous variables)
Discrete
Decisions
in
Process
Operations
Products 1ststage 2ndstage 3rdstage
(Batches) Reaction Separation1 Separation2
Example:
Scheduling of a multi-product, multi-stage plant
Optimization Decisions:
Number of batches
Assignment of batches to units
Sequencing of batches in a unit
Basic
Integer
Programming
Problems
Knapsack Problem
We are given n items to be packed in a knapsack
Each item i∈{1, 2, …n} has a value piand a weight wi
The capacity of the knapsack is W
The goal is to choose the items that fit in the knapsack with the max value We define:
Xi= 1 if item iis chosen
If we had multiple resources j∈{1, 2, ..m} (e.g. weight, volume, etc.) with capacities Wj we would replace (K.2) with (K.3):
j
W
X
w
j i i ij≤
∀
∑
∑
=
j i i iX
p
z
,max
Objective:W
X
w
i i i≤
∑
Capacity constrainti
X
i∈
{
0
,
1
}
∀
(K.1)
(K.2)
(K.3)
Items Knapsack . . . 1 2 nBasic
Integer
Programming
Problems
Assignment Problem
We are given n jobs and n machines (classes/instructors, routes/buses)
Each job i∈{1, 2, …n} has to be assigned to a machine j∈{1, 2, … n}
The cost of assignment is cij
The objective is to find the assignment with the minimum total cost We define:
Xij= 1 if job iis assigned to machine j
∑
=
j i ij ijX
c
z
,min
Objective:(A.1)
i
X
j ij=
∀
∑
1
(A.2)
Every job is assignedj
X
i
ij
=
∀
∑
1
Exactly one job per machinej
i
X
ij∈
{
0
,
1
}
∀
,
(A.3)
If solved as LP, there is always an optimal solution with integral values Studied by Carl Gustav Jacobi (1890) Solved effectively by the Hungarian method (Kuhn, 1955) Improved by Munkres (1957) Jobs Machines . . . . . . 1 2 n 1 2 nBasic
Integer
Programming
Problems
CitiesTraveling Salesman Problem
There are
n
cities to be visited exactly once by a traveling salesman
The distance/cost from city
i
to city
j
is
c
ijThe objective is to find the sequence of cities that yield the minimum
total distance/cost
We define:
X
ij= 1 if we visit city
j
after city
i
Exercise
Are constraints (TSP.2) & (TSP.3) enough?
What type of solution can we get?
How can we improve our model?
∑
=
j i ij ijX
c
z
,min
Objective:(TSP.1)
j
X
i ij=
∀
∑
1
(TSP.2)
There is an incoming arc for every city jj
i
X
ij∈
{
0
,
1
}
∀
,
i
X
j ij=
∀
Basic
Integer
Programming
Problems
Set Covering Problem
We are given n tasks to be covered by m<nmachines (flights/crew)
Each machine j∈{1, …m} can carry out a subset of tasks Ij⊂I = {1, 2, …n}
The compatibility is represented via parameter: αij= 1if i∈Ij The cost of a machine is cj
The objective is to find the set of machines that coversall tasks and has the minimum cost
We define: Xj= 1 if machine jis chosen
∑
=
j j jX
c
z
min
Objective:(SC.1)
i
X
a
j j ij≥
∀
∑
1
Every task is coveredj
X
j∈
{
0
,
1
}
∀
(SC.1)
Jobs Machines . . . . . . 1 2 n 1 2 mBasic
Mixed
integer
Programming
Problems
Facility Location Problem – I
There are n (existing + new) facilities (plants) and
m
customers
We want to decide how to satisfy customer demand
What new facilities to build, how much to produce and ship
The capacity (cost of setting up) of facility
i
∈
{1, 2, …n}
is
α
i(
f
i)
The cost of shipping material from
i
to j is
c
ijThe demand of customer
j
∈
{1, 2, …m}
is
d
jWe define:
X
i= 1
if we set up (install) facility
i
Y
ij= amount shipped from
i
to
j
Facilities Customers . . . . . . 1 2 n 1 2 m
c
ijd
ja
i, f
i∑
∑
+
=
j i ij ij i i iX
c
Y
f
z
,min
Objective:
(FLI.1)
Minimize set-up and shipping costsMore realistic problem
:
9
There is also production cost
p
i, transportation set-up cost
t
ij, and transportation capacity
s
ij9
The problem has to be solved over multiple planning periods
j
d
Y
ji
ij
≥
∀
∑
(FLI.2)
Customer demand satisfactionj
i
Y
i
X
i∈
{
0
,
1
}
∀
,
ij≥
0
∀
,
i
X
a
Y
i i j ij≤
∀
Basic
Mixed
integer
Programming
Problems
Facility Location Problem – II
The capacity (cost of setting up) of facility
i
∈
{1, 2, …n}
is
α
i(
f
i)
The production cost in facility
i
is
p
iThe setup (variable) cost of shipping material from
i
to
j
is
t
ij(
c
ij)
The capacity of transportation link (
i
→
j
) is
s
ijThe demand of customer
j
∈
{1, 2, …m}
is
d
jFacilities Customers . . . . . . 1 2 n 1 2 m
c
ijd
ja
i, f
i∑
∑
∑ ∑
∑
+
+
+
=
j i ij ij j i ij ij i j ij i i i iX
p
Y
t
Z
c
Y
f
z
, ,min
Objective:j
d
Y
j i ij≥
∀
∑
Customer demand satisfactioni
X
a
Y
i i j ij≤
∀
∑
Facility capacity constraint(FLII.1)
(FLII.2)
(FLII.3)
Minimize total cost
We define:
X
i= 1
if we set up (install) facility i
Y
ij= amount shipped from
i
to
j
Z
ij= 1
if transportation link (
i
→
j
) is set-up
s
ij, t
ijj
i
Y
j
i
Z
X
i,
ij∈
{
0
,
1
}
∀
,
ij≥
0
∀
,
j
i
Z
s
Modeling
with
0
1
Variables
1. Select at least one item from a setj = {1, 2, …, m} OR operator: y1∨y2 ∨…ym →
∑
≥1j j
y
2. Select exactly one item
Exclusive OR: y1∨ y2 ∨ … ym →
∑
=1 jj
y
3. If select k then select l
Implication: k ⇒ l → yl≥yk 4. If and only if Equivalence: k ⇔ l → yk = yl 5. Disjunctions f1(x) ≤ 0 OR f2(x) ≤ 0 y1 + y2 = 1 f1(x) ≤M1(1 - y1) f2(x) ≤M2(1 - y2)
where M1, M2 are sufficiently large numbers
6. Discontinuous Functions/ Domains
Cost = ⎩ ⎨ ⎧ + 0 bx
α
0 = ≤ ≤ x U x L New variable y: If y = 0 ⇒x = 0 If y = 1 ⇒L≤x≤U Formulation: c = αy + bx Ly≤x≤Uy y∈{0,1} α CostModeling
with
Disjunctions
We often want to enforce different conditions in different cases
Examples: Selection of reactor type
Selection of an additional flash tank
Flash Drum1 Distillation column Water Methanol CO, CO2, H2 Methanol Synthesis Isothermal Reactor Methanol Synthesis Adiabatic Reactor Flash Drum2 3-B) 3-A) 4-A) 4-B) k k k j w x x x k k OUT k IN j unit of parameters l Operationa unit leaving streams of Variables unit feeding streams of Variables stream of variables stream Process
(
)
(
)
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ≤ = ) ( 0 , , 0 , , k k k k OUT k IN k k k OUT k IN k k S f C x x w g x x w hMathematical model of unit k:
(
)
(
)
⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = = = = ¬ ∨ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = ≤ = 0 , 0 0 , 0 ) ( 0 , , 0 , , k OUT k IN k k k k k k k OUT k IN k k k OUT k IN k k k x x C w y S f C x x w g x x w h yTo find the optimal design we want to be able to handle the following logic constraints:
We have to convert the disjunction into MIP constraints, handled by MIP solvers
Reformulations
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ≤ ≤ ≤ ≤ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ≤ ≤ ≤ ≤∨
8 6 10 7 4 2 3 1 2 1 2 2 1 1 x x y x x yx
2x
1(
)
(
)
(
)
(
)
(
(
)
)
(
(
)
)
1 1 8 6 1 1 10 7 1 1 4 2 1 1 3 1 1 2 1 2 2 2 2 1 2 1 2 1 1 1 1 = + ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ − ⋅ + ≤ ≤ + − ⋅ − − ⋅ + ≤ ≤ + − ⋅ − ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ − ⋅ + ≤ ≤ + − ⋅ − − ⋅ + ≤ ≤ + − ⋅ − y y y M x y M y M x y M y M x y M y M x y M(
)
(
)
(
)
(
)
⎥⎥⎦ ⎤ ⎢ ⎢ ⎣ ⎡ − ⋅ + ≤ ≤ + − ⋅ − − ⋅ + ≤ ≤ + − ⋅ − ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⋅ + ≤ ≤ + ⋅ − ⋅ + ≤ ≤ + ⋅ − 2 2 2 2 1 2 2 2 2 2 1 2 1 8 6 1 1 10 7 1 4 2 3 1 y M x y M y M x y M y M x y M y M x y M(
)
(
)
(
)
(
)
⎥⎥⎦ ⎤ ⎢ ⎢ ⎣ ⎡ − ⋅ + ≤ ≤ + − ⋅ − − ⋅ + ≤ ≤ + − ⋅ − ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⋅ + ≤ ≤ + ⋅ − ⋅ + ≤ ≤ + ⋅ − 2 2 2 2 1 2 2 2 2 2 1 2 1 7 8 6 1 7 1 7 10 7 1 7 7 4 2 7 7 3 1 7 y x y y x y y x y y x y 7 : M = SelectingBig
M
reformulation
Reformulations
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ≤ ≤ ≤ ≤ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ≤ ≤ ≤ ≤∨
8 6 10 7 4 2 3 1 2 1 2 2 1 1 x x y x x yx
2x
1 ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⋅ ≤ ≤ ⋅ ⋅ ≤ ≤ ⋅ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⋅ ≤ ≤ ⋅ ⋅ ≤ ≤ ⋅ = + ⋅ ≤ ⋅ ≤ ⋅ ≤ ⋅ ≤ + = + = 2 2 2 2 2 2 1 2 1 1 2 1 1 1 1 1 2 1 2 2 2 2 2 1 1 1 2 1 1 1 2 2 1 2 2 2 1 1 1 1 8 6 10 7 4 2 3 1 , 1 , y x y y x y y x y y x y y y y M x y M x y M x y M x x x x x x x(
)
(
)
(
)
(
)
⎥⎥⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⋅ ≤ ≤ ⋅ ⋅ ≤ ≤ ⋅ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ − ⋅ ≤ ≤ − ⋅ − ⋅ ≤ ≤ − ⋅ ⋅ ≤ ⋅ ≤ ⋅ ≤ ⋅ ≤ + = + = 2 2 2 2 2 2 1 2 2 1 2 2 2 1 1 2 2 2 2 2 2 1 1 1 2 1 1 1 2 2 1 2 2 2 1 1 1 1 8 6 10 7 1 4 1 2 1 3 1 1 , y x y y x y y x y y x y y M x y M x y M x y M x x x x x x xGeneral
Mixed
integer
Programming
Model
max
c
Tx
s.t.
Ax
≤
b
x
jinteger, j
∈
N
I= {1...p}
min
c
Tx + d
Ty
s.t.
Ax + By
≤
b
x
≥
0
, y integer
If
N
i=
∅
(i.e. there are no
y
variables)
⇒
Linear Programming (LP) Model
If
N
i=
N
(i.e. there are no
x
variables)
⇒
(Pure) Integer Programming (IP) Model
If
∅ ≠
N
i⊂
N
(i.e. we have both
x
and
y
)
⇒
Mixed-Integer Programming (MIP or MILP) Model
A general integer
Y
∈
{0, 1, 2, 3, …N} can be modeled via
k
binary variables
Y
k:
∑
==
N k kkY
Y
,... 0 orSo, the general MIP problem is:
min
c
Tx + d
Ty
s.t. Ax + By
≤
b
x
≥
0
, y
∈
{0, 1}
min
c
Tx + d
Ty
s.t. (
x, y
)
∈
X
orLP
relaxation
of
a
MIP
Model
General MIP problem (P):
min
c
Tx + d
Ty
(P)
s.t. Ax + By
≤
b
x
≥
0,
y
∈
{0,1}
If we replace the integrality requirement
y
∈
{0,1}
with
y
∈
[0,1]
we obtain a relaxation (RP) of (P):
min
c
Tx + d
Ty
(RP)
s.t. Ax + By
≤
b
x
≥
0,
y
∈
[0,1]
In general, a relaxation of a problem is obtained by:
Either removing constraints (i.e. expanding the feasible region)
Decreasing
the objective function (e.g. removing a nonegative term)
min
c
1Tx
+
c
2Tx
s.t.
A
1x
≤
b
1A
2x
≤
b
2x
∈
X
where
x
,
c
1,
c
2≥
0
min
c
1Tx
+
c
2Tx
s.t.
A
1x
≤
b
1x
∈
X
Larger feasible region(P)
(RP
1)
min
c
1Tx
s.t.
A
1x
≤
b
1A
2x
≤
b
2x
∈
X
Better obj. value at the same point(RP
2)
z(RP2) ≤z(P)Branch
and
Bound:
Basic
Ideas
LPbased method:
Integrality constraints, y∈{0,1}, are replaced by y∈[0, 1]
max cTx + dTy (P) max cTx+ dTy (LRP)
s.t. Ax + By = b ⇒ s.t. Ax + By = b x≥0, y∈{0, 1}p x ≥0, y∈[0, 1]p
LP problem P(i) is solved at node i, with feasible region Fiand objective Zi
We know how to solve (LRP) effectively using Simplex (vs. other relaxations)
Key observations:
If a node is infeasible, then all its descendants will also be infeasible
A child node will always have a lower (worse) objective function(bounding)
Any feasible solution Ziin node iprovides a lower bound on the optimal solution Z*
Easy to add rows (constraints) to (LRP) (why?)
x1 x2 0 1 2 3 1 0 max 3x1 + 4x2 4x1+3x2≤10 x1∈{0,1,2,3}, x2∈{0,1} x1≤1 x1≥2 (1, 1)-INT ZLP= 7.0 (2, 0.66) ZLP=8.66 (x1,x2) = (1.75, 1) ZLP = 9.25 x2≥1 INFEASIBLE x2≤0 (2.5, 0)-INT ZLP= 7.5 Lang & Doig, 1960 x1≤2 x1≥3 INFEASIBLE (2,1) ZLP=6
Branch
and
bound:
Basic
Ingredients
1. The list Lof problems to be solved2. Relaxation (RP): upper (& lower?) bounding procedure
3. Branching Rule: replace problem P(i) in node iby problems P(i1), P(i2), …, P(iq): FR(i1)∪…∪FR(iq) = FR(i) 4. Node (subproblem) selection rule: how to select a problem from the current subproblem list L
5. Pre-processing and variable fixing procedures
Method first proposed by Lang and Doig (1960)
Around the same time an alternative method was developed (cutting planes)
Brute
force
branch‐and‐bound remained ineffective for many years
Cutting planes were not used for many years
(x1,x2) = (0.75, 0.3) ZLP = 9.25 x1≤0 x1≥1 (1, 0.7) ZLP=8.75 (0, 0.8) ZLP = 8.5 x2≥1 x2≤0 (1, 0) -INT ZLP =7.5 INFEASIBLE On which binary/constraint to branch? x2≥1 x2≤0 (0, 0)-INT ZLP = 7 Which active node to evaluate next? (0, 1) -INT ZLP = 8Branch
and
bound
Algorithm
min
c
Tx + d
Ty
s.t.
(x, y)
∈
X
1. Initialization L = {P} ZU := +∞ 2. Termination If L = ∅ thenIf ZU = +∞, then X = ∅ (infeasible problem); STOP
If ZU < +∞, then the solution (x, y)∈X with ZU = cx + dy is optimal; STOP
3. Node Selection and Solution
Using SSR select subproblem (node) P(i)∈L and let L := L\{P(i)} Compute the optimal LP-value Zi and LP-solution (xi, yi) for P(i).
4. Pruning
If Zi≥ZU, then GOTO 2.
(P(i) is either infeasible or dominated by the best solution (upper bound) found so far) If Zi < ZU, then
If yi is integral (i.e. yji is integral ∀j∈NI), then (a better solution is found)
Update upper bound by setting ZU:= Zi
Update list L by removing dominated subproblems: for each i’∈L: If Zi’≥ZU, then L := L\{P(i’)}
GOTO 2.
5. Branching*
Select j∈NI such that yjiis fractional; yj is the branching variable
Update list L by adding programs with fixed yj values
Set L:= L∪ {P(i0), P(i1)} where P(i0) = P(i) ∩ {(x,y)∈ n
+ ℜ × l + ℜ | yj≤ ⎣yji⎦} P(i1) = P(i) ∩ {(x, y)∈ n + ℜ × l + ℜ | yj≥⎡yji⎤} GOTO 2.
Branch
and
bound
Tree
Level
0
1
2
3
4
Nodes
1 = 2
02 = 2
14 = 2
28 = 2
316 = 2
4 0 7 8 9 10 11 12 13 14 15 16 17 18 …Notes:
Level denotes the number of fixed variables
Total number of nodes =
1 + 2 + … + 2
N= 2
N+1-1,
where
N
= no of binary variables
[Why?]
The goal is to explore much fewer nodes via bounding
How do we carry out branching?
1 2
Branching
Variable Selection Rules
1. Try to find a good solution fast: Obtain a good lower bound ⇒Prune many nodes fast
2. Choose a variable that results in badsolutions: Prune as many nodes as possible ⇒Keep the b&b tree small
Node selection rules
Try to find good feasible solutions as early as possible
(x1,x2) = (0.75, 0.3) ZLP = 9.25 x1≤0 x1≥1 (1, 0.7) ZLP=8.75 (0, 0.8) ZLP = 8.5 x2≥1 x2≤0 (1, 0) -INT ZLP =7.5 INFEASIBLE On which binary/constraint to branch? x2≥1 x2≤0 (0, 0)-INT ZLP = 7 Which active node to evaluate next? (0, 1) -INT ZLP = 8
In general:
The number of active nodes increases if the active node is chosen high-up
Variable
Selection
Rules
We want balanced branching and tight bounds:
choose
j
∈
N
Ithat yields:
max{
min{ xj=0, xj=1}}
j Z Z INT ZU=15 INT ZU=16 INF FRAC ZU=18 INF FRAC ZU=14.5 FRAC ZU=16 FRAC ZU=14
INT: Integer feasible
INF: Infeasible FRAC: Fractional
Example
Current best (ZU) Closed (infeas or Zi> ZU) Open (Zi< ZU)Exercise
Variable
Selection
Rules
We want balanced branching and tight bounds:
choose
j
∈
N
Ithat yields:
max{
min{ xj=0, xj=1}}
j Z Z ZU=15 Current best (ZU) Closed (infeas or Zi> ZU) Open (Zi< ZU)
Example
(0,…,0.1, 0.4, 0.95,...1) ZU=14 ZU=14.5Variable
Selection
Rules
We want balanced branching and tight bounds:
choose
j
∈
N
Ithat yields:
max{
min{ xj=0, xj=1}}
j Z Z ZU=15 Current best (ZU) Closed (infeas or Zi> ZU) Open (Zi< ZU)
Example
(0,…,0.1, 0.4, 0.95,...1) ZU=14 ZU=14.1 ZU=16 y=0 y=1 ZU=14.5Variable
Selection
Rules
We want balanced branching and tight bounds:
choose
j
∈
N
Ithat yields:
max{
min{ xj=0, xj=1}}
j Z Z ZU=15 Current best (ZU) Closed (infeas or Zi> ZU) Open (Zi< ZU)
Example
(0,…,0.1, 0.4, 0.95,...1) ZU=14 ZU=15 ZU=15.2 y=0 y=1 ZU=14.5Node
Selection
Rules
9 10
7 8
13.4 13.5
Depth-first Search:
Always choose one of the new subproblems just generated; typically the one with the best lower bound
Backtrack when node is discarded
5 6 13.2 12.95 z=12 0 12.5 12.8 12.85 13.3 1 2 3 4
Advantages:
Can potentially find a (good) solution fast
Re-optimization involves the addition of a
single constraint (???)
Requires modest storage
Disadvantages:
Node
Selection
Rules
9 10 13.4 11 12 13.3 13.5 13 14 13.5 13.4 13.1 7 8 13.2 12.95 13.2 13 5 6Breadth-first Search:
Expand all nodes at each level before go to the next level
z=12 0 12.5 12.8 12.85 13.3 1 2 3 4
Disadvantages:
Examine many non-promising nodes
Feasible solutions are found late
Create very large tree (memory requirements)
Node
Selection
Rules
13.5 11 12 13.1 9 10 13.5 13.4 7 8 13.2 12.95Best-first Search:
Always choose the subproblem with the best lower bound
Advantages:
Examines potentially good nodes
Uniformly tighten bounds
Disadvantages:
Re-optimization is more expensive
Tree tends to be larger
13 13.2 5 6 z=12 0 12.5 12.8 12.85 1 2 3 4
Modern commercial solvers use a
combination of depth-first and best-first.
Special
Branching
Schemes
Special Ordered Sets 1 (SOS1):
x
i≥
0
AND
x
1+
x
2+
x
3+
x
4+
x
5= 1 AND only one non-zero,
x1+ x2= 1 x3+ x4+ x5= 1
(0, 0.5, 0.5, 0, 0)
INFEASIBLE
Special Ordered Sets 2 (SOS2):
x
i≥
0
AND
x
1+ x
2+ x
3+ x
4+ x
5= 1
AND at most two non-zeros AND consecutive
x1=0, x2=0 x3=0, x4=0 (0, 0.5, 0, 0.5, 0) INFEASIBLE x1= 1 (0, 0.5, 0.5, 0, 0) INFEASIBLE x2= 1 x3= 1 x4= 1 x5= 1
or
Pre
processing
Preprocessing applies simple logic to reformulate and tighten the LP relaxation
For MIP problems is better to spend extra time initially to reduce the possibility of long runs
Generate Bounds
e.g., If the upper bound of a 0-1 variable is less than 1, then it can be fixed to 0.
Detect Infeasibilities and Redundant Constraints
If
L
i≤
Ax
i≤
U
i
(for
l
≤
x
≤
u
) then
Ax
i≤
b
iis redundant if
U
i≤
b
iand is infeasible for
L
i< b
i.
Probing
Temporarily set a 0-1 variable to 0 or 1 and then redo the logical testing.
5
x
1+
3
x
2≥
4
becomes infeasible when
x
1=0
⇒
x
1=1
in every feasible solution
5
x
1+
4
x
2+ x
3≤
8
If
x
1=
1 then
x
2=
0 and vice versa
⇒
x
1+ x
2≤
1
2
x
1+ x
2+ x
3≥
1
becomes strictly redundant when
x
1=
1
.
⇒
Can be replaced by
x
1+ x
2+ x
3≥
1
(1, 0.75, 0)
(0.5, 0, 0)
Pre
processing
In summary preprocessing:
Improves bounds
Identifies infeasibility and redundant constraints
Fixes variables
Generates new valid inequalities
Tightens existing inequalities (coefficient improvement)
Not possible to perform all operations and save all information
Computational Effort for preprocessing:
1. Techniques applied to one row
⇒
Always worth doing
2. Saving and preprocessing implication and clique tables
3. Full probing on the matrix
Common strategy:
1. Generate clique and implication inequalities
2. Store them in separate tables
Heuristics
Solution Time proportional to tree size
Tree is large when there are many active nodes; i.e. nodes with
z
i<
z
best= Z
U
How do we keep the size of the tree small?
Try to reduce
z
ias fast as possible
⇒
Variable Selection Rule
Try to find large
z
bestas fast as possible
⇒
Heuristics
Also for large scale instances: “good feasible solutions may be all we can hope for”
If we know the structure of the problem: Use any known heuristic to provide an initial
z
beste.g. use Lin-Kernigham heuristic to get a usually very good solution for the TSP
If we do not know a heuristic: Use LP-based heuristics:
Enumerate 0-1 vectors in the neighborhood of the current LP solution and check feasibility
OCTANE heuristic (Balas et al., 2002)
Successive rounding heuristics
Fractional variables sequentially rounded until an integral solution or infeasibility is detected
Equivalent to “diving” in the b&b tree: branching on a variable and examine only one child
Motivation
for
Branch
and
Cut
x1 x2 0 1 2 3 1 0 max 3x1+ 4x2 (M) 4x1+3x2≤10 x1∈{0,1,2,3}, x2∈{0,1}IP Feasible Region X
x1 x2 0 1 2 3 1 0LP Relaxation Feasible Region
x1 x2
0 1 2 3
1
0
Convex Hull of IP Feasible Region
max 3x1+ 4x2 (M) 4x1+3x2≤10 x1∈{0,1,2,3}, x2∈{0,1} max 3x1+ 4x2 (M) 4x1+3x2≤10 x1∈{0,1,2,3}, x2∈{0,1}
Valid
Inequalities
and
Cutting
Planes
x1 x2 0 1 2 3 1 0LP Relaxation Feasible Region
Facet Valid Inequality Cutting Plane x1 x2 0 1 2 3 1 0