Mixed integer programming methods supply chain...

187
Mixedinteger programming methods for supply chain optimization ChristosT.Maravelias Chemical and Biological Engineering University of Wisconsin, Madison, WI 53706, USA July 19-29, 2011, Angra dos Reis, RJ, Brazil

Transcript of Mixed integer programming methods supply chain...

Page 1: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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 sChemical and Biological Engineering

University of Wisconsin, Madison, WI 53706, USA

July 19-29, 2011, Angra dos Reis, RJ, Brazil

Page 2: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 3: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

Customers

Chemical industry changes:New products ⇒ multiproduct (and batch?) processesHolistic view of operations

Tayur ‐ 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. 

Page 4: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Supply Chain Planning Matrix (Meyr et al., 2002)

procurement production distribution sales

Purchasing& Material

RequirementsPlanning

DistributionPlanning

TransportPlanning

DemandPlanning

Demand Fulfillment

Long‐term

Medium‐term

Short‐term

Strategic Planning

Master Planning

Scheduling

ProductionPlanning

Integration across time scales and functionsMany new interesting problems

Power – industrial gases – steel SC Oil – industrial gases – chemicals SCunder power constraints

Refinery IndustrialGases

Chemicals Customers

Power Utilities

Page 5: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Supply Chain Planning Matrix (Meyr et al., 2002)

SugarcaneSugarcane

WoodWood

Switch grassSwitch grass

Wood wasteWood waste

SugarsSugars

CornCorn Corn GrainCorn Grain

Corn StoverCorn Stover

HydrolysisHydrolysis

Fractionation

‐ Catalyst‐ Steam‐ Acid‐ Enzymes 

Fractionation

‐ Catalyst‐ Steam‐ Acid‐ Enzymes 

Bio‐oils(Sugars, Acids)& Lignin

Bio‐oils(Sugars, Acids)& Lignin

LigninLigninDemethoxylation BTXBTX

Hydrodeoxygenation

Zeolite upgrading

Phenols &BTXPhenols &BTX

AromaticsAromatics

Fast pyrolysisFast 

pyrolysis

LiquefactionLiquefaction

HydrolysisHydrolysis

BagasseBagasse

FermentationFermentation

DehydrationDehydration

Succinic acidSuccinic acid

Fumaric acidFumaric acid

Malic acidMalic acid

FurfuralFurfural

DehydrationDehydrationLevulinicacid

Levulinicacid

FDCAFDCA

C4

C5

C6

procurement production distribution sales

Purchasing& Material

RequirementsPlanning

DistributionPlanning

TransportPlanning

DemandPlanning

Demand Fulfillment

Long‐term

Medium‐term

Short‐term

Strategic Planning

Master Planning

Scheduling

ProductionPlanning

Integration across time scales and functionsMany new interesting problems

Power – industrial gases – steel SC Oil – industrial gases – chemicals SCunder power constraintsBiomass to fuels and chemicals

Page 6: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

RequirementsPlanning

DistributionPlanning

TransportPlanning

DemandPlanning

Demand Fulfillment

Long‐term

Medium‐term

Short‐term

Strategic Planning

Master Planning

Scheduling

ProductionPlanning

Integration across time scales and functionsMany new interesting problems

Power – industrial gases – steel SC Oil – industrial gases – chemicals SCunder power constraintsBiomass to fuels and chemicals

Page 7: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 8: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

m < n

Page 9: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

P1SA

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 bestated as follows:

130,120302302.100100max

21

21

21

21

≤≤≤≤≤+≤++=

PP

PP

PP

PP

FFFFFFst

FFZ

(P1)

FP1

FP2

2FP1 + FP2 ≤ 30

FP1 + 2FP2 ≤ 30

FP1 ≤ 12FP2 ≤ 13

10 20 30

30

20

10

Page 10: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

LP Geometry

x1

x2 2x1 + x2 + s1 = 30

x1 + 2x2 + s2 = 30

x1 + s3 = 12x2 + s4 =13

10 20 30

30

20

10

max 10x1+10x2s.t 2x1 + x2 + s1 = 30

x1+2x2 + s2 = 30x1 + s3 = 12

x2 + s4 = 13x1, x2, s1, s2, s3, s4 ≥ 0

max 10x1+10x2s.t 2x1 + x2 ≤ 30

x1+2x2 ≤ 30x1 ≤ 12

x2 ≤ 13x1 , x2 ≥ 0

Definition: 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-basic variables. • 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∈F is an extreme point iff x = α x1 + (1-α) x2 and α∈(0,1), x1, x2∈Fimplies x1 = x2. i.e. x can 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

xxx 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 + cN

T)xN Objective function

Theorem 1: A point x in F is an extreme point iff xB = B­1b ≥ 0, xN = 0Theorem 2: The optimal solution x* of (LP) lies at an extreme point of F.Theorem 3: Point x* is optimum if Reduced Cost RC = ‐cBTB­1N + cNT ≤ 0

Basic solutionBasic‐feasible solution (extreme point)

Page 11: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Simplex Method

Main idea of Simplex: If current basis non‐optimal, swap a non‐basic variable for a basic one until (‐cBTB‐1N + cNT) ≤ 0T

x1

x2

(0,13)(4,13)

(10,10)(6,12)

(0,12)

max 10x1+10x2s.t 2x1 + x2 + s1 = 30

x1+2x2 + s2 = 30x1 + s3 = 12

x2 + s4 = 13x1, x2, s1, s2, s3, s4 ≥ 0

we start at x1=x2=0

⎥⎥⎥⎥

⎢⎢⎢⎢

100010010001001021000112

M

M

M

M

N B xB = B‐1bz = cBxB + (‐cBTB‐1N + cNT)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 LPConsidered as one of the most important algorithms in the 20th centuryNot polynomial but outperforms polynomial algorithms (Ellipsoid, Khachiyan Khachiyan, 1972)

Page 12: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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 ∑ =j

ijij bxa with bi<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). To avoid cycling, several rules have been developed; e.g. Bland’s rule.

Page 13: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Duality ­ I

Given a primal LP problem: min cT x (LP-P) s.t. Ax = b x ≥ 0 the corresponding dual LP problem is formulated as: min bT y (LP-D) s.t. ATy ≤ c

How 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

The dual of an LP can be used to better study and even solve faster an LP

Page 14: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Duality ­ II

Let FP and FD be the feasible region of (LP-P) and (LP-D), respectively, we introduce the following convention:

If FP = ∅ +∞=∈

xcT

Fx Pinf

If FD = ∅ −∞=∈

ybT

Fy Dsup

Theorem 1: For any (LP): ybxc T

Fy

T

Fx DP∈∈

≥ supinf [Proof]

Theorem 2: If either FP≠ 0 or FD≠ 0, then ybxc T

Fy

T

Fx DP∈∈

= supinf [Proof]

⇒ if one of these problems is solvable, then so is the other and ybxc T

Fy

T

Fx DP ∈∈= maxmin

Primal Dual Optimal Infeasible Unbounded Optimal √ - - Infeasible - √ √ Unbounded - √ -

Page 15: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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 informationThe dual variable corresponding to a primal constraint, indicates whether this constraint is active;and by how muchDual 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 variablesIf the (m×n) primal (LP-P) has m >> n, then it may be easier to solve the dual (LP-D)

Page 16: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Duality ­ IV

Re-optimization Let assume that we have solved to optimality (LP-P) to obtain z* = cT x* = bT y* What happens if we add a new constraint am+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 SimplexDual SimplexBarrier method

Different methods perform better in different problemsCommercial solvers detect certain problem structures & automatically choose appropriate methodIf we know the structure we can also choose the method

Page 17: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 18: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

MIP in Chemical Engineering

Many decisions are discrete in nature:

Process Design:Selection of equipment units (e.g. distillation vs. extraction) ‐ Superstructure OptimizationSelection of equipment sizesMatching in heat exchanger networks (hot ↔ cold pairs)

Process operations:Decision to expand/retrofit a processSplit of customer orders to batchesAssignment of batches to equipment unitsSequencing of batches in the same unit

Process Control:Selection of linearized model for MPCOn/off control action

Applications: Systems BiologyGene addition and/or knock‐out 

Page 19: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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→ C2H4Cl2Oxychlorination

C2H4 + 2HCl + 1/2O2 → C2H4Cl2 + H2OPyrolisis

C2H4Cl2 → C2H3Cl + HCl

Separation: HCl/C2H3Cl/C2H4Cl2 mixture

Example: 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 conditionsEnforce set of constraints (often including only continuous variables)

Turkay & Grossmann, 1998

Page 20: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Discrete Decisions in Process Operations

Products 1st stage 2nd stage 3rd stage(Batches) Reaction Separation1 Separation2

Example: Scheduling of a multi-product, multi-stage plant

Optimization Decisions:Number of batchesAssignment of batches to unitsSequencing of batches in a unitStarting time (continuous)

Page 21: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Integer Programming Problems

Knapsack ProblemWe are given n items to be packed in a knapsackEach item i∈{1, 2, …n} has a value pi and a weight wi

The capacity of the knapsack is WThe goal is to choose the items that fit in the knapsack with the max value

We define:Xi = 1 if item i is chosen

If we had multiple resources j∈{1, 2, ..m} (e.g. weight, volume, etc.) with capacities Wjwe would replace (K.2) with (K.3):

jWXw ji

iij ∀≤∑

∑=ji

ii Xpz,

maxObjective:

WXwi

ii ≤∑ Capacity constraint

iX i ∀∈ }1,0{

(K.1)

(K.2)

(K.3)

Items

Knapsack

.

.

.

1

2

n

Page 22: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Integer Programming Problems

Assignment ProblemWe 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 i is assigned to machine j

∑=ji

ijij Xcz,

minObjective: (A.1)

iXj

ij ∀=∑ 1 Every job is assigned(A.2)

jXi

ij ∀=∑ 1 Exactly one job per machine

jiX ij ,}1,0{ ∀∈

(A.3)

If solved as LP, there is always an optimal solution with integral valuesStudied by  Carl Gustav Jacobi (1890)Solved effectively by the Hungarian method (Kuhn, 1955)Improved by Munkres (1957)

Jobs Machines

.

.

.

.

.

.

1

2

n

1

2

n

Page 23: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Integer Programming Problems

Cities Traveling Salesman ProblemThere are n cities to be visited exactly once by a traveling salesmanThe distance/cost from city i to city j is cij

The objective is to find the sequence of cities that yield the minimumtotal distance/cost

We define:Xij = 1 if we visit city j after city i

ExerciseAre constraints (TSP.2) & (TSP.3) enough?What type of solution can we get?How can we improve our model?

∑=ji

ijij Xcz,

minObjective: (TSP.1)

jXi

ij ∀=∑ 1 There is an incoming arc for every city j(TSP.2)

jiX ij ,}1,0{ ∀∈

iXj

ij ∀=∑ 1 There is an outgoing arc for every city i(TSP.3)

Page 24: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Integer Programming Problems

Set Covering ProblemWe are given n tasks to be covered by m<n machines (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 = 1 if i∈Ij

The cost of a machine is cj

The objective is to find the set of machines that covers all tasks and has the minimum cost

We define:Xj = 1 if machine j is chosen

∑=j

jj XczminObjective: (SC.1)

iXaj

jij ∀≥∑ 1 Every task is covered

jX j ∀∈ }1,0{

(SC.1)

Jobs Machines

.

.

.

.

.

.

1

2

n

1

2

m

Page 25: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Mixed­integer Programming Problems

Facility Location Problem – IThere are n (existing + new) facilities (plants) and m customers

We want to decide how to satisfy customer demandWhat new facilities to build, how much to produce and ship

The capacity (cost of setting up) of facility i∈{1, 2, …n} is αi (fi)The cost of shipping material from i to j is cijThe demand of customer j∈{1, 2, …m} is dj

We define:Xi = 1 if we set up (install) facility iYij = amount shipped from i to j

Facilities Customers

.

.

.

.

.

.

1

2

n

1

2

m

cij djai, fi

∑∑ +=ji

ijiji

ii YcXfz,

minObjective: (FLI.1) Minimize set-up and shipping costs

More realistic problem:There is also production cost pi, transportation set-up cost tij, and transportation capacity sijThe problem has to be solved over multiple planning periodsThe network involves multiple products

jdY ji

ij ∀≥∑ Customer demand satisfaction (FLI.2)

jiYiX iji ,0,}1,0{ ∀≥∀∈

iXaY iij

ij ∀≤∑ Facility capacity constraint(FLI.3)

Page 26: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Basic Mixed­integer Programming Problems

Facility Location Problem – IIThe capacity (cost of setting up) of facility i∈{1, 2, …n} is αi (fi)The production cost in facility i is piThe setup (variable) cost of shipping material from i to j is tij (cij)The capacity of transportation link (i→j) is sijThe demand of customer j∈{1, 2, …m} is dj

Facilities Customers

.

.

.

.

.

.

1

2

n

1

2

m

cij djai, fi

∑∑∑ ∑∑ +++=ji

ijijji

ijiji j

ijii

ii YcZtYpXfz,,

minObjective:

jdY ji

ij ∀≥∑ Customer demand satisfaction

iXaY iij

ij ∀≤∑ Facility capacity constraint

(FLII.1)

(FLII.2)

(FLII.3)

Minimize total cost

We define:Xi = 1 if we set up (install) facility iYij = amount shipped from i to jZij = 1 if transportation link (i→j) is set-up

sij, tij

jiYjiZX ijiji ,0,}1,0{, ∀≥∀∈

jiZsY ijijij ,∀≤ Transportation capacity and set-up(FLII.4)

Page 27: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling with 0­1 Variables

1. Select at least one item from a set j = {1, 2, …, m} OR operator: y1 ∨ y2 ∨…ym → 1≥∑

jjy

2. Select exactly one item Exclusive OR: y1 ∨ y2 ∨ … ym → 1=∑

jjy

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

UxL

New variable y: If y = 0 ⇒ x = 0 If y = 1 ⇒ L ≤ x ≤ U

Formulation: c = αy + bx Ly ≤ x ≤ Uy y∈{0,1} α

Cost

L U x

Page 28: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling with Disjunctions

We often want to enforce different conditions in different casesExamples: Selection of reactor type

Selection of an additional flash tank

FlashDrum1

Distillation column

Water

Methanol

CO, CO2, H2

Methanol SynthesisIsothermal Reactor

Methanol SynthesisAdiabatic Reactor

FlashDrum23-B)

3-A) 4-A)

4-B)

kkk

j

w

x

x

x

k

kOUT

kIN

j

unit of parameters lOperationa unit leaving streams of Variables unit feeding streams of Variables stream of variablesstream Process

( )( )

⎥⎥⎥

⎢⎢⎢

=

=

)(

0,,

0,,

kkk

kOUT

kIN

kk

kOUT

kIN

kk

SfC

xxwg

xxwh

Mathematical model of unit k :

( )( )

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

==

==

¬

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

=

0,00,0

)(

0,,

0,,kOUT

kIN

kk

k

kkk

kOUT

kIN

kk

kOUT

kIN

kk

k

xxCw

y

SfC

xxwg

xxwhy

To 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

Grossmann & co‐workers, 1998

Page 29: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Reformulations

⎥⎥⎥

⎢⎢⎢

≤≤≤≤

⎥⎥⎥

⎢⎢⎢

≤≤≤≤ ∨

86107

4231

2

1

2

2

1

1

xxy

xxy

x2

x1

( ) ( )( ) ( )

( ) ( )( ) ( )

11861

11071

1421

1311

21

22

2

21

2

12

1

11

1

=+⎥⎥⎦

⎢⎢⎣

−⋅+≤≤+−⋅−

−⋅+≤≤+−⋅−

⎥⎥⎦

⎢⎢⎣

−⋅+≤≤+−⋅−

−⋅+≤≤+−⋅−

yyyMxyM

yMxyM

yMxyM

yMxyM

( ) ( )( ) ( )⎥

⎥⎦

⎢⎢⎣

−⋅+≤≤+−⋅−

−⋅+≤≤+−⋅−

⎥⎥⎦

⎢⎢⎣

⋅+≤≤+⋅−

⋅+≤≤+⋅−2

22

21

2

22

2

21

2

1861

11071

42

31

yMxyM

yMxyM

yMxyM

yMxyM

( ) ( )( ) ( )⎥

⎥⎦

⎢⎢⎣

−⋅+≤≤+−⋅−

−⋅+≤≤+−⋅−

⎥⎥⎦

⎢⎢⎣

⋅+≤≤+⋅−

⋅+≤≤+⋅−2

22

21

2

22

2

21

2

178617

1710717

7427

7317

yxy

yxy

yxy

yxy

7 : =MSelecting

Big­M reformulation

Page 30: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Reformulations

⎥⎥⎥

⎢⎢⎢

≤≤≤≤

⎥⎥⎥

⎢⎢⎢

≤≤≤≤ ∨

86107

4231

2

1

2

2

1

1

xxy

xxy

x2

x1

⎥⎥⎦

⎢⎢⎣

⋅≤≤⋅

⋅≤≤⋅

⎥⎥⎦

⎢⎢⎣

⋅≤≤⋅

⋅≤≤⋅=+

⋅≤

⋅≤

⋅≤

⋅≤

+=

+=

222

2

221

2

112

1

111

121

222

221

112

111

22

122

21

111

86

107

42

31,

1

,

yxy

yxy

yxy

yxyyy

yMx

yMx

yMx

yMx

xxx

xxx

( ) ( )( ) ( ) ⎥

⎥⎦

⎢⎢⎣

⋅≤≤⋅

⋅≤≤⋅

⎥⎥⎦

⎢⎢⎣

−⋅≤≤−⋅

−⋅≤≤−⋅

⋅≤

⋅≤

⋅≤

⋅≤

+=

+=

222

2

221

2

212

2

211

2

222

221

112

111

22

122

21

111

86107

14121311

,

yxyyxy

yxyyxy

yMx

yMx

yMx

yMx

xxx

xxx

Convex­hull reformulation

Page 31: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

General Mixed­integer Programming Model

max cT xs.t. Ax ≤ b

xj integer, j∈NI = {1...p}

min cT x + dT ys.t. Ax + By ≤ b

x ≥ 0, y integer

If Ni = ∅ (i.e. there are no y variables) ⇒ Linear Programming (LP) Model

If Ni = N (i.e. there are no x variables) ⇒ (Pure) Integer Programming (IP) Model

If ∅ ≠ Ni ⊂ 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 Yk:

∑=

=Nk

kkYY,...0

or

So, the general MIP problem is:

min cT x + dT ys.t. Ax + By ≤ b

x ≥ 0, y∈{0, 1}

min cT x + dT ys.t. (x, y)∈ X

or

Page 32: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

LP­relaxation of a MIP Model 

General MIP problem (P): min cT x + dT y (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 cT x + dT y (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 c1T x + c2

T xs.t. A1 x ≤ b1

A2 x ≤ b2x∈Xwhere x, c1, c2 ≥ 0

min c1T x + c2

T xs.t. A1 x ≤ b1

x∈X

Largerfeasibleregion

(P)

(RP1)

min c1T x

s.t. A1 x ≤ b1A2 x ≤ b2x∈X

Better obj.value at thesame point

(RP2)z(RP2) ≤ z(P)

Page 33: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­Bound: Basic Ideas

LP­based method:Integrality constraints, y∈{0,1}, are replaced by y∈[0, 1]max cT x + dT y (P) max cT x + dT y (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 Fi and 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 infeasibleA child node will always have a lower (worse) objective function (bounding)Any feasible solution Zi in node i provides 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 + 4x24x1+3x2 ≤ 10x1∈{0,1,2,3}, x2∈{0,1} x1 ≤ 1 x1 ≥ 2

(1, 1)-INTZLP = 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

Page 34: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­bound: Basic Ingredients

1. The list L of problems to be solved2. Relaxation (RP): upper (& lower?) bounding procedure 3. Branching Rule: replace problem P(i) in node i by 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 L5. 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 yearsCutting 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 ≥ 1x2 ≤ 0

(1, 0) -INTZLP =7.5

INFEASIBLE

On which binary/constraint to branch?

x2 ≥ 1x2 ≤ 0

(0, 0)-INTZLP = 7

Which active node to evaluate next?

(0, 1) -INTZLP = 8

Page 35: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­bound Algorithm

min cT x + dT ys.t. (x, y)∈ X

1. Initialization L = {P} ZU := +∞

2. Termination If L = ∅ then

If 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 yji is 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 ≤ ⎣yj

i⎦} P(i1) = P(i) ∩ {(x, y)∈ n

+ℜ × l+ℜ | yj ≥ ⎡yj

i⎤} GOTO 2.

* Occurs only when P(i) has not been pruned, i.e. when Zi < ZU and yji is fractional for some j ∈ NI

Page 36: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­bound Tree

Level0

1

2

3

4

Nodes1 = 20

2 = 21

4 = 22

8 = 23

16 = 24

0

7 8 9 10 11 12 13 14

15 16 17 18 …

Notes:Level denotes the number of fixed variablesTotal number of nodes = 1 + 2 + … + 2N = 2N+1-1, where N = no of binary variables [Why?]The goal is to explore much fewer nodes via boundingHow do we carry out branching?

1 2

3 4 5 6

Page 37: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branching

Variable Selection Rules1. Try to find a good solution fast: Obtain a good lower bound ⇒ Prune many nodes fast2. Choose a variable that results in bad solutions: Prune as many nodes as possible ⇒ Keep the b&b tree smallNode 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 ≥ 1x2 ≤ 0

(1, 0) -INTZLP =7.5

INFEASIBLE

On which binary/constraint to branch?

x2 ≥ 1x2 ≤ 0

(0, 0)-INTZLP = 7

Which active node to evaluate next?

(0, 1) -INTZLP = 8

In general:The number of active nodes increases if the active node is chosen high-upIt takes a long time to improve the upper bound if the active node is chosen from down low

Page 38: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Variable Selection Rules

We want balanced branching and tight bounds: choose j∈NI that yields: { }},min{max 10 == jj xx

jZZ

INTZU=15 INT

ZU=16INF

FRACZU=18

INF

FRACZU=14.5

FRACZU=16

FRACZU=14

INT: Integer feasibleINF: InfeasibleFRAC: Fractional

Example

Current best (ZU)Closed (infeas or Zi > ZU)Open (Zi < ZU)

Exercise

Page 39: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Variable Selection Rules

We want balanced branching and tight bounds: choose j∈NI that yields: { }},min{max 10 == jj xx

jZZ

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.5

Page 40: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Variable Selection Rules

We want balanced branching and tight bounds: choose j∈NI that yields: { }},min{max 10 == jj xx

jZZ

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.5

Page 41: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Variable Selection Rules

We want balanced branching and tight bounds: choose j∈NI that yields: { }},min{max 10 == jj xx

jZZ

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.5

Page 42: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Node Selection Rules

9 10

7 813.4 13.5

Depth-first Search:Always choose one of the new subproblems just generated; typically the one with the best lower boundBacktrack when node is discarded

5 613.2 12.95

z=120

12.5 12.8

12.85 13.3

1 2

3 4

Advantages:Can potentially find a (good) solution fastRe-optimization involves the addition of a single constraint (???)Requires modest storage

Disadvantages:“Hidden” good solutions difficult to find

Page 43: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Node Selection Rules

9 10

13.4

11 12

13.3 13.5

13 14

13.513.4 13.1

7 813.2

12.95

13.2 135 6

Breadth-first Search:Expand all nodes at each level before go to the next level

z=120

12.5 12.8

12.85 13.3

1 2

3 4

Disadvantages:Examine many non-promising nodes Feasible solutions are found lateCreate very large tree (memory requirements)

Not used in practice

Page 44: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Node Selection Rules

13.5

11 12

13.1

9 1013.513.4

7 813.2 12.95

Best-first Search:Always choose the subproblem with the best lower bound

Advantages:Examines potentially good nodes Uniformly tighten bounds

Disadvantages:Re-optimization is more expensiveTree tends to be larger

1313.25 6

z =120

12.5 12.8

12.85

1 2

3 4

Modern commercial solvers use a combination of depth-first and best-first.

13.3

Page 45: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Special Branching Schemes

Special Ordered Sets 1 (SOS1): xi ≥ 0 AND x1 + x2 + x3 + x4 + x5 = 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):xi ≥ 0 AND x1 + x2 + x3 + x4 + x5 = 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 = 1x5 = 1

or

Page 46: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Pre­processing

Preprocessing applies simple logic to reformulate and tighten the LP relaxationFor MIP problems is better to spend extra time initially to reduce the possibility of long runs

Generate Boundse.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 ConstraintsIf Li ≤ Axi ≤ Ui (for l ≤ x ≤ u) then Axi ≤ bi is redundant if Ui ≤ bi and is infeasible for Li < bi.

Probing

Temporarily set a 0-1 variable to 0 or 1 and then redo the logical testing.

5x1 + 3x2 ≥ 4 becomes infeasible when x1=0⇒ x1=1 in every feasible solution

5x1 + 4x2 + x3 ≤ 8 If x1=1 then x2=0 and vice versa ⇒ x1 + x2 ≤ 1

2x1 + x2 + x3 ≥ 1 becomes strictly redundant when x1=1.⇒ Can be replaced by x1 + x2 + x3 ≥ 1

(1, 0.75, 0)

(0.5, 0, 0)

(0.8, 0)

Page 47: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Pre­processing

In summary preprocessing:Improves bounds Identifies infeasibility and redundant constraintsFixes variablesGenerates new valid inequalitiesTightens 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 doing2. Saving and preprocessing implication and clique tables3. Full probing on the matrix

Common strategy:1. Generate clique and implication inequalities2. Store them in separate tables3. Add them to the linear program only when they are violated by the current LP solution

Page 48: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Heuristics

Solution Time proportional to tree size

Tree is large when there are many active nodes; i.e. nodes with zi < zbest = ZU

How do we keep the size of the tree small?

Try to reduce zi as fast as possible ⇒ Variable Selection Rule

Try to find large zbest as 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 zbest

e.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 feasibilityOCTANE heuristic (Balas et al., 2002)

Successive rounding heuristicsFractional variables sequentially rounded until an integral solution or infeasibility is detectedEquivalent to “diving” in the b&b tree: branching on a variable and examine only one child

Page 49: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Motivation for Branch­and­Cut

x1

x2

0 1 2 3

1

0

max 3x1 + 4x2 (M)4x1+3x2 ≤ 10x1∈{0,1,2,3}, x2∈{0,1}

IP Feasible Region X

x1

x2

0 1 2 3

1

0

LP Relaxation Feasible Region

x1

x2

0 1 2 3

1

0

Convex Hull of IP Feasible Region

max 3x1 + 4x2 (M)4x1+3x2 ≤ 10x1∈{0,1,2,3}, x2∈{0,1}

max 3x1 + 4x2 (M)4x1+3x2 ≤ 10x1∈{0,1,2,3}, x2∈{0,1}

Page 50: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Valid Inequalities and Cutting Planes

x1

x2

0 1 2 3

1

0

LP Relaxation Feasible Region

Facet

Valid Inequality

Cutting Plane

x1

x2

0 1 2 3

1

0

4x1 + 3x2 ≤ 10⇒ x1 ≤ 2

If we have CH(X) we solve just one LPWe need facet defining inequalitiesHas been done for some problemsIn general very difficultTry to approximate insteadFind cutting planes

Page 51: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Gomory­Chvatal Inequalities

Original inequality (ith row):

Σj aij xj ≤ bi (1)

If all the variables in (1) are non-negative integers then the GC inequality is given by:

Σj ⎣aij⎦ xj ≤ ⎣bi⎦ (2)

A GC inequality can be derived by the LP optimal simplex table from a row with a fractional variablePure IP’s can be solved by successively adding GC inequalities to the optimal LP solution

Examples:x1 + x2 ≤ 1.5 ⇒ x1 + x2 ≤ 1 Cuts-off (0.75, 0.75)

x1 + 0.75x2 ≤ 2.5 ⇒ x1 ≤ 2.5 Cuts-off (2.5, 0)

1.5x1 + x2 ≤ 2 ⇒ x1 + x2 ≤ 2 Not tighter

Page 52: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Cover Inequalities

Example:5x1 + 5x2 + 4x3 ≤ 8 ⇒ x1 + x2 ≤ 1 Cuts-off (1, 0.5, 0), (0.5, 1, 0)

⇒ x2 + x3 ≤ 1 Cuts-off (0, 1, 0.5), (0, 0.5, 1)⇒ x1 + x2 + x3 ≤ 1 Lifted tighter inequality: Gives the Convex Hull

Original knapsack inequality:

Σj∈J aj xj ≤ b, xj∈{0,1} (1)

Let C be a subset of J such that Σj∈C aj > b. Then a valid cover inequality is given by:

Σj∈C xj ≤ |C| - 1 xj∈{0,1} (2)

We have to separate cover inequalitiesCover inequalities can be made tighter by lifting; i.e. including coefficients for j∉C.

Page 53: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example Revisited

x1

x2

0 1 2 3

1

0

x1

x2

0 1 2 3

1

0

Gomory-Chvatal Inequality:4x1 + 3x2 ≤ 10

x1 + 0.75x2 ≤ 2.5x1 + ⎣0.75⎦ x2 ≤ ⎣2.5⎦

⇒ x1 ≤ 2

max 3x1 + 4x24x1+3x2 ≤ 10 x1∈{0,1,2,3}, x2∈{0,1}

⇒4x1+3x2 ≤ 10

0 ≤ x1 ≤ 30 ≤ x2 ≤ 1

x1

x2

1

0

Cover Inequalities:4x1 + 3x2 ≤ 10

Three units of x1 is a cover: x1 ≤ 2Lifted cover inequality: x1 + x2 ≤ 2

0 1 2 3

Page 54: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­Cut Algorithm

CP(1)CP(2)

CP(3)

zLP(1)

Root Node(1)

zLP(2)

(2)

zLP(3)

(3)

Page 55: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­Cut Algorithm

Root Node(1)

(2)

(3)

zLP(4)

(4)x1≤1

zLP(5)

(5)x1≥2

zLP(6)

(6)

zLP(7)

(7)

zLP(8)

(8)

Page 56: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

MIP Computational History: 1950 ­ 1998

1954: Dantzig, Fulkerson, S. Johnson: 42 city TSPSolved to optimality using cutting planes and LP

1957: GomoryCutting plane algorithm: A complete solution

1960: Land, Doig; 1965 DakinBranch-and-bound (B&B)

1971: MPSX/370, Benichou et al.1972: UMPIRE, Forrest, Hirst, Tomlin1972 – 1998: Good B&B remained the state-of-the-art in commercial codes, in spite of• 1973 Padberg• 1974 Balas (disjunctive programming)• 1983 Crowder, Johnson, Padberg: PIPX, pure 0/1 MIP• 1987 Van Roy and Wolsey: MPSARX, mixed 0/1 MIP• Grötschel, Padberg, Rinaldi …TSP (120, 666, 2392 city models solved)

Page 57: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

MIP Computational History: 1998 ­ Date

Linear programming• Stable, robust dual simplex

Variable/node selection• Influenced by traveling salesman problem

Primal heuristics• 8 different tried at root node; retried based upon success• Construction & improvement heuristics• Relaxation-induced neighbor search

Node pre-solve• Fast, incremental bound strengthening (very similar to Constraint Programming)

Presolve – numerous small ideas• Probing in constraints:

∑ xj ≤ (∑ uj) y, y = 0/1xj ≤ ujy (for all j)

Cutting planes• Cliques, disjunctive, flow covers, Gomory, GUB covers, knapsack covers, implied

bounds, mix-integer rounding, path cuts, etc. • Aggregation • …

Page 58: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Computational Progress

* Bixby, Fenelon, Gu, Rothberg, Wunderling. A New Generation of MIP Codes, IP Conference in Honor of Egon Balas, June 3-5 2002, Carnegie Mellon University, Pittsburgh, PA

• AlgorithmsPrimal simplex in 1988 versus best(primal,dual,barrier) today 2,360x

• Machines 800x• Net: Algorithm * Machine ~ 1,900,000x

Page 59: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Computational Progress

California Unit Commitment – 7 Day ModelUNITCAL_7: 48939 cons, 25755 vars (2856 binary)Previous attempts (by model formulator): 2 Day model: 8 hours, no progress

7 Day model: 1 hour to solve initial LP

CPLEX 8.0 on 2.0 GHz Pentium 4 Running defaults ...

Reduced MIP has 38872 rows, 19989 columns, and 105612 nonzeros.MIP emphasis: balance optimality and feasibilityRoot relaxation solution time = 6.70 sec.

Nodes Cuts/Node Left Objective IInf Best Integer Best Node ItCnt Gap

0 0 1.9396e+07 781 1.9396e+07 19505 1.9472e+07 354 Cuts: 1220 21719 1.9529e+07 358 Cuts: 1260 25122 1.9559e+07 345 Cuts: 555 27311 1.9566e+07 399 Cuts: 313 28751 1.9570e+07 363 Cuts: 266 30151

* 0+ 0 0 2.0669e+07 1.9570e+07 30151 5.32%* 150+ 43 0 1.9648e+07 1.9591e+07 47897 0.29%* 150+ 43 0 1.9646e+07 1.9591e+07 47897 0.28%* 850+ 294 0 1.9645e+07 1.9618e+07 98212 0.14%* 930+ 143 0 1.9638e+07 1.9618e+07 102700 0.10%* 1550+ 278 0 1.9636e+07 1.9627e+07 127050 0.04%

GUB cover cuts applied: 2Clique cuts applied: 27Cover cuts applied: 4Implied bound cuts applied: 1038Flow cuts applied: 1019Flow path cuts applied: 5Gomory fractional cuts applied: 152

Integer optimal, tolerance (0.0001/1e-06) : Objective = 1.9635572051e+07Current MIP best bound = 1.9633624784e+07 (gap = 1947.27, 0.01%)Solution time = 724.41 sec. Iterations = 174362 Nodes = 3575 (1104)

Page 60: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Computational Progress

A customer model: 44 cons, 51 vars, 167 nzs, maximization51 general integer variables (and no bounds)

Branch-and-cut: Initial integer solution -2186.0Initial upper bound -1379.4…after 1.4 days, 32,000,000 B&C nodes, 5.5 Gig treeInteger solution and bound: UNCHANGED

What’s wrong? Free vars chase each other off to infinity.

Maximize x + y + z

Subject To2 x + 2 y ≤ 1z = 0x free y freex,y integer

This problem can be solved in several waysEuclidean reduction on the constraint [Presolve]Removing z=0, objective is integral [Presolve]Locally valid cuts at the nodes

However: Branch-and-bound cannot solve!!!

Page 61: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 62: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Solve Hard Problems?

Traditional Approaches

Better models

Better solvers

Customized methods•Decomposition algorithms

•Problem‐specific algorithms

New and emerging trend

Exploiting computational power – parallel computing

Page 63: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Better Models ­ I

The “Pigeon Hole” problem:There are n+1 pigeons and n holes. We want to place all pigeons in the holes but in such way that no pair of pigeons is in the same hole.Infeasible, but how is the branch and bound tree ?

Let xij=1 if pigeon i is in hole j.Assignment of every pigeon in a hole: Σj xij = 1 ∀iNo pair of pigeons in the same hole: xij + xkj ≤ 1 ∀j, ∀i,k | i<k

• Feasible LP relaxation: xij=1/n• LP rel. feasible after branching• Total enumeration is needed

Alternative FormulationAssignment of every pigeon in a hole: Σj xij = 1 ∀iAt most one pigeon at each hole: Σi xij ≤ 1 ∀j

• Replace n3 constraints (2 var’s) with n constraints (n+1 var’s)⇒ INFEASIBLE LP relaxation

Page 64: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Better Models ­ II

The discrete time, finite horizon, economic lot‐sizing problemThere is a given demand dt for each period t which can be satisfied by production in any period t’ ≤ t.For each period there is a production cost, a holding cost and a setup cost (if production occurs).

yt: production in period tst: inventory in period txt = 1 if production occurs at t

yt ≤ Dt xt = (Σt’=t..T dt’ )xt ∀tst = st-1 + yt – dt ∀t

Optimal LP relaxation: fractional: xt = yt /Dt

ytt’: production in period t for demand at t’xt = 1 if production occurs at t

Σt=1..t’ ytt’ = dt’ ∀t’ytt’ ≤ dt’ xt ∀t’, ∀t≤t’

Optimal LP relaxation: ⇒ LP solution is also MIP solution

Page 65: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Stronger Formulations Using Cutting Planes Ideas

(0, 3.5)

x + y ≥ 3.5, x, y ≥ 0, y integral

4.0

y

2.0

3.0

1.0

3.01.0 2.0 x4.0

Page 66: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Stronger Formulations Using Cutting Planes Ideas

4.0

y

2.0

3.0

1.0

3.01.0 2.0 x4.0

Mixed-integer Rounding cut:2x + y ≥ 4

y ≥ ⎡3.5⎤

y ≤ ⎣3.5⎦

x + y ≥ 3.5, x, y ≥ 0, y integral

Page 67: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Solve Hard Problems?

Traditional Approaches

Better models

Better solvers

Customized methods•Decomposition algorithms

•Problem‐specific algorithms

New and emerging trend

Exploiting computational power – parallel computing

Page 68: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Guide Search?

Guess correct branching binary Heuristic: Choose fractional variable closest to 0.5Does it always work?

×

x2

x1

z

Branching on x1

Branching on x2

No, try to find the sensitivities for x1 and x2.How???

0

1

1

Page 69: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branching Using Pseudocosts

x10 1x1*

z

d1 u1

We want to choose the variable with the maximum min {dj, uj}Degradations dj and uj can be estimated from dual simplex method: = (reduced cost)×changeChoose the variable with the maximum estimated degradation

x20 1x2*

zd2 u2

Choose x2 although x1 is closer to 0.5

Page 70: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Strong Branching

10

12.5 13.5

[0.1, 0, 0.5, 0.6, 0.8]

x 3= 0

x3 = 1

[0.1, 1, 0, 0.5, 0.2] [0.3, 0, 1, 0.4, 0.6]

10

[0.1, 0, 0.6, 0.4, 0.3]

x 3= 0

x3 = 1

12 13

10

[0.1, 0, 0.6, 0.4, 0.3]

x 1= 0

x1 = 1

11 14

10

[0.1, 0, 0.6, 0.4, 0.3]

x 4= 0

x4 = 1

12.5 13

10

[0.1, 0, 0.6, 0.4, 0.3]

x 5= 0

x5 = 1

14 11.5

But the reduced cost (dual value) is valid only for small perturbationsCan we do better than this, i.e. can we get a better estimate of the impact of adding xj = 0 and xj = 1?

Choose a subset of fractional binariesFor each chosen binary fix to xj = 0 and xj = 1 and start solving resulting LP’s.Stop after a fixed number of Simplex iterationsChoose the binary that led to poor subproblems

Page 71: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

OK, …What Can We Do Realistically?

Pseudo-costs, strong branching, all variants of node selection rules (depth-first, best-first, etc.), heuristics and other exotic methods have been implemented in existing software

Even if we knew how to implement all of them ourselves, it would be difficult to do it more efficiently than their implementation within CPLEX, Xpress, etc.

But …, knowing what these methods do allows us to use them, or know how/when to use them

Main point of this subsection:

Before you start developing a new method make sure that you are not re-inventing the wheel

Understand the problem and which of the existing methods can help

Find corresponding solver options

Experiment …

Page 72: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Solve Hard Problems?

Traditional Approaches

Better models

Better solvers

Customized methods• Decomposition algorithms

• Problem-specific algorithms

New and emerging trend

Exploiting computational power – parallel computing

Page 73: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Decomposition

x1=2x2=1x3=1x4=2x5=3

x1+2x2+2x3 = 62x1+ x2 + x3 = 6

3x2+4x3 = 7x3+3x4+ x5 = 8

x4+2x5 = 8

Algebra

Solution time: 2N

(M) → 210 = 1024 sec(Μ1) & (Μ2) → 26+26 = 128 sec

M1

M2

Underdetermined ⇒ Many solutions⇒ Solve (M1) & (M2) many times

Optimization

Basic Decomposition Idea

Key Issues• How do we decompose?

• Which constraints do we keep/remove?• How do we iterate?

• What type of information from (M2) can we use to guide the solution of (M1)?• How do we pass this information?

• How do we solve models M1 and M2?• Submodels (M1) and (M2) may be different (e.g. MIP vs. LP)• Do we have to use the same algorithm?• If not, how do we make them compatible?

Page 74: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Lagrangean Relaxation

Consider the problem:min z = cTx (P)s.t. Ax ≤ b (1)

Dx ≤ d (2)x∈X

where constraints in eq. (1) are “nice”, but constraints in eq. (2) are “hard”.

Our goal is to develop an easy subproblem that does not violate eq. (2) substantially.min z = cTx + u(Dx-d) (LR)s.t. Ax ≤ b (1)

x∈X, u ≥ 0For every u ≥ 0, (LR) is a relaxation of (P) because a) the feasible region of (LR) is greater, andb) the objective value of (P) is always greater than the one of (LR) for all feasible solutions.

Key Idea: Try to find the correct values for penalties u.What do the multipliers u look like?

If a constraint in Dx ≤ d is violated, we would like to increase u.If a constraint in Dx ≤ d is violated by a solution of (LR), this constraint would be active in (P).

⇒ u is the dual value of a violated constraint in (P).

Page 75: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Lagrangean Relaxation ­ Implementation

min z = cTx + u(Dx-d) (LR)s.t. Ax ≤ b (1)

x∈X, u ≥ 0Select K, ε, mkSet UB = +∞, LB= - ∞Start with u0 = 0

|UB-LB|<εor k=K?

Modify (LR) solution toobtain a feasible solution & UB

Solve (LR)Obtain LB

k = k+1

Return UB& Solution (LR) feasible?

Optional

Update uk:uk+1 = max {uk - mk (Dx-d),0}*mk is the step length* Subgradient optimization

YES

NO

YES

NO

Page 76: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Lagrangean Relaxation – Choice of Dual

Consider the problem: min z = cTx (P)s.t. A1x ≤ b1 (1)

A2x ≤ b2 (2) A3x ≤ b3 (3) x∈X

Which constraints should be dualized?

Key issues:The strength of the resulting Lagrangian dual bound LBThe ease of solution of the Lagrangian problem (LR)

IPIIP

P

x1

x2

IIIP

(a) LP-relaxation of (M3): P=PI∩PII∩PIII

CH

IPIIP

1LRP

x1

x2 CHLR1

(b) Dualization of AIIIx = eIII: PLR1 = PI∩PII

IIP2LRP

x1

x2

IIIP

(c) Dualization of AIx = eI: PLR1 = PII∩PIII

CHLR2

: feasible regions defined by subsets of constraints; : integer points; : feasible integer points; : convex hull of feasible integer points; : intersection of constraint subsets.

Page 77: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Lagrangean Relaxation ­ Remarks

min z = cTx + u(Dx-d) (LR)s.t. Ax ≤ b (1)

x∈X, u ≥ 0

min z = cTx (P)s.t. Ax ≤ b (1)

Dx ≤ d (2)x∈X

Hard constraints are inequalities

min z = cTx (P)s.t. Ax ≤ b (1)

Dx = d (2)x∈X

Hard constraints are equalities

?

min z = cTx + u(Dx-d) (LR)s.t. Ax ≤ b (1)

x∈X

Page 78: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Lagrangean Relaxation ­ Example

min z = cTxs.t. Ax ≤ b (1)

Dtx ≤ dt t=1, …T (2)x∈X

min z = cTx + u(Ax-b)s.t. Dtx ≤ dt t=1, …T (2)

x∈X, u ≥ 0

Dualize linkingconstraints

Structure of original model:Independent blocks with linking constraints

Independent unit models + flow constraintsMulti-period models with inventory constraintsAssignment + sequencing constraints

Lagrangian relaxation (LR) easy to solve

Page 79: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Bender’s Decomposition

Structure of original model:Independent blocks with linking variables

Stochastic programming: here-and-now & wait-and-see decisionsHierarchical decisions

How can we decompose the problem?

max c0 x + Σk ck xxA0x = b0 (1)Akx + Bkyk = bk, k=1,…,K (2)

Benders Decomposition

1. Solve problem master problem (MP): A0x = b0

2. Fix linking variables x3. Solve K decomposed problems Bkyk = bk – Akx4. Generate cuts and add them to (MP)

Cuts are generated from dual information5. Check convergence; if not go to 1

“Bender’s decomposition lends itself well to parallelization” …

Page 80: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Hybrid Methods

Consider the problem:min z = cTx (P)s.t. Ax ≤ e (1)

Bx + Dy≤ f (2)x∈X, y∈Y

where constraints in eq. (2) are “hard” for mathematical programming but “easy” if we use a different solution method.

x y1234

min cxs.t. Ax ≤ e

g(x,y) ≤ 0 x∈X, y∈Y

Hybrid Model

Relaxed Model (RM)Lower Bound

Remove Constraints

min cxs.t. Ax ≤ e

x∈X

Subproblem (SM)

Upper Bound

(Feasible )

Add Constraints

min cxs.t. Ax ≤ e

x = xk

g(x,y) ≤ 0 x∈X, y∈Y

min cx (RM)s.t. Ax ≤ e

x∈X

g(xk, y) ≤ 0 (SM)y∈Y

x = xk x∉X

Page 81: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Solve Hard Problems?

Traditional Approaches

Better models

Better solvers

Customized methods• Decomposition algorithms

• Problem-specific algorithms

New and emerging trend

Exploiting computational power – parallel computing

Page 82: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

What Is Parallel Computing?

Multiple CPUs on a machine

Multiple machines located close by

Multiple machines distributed globally

Multiple machines distributed globally

GridComputing

DistributedComputing

ClusterComputing

ParallelProcessing

ParallelComputing

Page 83: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Parallel Integer Programming

LP-based branch-and-bound has inherent structure for parallelization• Subproblems associated with each node are independent• Evaluate nodes simultaneously

Fundamental issue for parallelizing branch-and-cut: Management of cuts• Minimize cut generation time: do not develop same cuts several times• Maximize useful sharing: pass relevant cuts• Avoid flooding the communication system with cuts

×

Nodes solved at the master computer

Information flow: master → slave• Subproblem formulation• Variable bounds

Information flow: slave → master• New feasible solutions• Current lower bound• Global cutting planes

Page 84: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Condor Project @ UW ­Madison

Started in early 80s at CS Dept.http://www.cs.wisc.edu/condor/Manages 1000 workstations and delivers 650 CPU days on a dayGained popularity from around the world• Industry, government, academia

Agent Resource

Matchmaker

Shadow Sandbox

ProblemSolver

Page 85: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Implementation Challenges*

Theoretical foundations well-known and well documentedMany algorithmic and implementation issues need to be resolved

Example: Cut ManagementThe addition of cuts results in smaller trees BUTExtra time spent in generating cuts (regardless of whether all cuts are used)Extra time spent on solving LP’s at each node

Questions: When to generate cuts and how many?Which cuts (if any) to add to the active linear problem?When to delete previously generated cuts?

Basic ideas: Generate cuts only every k1 nodesPerform only k2 rounds of cut generationHave only limited number of active cuts; keep inactive cuts in the “cut pool”

Basic Management Scheme:1. Solve the active linear program2. Identify inactive cuts; delete them from the active LP; add them to the cut pool3. Search the cut pool for violated cuts; add a subset to the active LP and go to 14. Generate violated cuts. Add them to the cut pool and go to 1

* Johnson, E.L. Progress in Linear Programming-Based Algorithms for Integer Programming: An Exposition. INFORMS Journal on Computing, Vol. 12, No 1, Winter 2000

Page 86: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Promising Research Areas*

* Johnson, E.L. Progress in Linear Programming-Based Algorithms for Integer Programming: An Exposition. INFORMS Journal on Computing, Vol. 12, No 1, Winter 2000

Applications

Robust models that integrate planning and operationsMassively large, multi-period problemsMulti-scenario stochastic problems; long solution times may be acceptableRecourse models that correct in real-time planning solutionsHave to be solved in minutes

MethodsParallel Integer Programming• LP-based branch-and-bound is a natural candidate for parallelization

Subproblems associated with each node are independent; evaluate nodes simultaneously• Fundamental issue for parallelizing branch-and-cut: Management of cuts

Integration between heuristic and cutting planes

Integration with local search and constraint programming

Page 87: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 88: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Software Overview

Papers usually focus on How_to_Solve_a_ProblemHow_to_solve_a_problem is only a single step of the overall processModeling life-cycle

1. Develop the model2. Generate instance(s) of the model3. Solve the instance(s)4. Verify the results/model5. Modify the model

Ideally, software has to nurture the entire modeling life cycle

Two components of this “ideal” environment have received the most attention:

• The modeling module: GAMS, AIMMS, Xpress-IVE, OPL Studio

• The solver module: CPLEX, XPRESS-MP, OSL

The two modules have to communicate with each other ⇒ MPS format• All modeling modules are able to produce an MPS input file and to process an MPS output file• All solver modules are able to process an MPS input file and to produce an MPS output file.

Page 89: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Systems

Input file XXX.gms

User

LP Solver 1

LP Solver 2

NLP Solver 1

NLP Solver 2

MIP Solver 1

MIP Solver 2

MIP Solver 3

MINLP Solver

Solvers

Output file XXX.lst

GAMS

Modeling systems provide an interface with a variety of different solvers (algorithms). The user supplies a model (i.e. parameters, variables and constraints) using an easy language.The user-generated input file is compiled to generate a standard optimization file (e.g. .lp, .mps)This file is passed to the appropriate solverThe solution found by the solver is communicated back to the modeling system, and reported via an output file.A simple diagram for GAMS is shown below.

Page 90: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Solvers

There are many different solvers for each problem (LP, NLP, MINLP, etc.)Different solvers are good for different classes of problems; e.g. MINOS vs. CONOPT for NLPs

Page 91: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Systems

GAMS: Old language; limited flow control & visualization aidsCompatible with many solvers

AIMMS: New, user-friendly language; fancy interfaceCompatible with many solvers (not as many as GAMS)

Xpress-IVE: Product of Dash Optimization → Solvers of Dash OptimizationProvides tools for algorithm customization

OPL Studio: Product of ILOG → Solvers of ILOGProvides tools for algorithm customization

Enhancements

Advanced users often want to specify branching rules, customize cut generation routines, etc.

To support this functionality software developers provide callable library version of the software

Page 92: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Levels

* Irv Lustig, Embedding CPLEX Algorithms Overview

Page 93: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Levels

* Irv Lustig, Embedding CPLEX Algorithms Overview

Page 94: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Levels

* Irv Lustig, Embedding CPLEX Algorithms Overview

Page 95: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 96: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Graph Theory

A graph G is a pair (V, E) of a set of vertices V (points)  and set of edges E (lines)

Undirected graph: undirected edges, (i, j) = (j, i)

Directed graph: directed edges, (i, j) ≠ (j, i)

Network: directed graph with capacitated edges

If i, j∈V, then (i, j)∈E is an edge; i is the tail, j is the head. 

Graph G1 = (V1, E1)V1 = {u, v, w, z}E1 = {(u, v), (u, w), (v, w), (v, z), (w, z)} E1 = {a, b, c, d, e}

u v

z w

a

bc

d

e

Page 97: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Graph Theory

A graph G is a pair (V, E) of a set of vertices V (points)  and set of edges E (lines)

Undirected graph: undirected edges, (i, j) = (j, i)

Directed graph: directed edges, (i, j) ≠ (j, i)

Network: directed graph with capacitated edges

If i, j∈V, then (i, j)∈E is an edge; i is the tail, j is the head. 

Representation of Graphs and NetworksA vertex i is incident to an edge (i, j)Incidence matrix: Nodes in Rows, edges in columns – 1 if a node is incident to an edge

In directed graphs, incident matrix has a ‐1 for the tail and +1 for the head

u

⎥⎥⎥⎥

⎢⎢⎢⎢

11111

11111

),(),(),(),(),(

zwvu

zwzvwvwuvu

v

z w

a

bc

d

e

1

3

2

4

⎥⎥⎥⎥

⎢⎢⎢⎢

−−+−+

+−−+++−

11111

1111111

4321

)2,4()1,4()4,3()3,2()1,2()2,1(

Digraph G2 = (V2, E2)V1 = {1, 2, 3, 4}E1 = {(1, 2), (2, 1), (2, 3), (3, 4),

(4, 1), (4, 2)}

1

3

2

4

Page 98: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Familiar Combinatorial Optimization Problems

Traveling Salesman ProblemThere are n cities to be visited exactly once by a traveling salesman;the distance/cost from city i to city j is cij.Find the Hamiltonian of minimum total distance/costProblem appears in 1830s; treated mathematically in 1930s (Menger)One of the most intensively studied problem in optimizationNo effective algorithm existsIt was shown it is NP-hard (Karp, 1972)

Integer programming formulationSubtour elimination: for every V1,V2: V = V1∪V2, V1∩V2 = ∅ensure there is an edge between V1 and V2. Exponential number of subtour elimination constraintsIP formulation very hard

xij = 1 if we visit city j after city i

∑ji

ijij xc,

min

ixj

ji ∀=∑ 1 There is an incoming edge

jixij ,}1,0{ ∀∈

ixj

ij ∀=∑ 1 There is an outgoing edge

Subtour elimination constraints

Page 99: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Familiar Combinatorial Optimization Problems

MatchingsGiven a graph G = (V, E), a matching M in G is a set of pairwisenon-adjacent edges; i.e., no two edges share a common vertex.Find a matching that contains the maximum number of edges. A perfect matching is a matching which matches all verticesMatchings in bipartite graphs are related to the assignment problemFinding a maximum matching in bipartite graphs is easyFinding a maximum matching in general graphs is harderPolynomial algorithm for the general case by Edmonds (1965)

Maximum matchings

Jobs

Machines

Perfect matching in bipartite graph: solution to assignment problem

Integer programming formulationFormulation for (complete) bipartite graphs solved as LPEquivalent to assignment problem, which was solved effectively before IP formulations

∑ji

ijij xc,

max

112

VixVj

ij ∈∀=∑∈

211

VjxVi

ij ∈∀=∑∈

jixij ,}1,0{ ∀∈

xij = 1 if edge (i,j) is selected

Page 100: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Familiar Combinatorial Optimization Problems

MatchingsGiven a graph G = (V, E), a matching M in G is a set of pairwisenon-adjacent edges; i.e., no two edges share a common vertex.Find a matching that contains the maximum number of edges. A perfect matching is a matching which matches all verticesMatchings in bipartite graphs are related to the assignment problemFinding a maximum matching in bipartite graphs is easyFinding a maximum matching in general graphs is harderPolynomial algorithm for the general case by Edmonds (1965)

Maximum matchings

Jobs

Machines

Perfect matching in bipartite graph: solution to assignment problem

Integer programming formulationFormulation for (complete) bipartite graphs solved as LPEquivalent to assignment problem, which was solved effectively before IP formulationsOdd-set constraints: for vertex subset U⊂V: |U| > 2Problem solved as LP if all odd-set constraints are added

∑e

ee xcmax

ixiδe

e ∀≤∑∈

1)(

exe ∀∈ }1,0{

xe = 1 if edge e is selected

VUUxUEe

e ⊂∀⎥⎦⎥

⎢⎣⎢≤∑

∈ 2||

)(

Odd‐setconstraints

Page 101: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Integer Programming and Combinatorial Optimization

Hard combinatorial optimization problems have also hard IP formulations

Algorithmically well‐solved combinatorial problems have good IP formulations

Network problems are easy also as LP/IP models

Have other types of problems similar structures?

Can we formulate other problems as network problems?

Can we generalize what we learnt from networks to general MIP models?

Why network problems are so easy?

Page 102: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Polytopes and Integrality

Definition 1. A polyhedron P is the solution set of a finite system of linear inequalities, i.e. P = {x: Ax ≤ b}. 

Definition 2. A polyhedron P is a polytope (i.e. a bounded polyhedron) if there exist l, u ∈ Rn such thatl ≤ x ≤ u; i.e. P = {x: Ax ≤ b, l ≤ x ≤ u for l, u ∈ Rn}. 

Definition 3. A nonempty polyhedron is integral if its vertices are integral.

Polyhedron Polytope Integral PolytopeP = {x: Ax = b}

Remarks 

1)  A set of inequalities can be converted into a set of equalities by introducing slack variables, and a set of equalities Ax = b can be converted into a set of inequalities ([A, ‐A]T x ≤ [b –b]T). 

2)  A polyhedron can be described by a set of linear equalities, P = {x: Ax = b }, and a polytope can be described by a set of linear equalities and bounding inequalities, P = {x: Ax = b, l ≤ x ≤ u}. 

3)  A popytope can also be described as the convex hull of a finite number of points. Conversely, the convex hull of a finite number of points is a polytope.

4)  A vector v of a polyhedron is a vertex (extreme point) if and only if it cannot be written as a linearcombination of points in P\{v}. A polytope P is the convex hull of its vertices.

Page 103: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Polytopes and Integrality

Theorem 1.  The polyhedron P(A, b) = {x: Ax ≤ b, x ≥ 0} is integral for all integral vectors b∈Zm if and only if A is totally unimodular (Hoffman & Kruskal, 1956). 

Proposition 1. If A is TU and vectors b, b’, d and d’ are integral, then P(b, b’, d, d’) = {x∈: b’ ≤ Ax ≤ b, d’≤ x ≤ d} is integral if it is not empty. 

Definition 4.  An integral matrix A is totally unimodular (TU) if the determinant of each square submatrix of A is equal to 0, 1, or ‐1.

Proposition 2. For every non‐singular submatrix R of a TU matrix, R‐1 is integral. 

Integral Polytope

P = {x: Ax = b}

A totally unimodularProposition 3Proposition 4.  .  . 

Proposition 3. A {0, 1} matrix is an intervalmatrix (or has the consecutive 1’s property) if for all rows with alm = al’m = 1, l < l’, implies al”m = 1 for l < l” < l’. Interval matrices are TU (Fulkerson & Gross, 1965). 

Proposition 4. If a {0, ±1} matrix has no more than two non zero coefficients in each column, and Σl alm = 0 if column m has two coefficients, then A is TU (from Ghouila‐Houri, 1962). 

Page 104: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Networks and Integrality

Very few problems can be formulated using constraints that lead to TU matrices

Side constraints destroy the structure

Can we develop tighter formulations from combinatorial optimization insight?

If yes, can we add these constraints in our formulation immediately?

Proposition 4.  If a {0, ±1} matrix has no more than two non zero coefficients in each column, and Σl alm = 0 if column m has two coefficients, then A is TU (from Ghouila‐Houri, 1962). 

1 2

34

⎥⎥⎥

⎢⎢⎢

−−−

−−−

=

11111

1111111

4321

)2,4()1,4()4,3()3,2()1,2()2,1(

A

Incidence matrix of networks satisfies this conditionMatrix A is used to express flow balance constraints in shortest‐path, max‐flow problems

Page 105: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 106: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Supply Chain Planning Matrix (Meyr et al., 2002)

procurement production distribution sales

Purchasing& Material

RequirementsPlanning

DistributionPlanning

TransportPlanning

DemandPlanning

Demand Fulfillment

Long‐term

Medium‐term

Short‐term

Strategic Planning

Master Planning

Scheduling

ProductionPlanning

Integration across time scales and functionsMany new interesting problems

Power – industrial gases – steel SC Oil – industrial gases – chemicals SCunder power constraintsBiomass to fuels and chemicals

As chemical engineers, we know the specifics of chemical productionStudy all problems (time‐scales) of manufacturing function

Page 107: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Manufacturing Function

Strategic Planning• Network of plants/warehouses/markets• What new plants/warehouses to build?• What are the interconnections?• Investment/retrofit costs

Production Profiles

0

2

4

6

8

0 2 4 6 8 10 12 Time (months)

Production (tn/month) 1

Pr. A Pr. B Pr. C

Production Planning • Network of existing production facilities• Where/when is a product produced? • Production and inventory profile of products• Transportation/holding costs• Aggregate plant capacities

Scheduling • Single site/plant• How do we optimally use our resources?• Batch-sizes, storage policies, sequencing• Utility/changeover costs

Reaction 1

Time (days)

Reactor 1Reactor 2Column

Reaction 2Reaction 3

SeparationReaction 1

Heating

PacificNorthwest

Southwest

South

RockiesNortheast

Manufacturing sitesWarehousesMarkets

Midwest

Southeast

Page 108: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Scheduling

Allocation of limited resources to tasks over time- Michael Pinedo

Scheduling has been practiced in manufacturing sectors since early 20th centuryFirst scheduling publications in the early 1950

– Naval Research Logistics Quarterly

Closely related to the growth of computers and algorithms– Research in 1970s – Complexity theory

Scheduling has widespread applications– Airlines industry– Shipping industry– Railways– Manufacturing/production/any Industry– Government / non-government Organizations– Educational/Research Institutions– Sports / Recreation

Purely multi-disciplinary– Computer Scientists, Operations researchers, mathematicians, business science, etc.

Very challenging problem– 8 unsolved problem instances in MIPLIB 2003– Instance timtab2 (railway timetabling problem) has seen no optimal solution yet

10% gap even after several days, 113 Binaries, 381 Continuous

Page 109: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Preliminaries

Single-Stage SchedulingN jobs to be processed in M machines

Assignment of jobs to machines Sequencing of jobs in the same machinepij , cij , sii

Resources(e.g. machines)

task1

task4

task1

task2

task4

task2

task2

task5

task2

task4

task3

task5

task3

0 10 20 30 40

M5

M4

M3

M2

M1

Time (min/hr/day)

Page 110: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Classes of Scheduling Problems

Machine environment• Single machine• Parallel machines• Machines in series

Processing characteristics• Preemption• Release/due times• Setup times

Objective • Makespan• Tardiness• Cost

α / β / γ

Single machine

M

A

B

C

B CA

D

D

M1

B

A

M2

M1

M2

C

D

A

B

C

Dmakespan

dA

tardiness

Sequence-dependentSetup time

jobs

Parallel machines

jobs

Page 111: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Chemical Production Scheduling

• Jobs ⇒ Batches (sometimes orders)• Operations ⇒ Stages or Tasks• Machines ⇒ Units

• Modeling of storage is important (solid, liquid and gas phases)⇒ Storage vessels & states

• Utilities are also important (steam, water, electricity)⇒ Utilities (or resources)

• No Preemption• Variable Processing Times• Changeover times

Page 112: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Classification of Chemical Production Scheduling Problems

Network (multi-purpose) processes

Batch splitting/mixing; recycle streamsUtility requirements

⇒ Links between seemingly independent tasks⇒ Need to account for variable no of batches via common time representation

F1 S1 Int1 S3P1

P2

P3F2 S5 Int2

S4ADD

S6

95%

5% 10%

90% 50%

50%

. . . . . . . . . . . .

Orders 1st stage 2nd stage Kth stage(batches) J1 J2 JK

FinishedOrders

Multi-stage processesSequential structure:Orders := batches i∈IStages k∈K = {1,2, …K}Units j∈J = J1∪J2∪ …JK

Special Cases:Single-stage: K = 1Flow-shop: |J1|= …=|JK|=1

Page 113: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Batch­based Approaches

Goal: Exploit sequential structure of multi‐stage processesApproach: Predefine number of batches (lot‐sizing, batching, task selection)

Solve fixed scheduling problem

Demand (orders)A

B

C

BatchesA

B

C

. . .Batches i∈IStages k∈KUnits j∈J

Batching Scheduling

Xij = 1 if task i is assigned to unit jYii’j = 1 if batch i precedes batch i’ in unit jTik = Finish time of batch i in stage kv

Scheduling FormulationsPrecedence­basedPinto & Grossmann, 1995; Lamba & Karimi, 2002

Tasks (i) Units (j)

Xij Yii’j

Xij = 1 if task i is assigned to unit jYijm = 1 if batch i is assigned to slot m of jTik = Finish time of slot m of unit jTtik = Transfer time k → k+1

Tasks (i)Xij → Yii’j

Slot­basedHui & Gupta, 2000; Mendez et al. 2001

Page 114: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Network­based Approaches

Goal: Model multi-purpose batch processesAccount for batch splitting/mixing; recycle streams; utility requirements

Approach: Use a common time coordinateExpress assignment and balance constraints for every time point/period/event

Discrete-time FormulationsKondili et al. (1993); Pantelides (1994)

RM IntA

BT1

T2

T3

2.0 hr1.5 hr3.0 hr

Δt = 0.5 hr

Tasks i∈IUnits j∈JStates s∈SUtilities u∈U

Time points/periods t∈T

T1T2T3

0 1 2 3 4 5 6 7 8 t (hr)

Wijt = 1 if task i starts in unit j at time point tBijt = Batch-size of task i in unit j at time point tSst = Amount of state s at time point tUut = Consumption of utility u at time t

tjWj

i

Ii

pt

tt tij ,11ˆ ˆ ∀≤∑ ∑∈

+−

= iMAX

ijijtijtMIN

ijijt KjtiVWBVW ∈∀≤≤ ,,

tsSBBSTST MAXsTi Kj ijtisTi Kj ptijisstst

s is i is,,1 ∀≤−+= ∑ ∑∑ ∑ ∈ ∈∈ ∈ −− ρρ

tuUBWU MAXut Kj

pijtuiijtuiut

i

i ,)(10

∀≤+= ∑ ∑ ∑∈

= −−θ θθθθ βα

Assignment:

Mass Balance:

Utility:

Variables defined ∀t∈TConstraints expressed ∀t∈T

Large MIP modelsConstant processing times

Page 115: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Problems ­ 1

1. Singe-unit problemFind the schedule that yields the minimum total completion time (makespan)

Batches i∈I = {1, 2, …, N}Processing time: τiRelease/due times: ri/di

1.1. Single-unit with release/due timesSame as 1, but batches have release/due dates. The objective is the minimization of makespan

1.2. Single-unit and changeover timesSame as 1 but there are changeover times between batchesThe objective is the minimization of makespan

1.3. Single-unit and changeover costsSame as 1.2 but there are changeover costs between batchesThe objective is the minimization of cost

M

A

B

C

D

Page 116: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Problems ­ 2

2. Singe-stage (multi-unit) problemN batches have to be processed in a single stage that consists of M parallel units. Find the schedule that yields the minimum total completion time (makespan)

Batches i∈I = {1, 2, …, N}Units j∈J = {1, 2, … , M}Processing time: τijProcessing cost: cijRelease/due times: ri/di

2.1. Single-stage problem with release/due timesSame as 2, but batches have release/due datesThe objective is the minimization of lateness/tardiness

M1

M2

A

B

C

D

2.2. Single-stage problem with changeover costs and timesSame as 2.1, but there are changeover costs γii’j and changeover times δii’j between batchesThe objective is the minimization of cost (subject to meeting the release/due times)

Page 117: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Problems ­ 3

3. Multi-stage problemN batches have to be processed in K stages; each stage has parallel units. Find the schedule that yields the minimum total completion time (makespan)

Batches i∈I = {1, 2, …, N}Units j∈J = {1, 2, … , M}Stages k∈K; Jk is the set of units in stage kProcessing time: τijProcessing cost: cijRelease/due times: ri/di

3.1. Multi-stage problem with release/due times and changeover times/costsSame as 3, but batches have release/due dates and changeoversModel the minimization of makespan, tardiness, cost and earliness

M1 M2

A

B

C

D

M3

jobs

Page 118: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Problems ­ 4

S1 S2Heat

Reaction1 Separation

Reaction 3

S3

S5

S4

S7

S6

Reaction2

1h1h

3h

2h

2h

90%10%

40%

60%70%

30%

States

Tasks

Reaction 1

Time (h)

Reactor 1Reactor 2Column

Reaction 2

Reaction 3

SeparationReaction 1

Heating

0 1 2 3 4 5 6 Time (h)

InventoryS2S3

Units

Page 119: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Scheduling: Modeling

T1T2T3

Fixed time points ‐ Constant processing times

Discrete‐time FormulationsKondili et al. (1993); Pantelides (1994)

Variable time points ‐ Variable processing times

T1T2T3

Continuous‐time FormulationsGlobal grid: Pantelides et al.; Reklaitis et al.; Lee et al.; Barbosa‐Póvoa et al.; Grossmann et al.; Karimi et al.Unit‐specific grid (events): Floudas et al.; Ierapetritou et al.; Giannelos & Georgiadis

1 2 3 4 5 6 7 (periods)

0 1 2 3 4 5 6 7 8 t (hr)

T1T2T3

Fixed time points ‐ Variable processing times

Mixed‐time FormulationMaravelias (2006)

0 1 2 3 4 5 6 7 8 t (hr)

Page 120: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Scheduling: Modeling

T1T2T3

Fixed time points ‐ Constant processing times

Discrete‐time FormulationsKondili et al. (1993); Pantelides (1994)

Variable time points ‐ Variable processing times

T1T2T3

Continuous‐time FormulationsGlobal grid: Pantelides et al.; Reklaitis et al.; Lee et al.; Barbosa‐Póvoa et al.; Grossmann et al.; Karimi et al.Unit‐specific grid (events): Floudas et al.; Ierapetritou et al.; Giannelos & Georgiadis

1 2 3 4 5 6 7 (periods)

0 1 2 3 4 5 6 7 8 t (hr)

T1T2T3

Fixed time points ‐ Variable processing times

Mixed‐time FormulationMaravelias (2006)

0 1 2 3 4 5 6 7 8 t (hr)

Page 121: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Are Smaller Formulations Better?

ABI1 CI1 ABI2 CI2

BII1 CII1

I1 I2

II1

III1

RMC

INTABI INTCI

RMAB

BIII1AIII1 CIII1 BIII2 CIII2

INTBII INTCIIIII2

A B1 C1 B2 C2

Continuous processingFive products - three stagesTime Horizon: 2 weeksIntermediate due dates, shipment datesBacklogged demand

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

DemandShipmentsBacklogs

I1 CI1 ABI1 CI1 AB

I2 ABI2 CI2 ABI2 A

II1 CII1 BII1 CII1 BII1 CII1 B

III1 AIII1 BIII1 AIII1 BIII1 CIII1 AIII1 C

III2 CIII2 BIII2 CIII2 BIII2 CIII2 Idle

0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 t (d)

Equipment Unit Gantt Chart

Page 122: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Effect of Strong Valid Inequalities

Basic STNFormulation

(C1)(C2)(C3)(C4)(C5)(C6)

(M0)

(M10) (M11) (M12) (M13) (M14) (M16) + C1,

C2, C6 + C1,

C2, C3 + C1,

C2, C4 +C1-4 + C3,

C4, C6 +C1-4,

C6 # Const. 2,315 2,179 2,179 2,247 2,111 2,383 LP-relax 2,037.3 1,964.0 2,003.7 1964.0 2,046.6 1,964.0 Objective 1,766.7 1,766.7 1,766.7 1,766.7 1,766.7 1,760.0 CPU-sec 3.8 4.9 2.9 2.6 8.1 3.8 LP-gap (%) 15.3 11.2 13.4 11.2 15.8 11.2 Nodes 275 277 176 88 646 150

Models (M11), (M12), (M13) & (M16) are studied further using a set of six problemsModel (M16) appears to be the most effective

(M0) (M1) (M2) (M3) (M4) (M5) (M6) +C1 +C2 +C3 +C4 +C5 +C6 # Const. 1,907 2,043 2,043 1,907 1,907 1,975 2,043 LP-relax 2,182.8 2,054.4 2,166.7 2,173.1 2,130.5 2,176.6 2,060.3 Objective 1,766.7 1,766.7 1,766.7 1,766.7 1,766.7 1,766.7 1,766.7 CPU-sec 62.2 12.5 12.1 15.3 10.0 46.2 9.5 LP-gap (%) 23.6 16.3 22.6 23.0 20.6 23.2 16.6 Nodes 5,689 622 1,402 1,183 758 3,210 1,297

Inequalities (C1), (C2), (C3), (C4) and (C6) appear to be the most effectiveCombinations of these inequalities are studied further

Page 123: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­Cut Algorithm: Basic Idea

Additional improvements needed for practical applicationsHow can we use remaining valid inequalities?

⇒ Branch‐and‐cut algorithm

Advantages:1. Do not load unnecessary constraints

⇒ Smaller incidence matrix⇒ Each node is solved faster 

2. Use a larger pool of constraintsTighter formulation after a few rounds of cut generation

Combines effective (LP) solution and tight formulation

Disadvantage:Very difficult to compete with CPLEX, XPRESS

Do not exploit built‐in cut generation routinesHave to write new algorithm to add user cuts 

Branch on one fractional variable

Add violated cuts ⇒ Find new (fractional) solutionPruned node

Open node

Page 124: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­cut Algorithm: Implementation

Add violated constraints C1, C4, C6, C7 and C8­C11in nodes of depth k| k3≤k≤k4

Add violated constraints C1, C4, C6 and C7in nodes of depth k| k2≤k≤k3

Implementation in XPRESS­IVE using XPRESS­MoselDo not remove/change pre‐solve and cut‐generation routinesAdd few cuts (C2, C3 & C5) at the root node to facilitate heuristicsAdd violated high priority cuts (C1, C4, C6 & C7) at the root node Allow addition of high priority cuts at nodes of intermediate depthAdd low priority cuts (C8‐C13) later

Add all C2, C3 & C5 constraints in the formulation

Add violated C1, C4, C6 and C7 constraints in k1 rounds at the root node

Page 125: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Branch­and­cut Algorithm: General Remarks

Remarks:1. Parameters k1, k2, k3 and k4 depend on the size of the problem

Typical values: 5‐10 iterations at the root node  Start adding high priority cuts after 200‐1000 nodes, at depth 20‐200Start low priority cuts at depth 100‐1,000

2. Algorithm requires fewer number of nodes, but is expensive at each nodeTo reduce overhead:Add cuts every 5‐10 nodes

Add first 2‐4 violated cuts

3. On the fly tuning necessary

Page 126: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Customized Methods

Xij = 1 if task i is assigned to unit jYii’j = 1 if batch i precedes batch i’ in unit jTik = Finish time of batch i in stage kv

Precedence­basedPinto & Grossmann, 1995; Lamba & Karimi, 2002

Tasks (i) Units (j)

Xij Yii’j

What is the problem?

( ) ( ) KkILiiYMXτTT kiikiJAj

ijijikki ∈∈∀−−+≥ ∑∈

,',1 '),(

'

Sequence-based:

jkijmjmki MmJjkiUMTsTt ≤∈>∀−+≤− ,,1,)1(1,

jkijmijmijjmik MmJjKkiUMUτTsTt ≤∈<∀−−+≥ ,,,)1(

Slot-based:

Sequencing is achieved via big-M constraints ⇒ Resulting MILP formulations are not strong

Compared to manufacturing problems:1. Unknown type and number of batches (tasks); unknown assignments of tasks to units 2. Mixing of intermediates; variable batch-size and processing time

There are good algorithms for problems with fixed type and number of tasks and fixed assignmentsCan we combine these algorithms with MILP methods?Decompose problem in two subproblems

1. Determine type and number of tasks and assignments of units to tasks2. Solve reduced problem with an efficient, problem-specific algorithm

Page 127: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Constraint Programming ­ Preliminaries

New Modeling and Solution ParadigmDeveloped in early 90’s in AIVery effective for classes of optimization problems

• Highly constrained (feasibility) problems• Some scheduling problems

Special “constructs” and constraints for classes of problemsConstructs: activity X, unary resource YConstraints: X requires Y   (GLOBAL)

A → B, A ∨ B  (LOGIC)⇒Highly Expressive⇒Effective local search 

Search is based on constraint propagation

Page 128: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Constraint Programming – Basic IdeaProblemFind the order at which jobs A, B and C are sequenced on machine M

Job Processing Time Release DueA 2 0 5B 4 1 9C 3 2 7

Page 129: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Constraint Programming – Basic IdeaProblemFind the order at which jobs A, B and C are sequenced on machine M

Job Processing Time Release DueA 2 0 5B 4 1 9C 3 2 7

A→1

A∈{1,2,3}B∈{1,2,3}C∈{1,2,3}

A→2 A→3

B→1 B→2 B→3 B→1 B→2 B→3 B→1 B→2 B→3

C→1C→2

C→3C→ 3

A→B→CC→2 A→C→B

Page 130: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Constraint Programming – Basic IdeaProblemFind the order at which jobs A, B and C are sequenced on machine M

Job Processing Time Release DueA 2 0 5B 4 1 9C 3 2 7

A∈{1,2,3}B∈{1,2,3}C∈{1,2,3}

A must be 1st

C must be 2nd

B→2 B→3

C→2C→3

A→1

A→B→C A→C→B

Page 131: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Mathematical vs. Constraint Programming

Constraint ProgrammingFast algorithms for special problemsComputationally effective for highly constrained, feasibility and machine sequencing problems

Not effective for optimization problems with complex structure and many feasible solutions

Mathematical ProgrammingIntelligent search strategy but computationally expensive for large problemsComputationally effective for optimization problems with many feasible solutions

Not effective for feasibility problems and machine sequencing problems

MAIN IDEA

Decompose problem into two parts

Use MP for high‐level optimization decisions

Use CP for low‐level sequencing decisions

Page 132: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Decomposition Strategy

• Fix no/type of tasks and assignment decisions• Problem is highly constrained: suitable for CP• If feasible, obtain lower bound• Add integer cut and continue until bounds converge

Solve MIP Master Problemmax productions.t. RELAXATION

Obtain UB

Solve CP Subproblemmax productions.t. ALL CONSTRAINTS

w/ fixed no/type of tasks Obtain LB

• Express problem in an aggregated MP form

• Use MP to identify potentially good solutions

• Fix no/type of tasks, assignment of tasks to units

Iterations

×

Production

×× ×

Upper boundFeasible solution×Z*

0 2 4 6 8 10

Fix no/type of tasks,assignment to units Add integer cuts

Page 133: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example

Hybrid MILP/CP# iters Obj CPU s

3 12 0.323 16 0.373 22 1.05

Hybrid MILP/CP# iters Obj CPU s

1 19 0.231 23 21.021 27 0.64

MILP STN ModelHorizon n 0-1 Cont. Constr. LP Relax Obj CPU s

15 10 180 1,163 2,473 14 12 58.520 12 216 1395 2965 18 16* 16,749.225 15 270 1743 3703 24 22 523.6

Maximize Production

MILP STN ModelDemand n 0-1 Cont. Constr. LP Relax Obj CPU s4 / 5 / 6 12 216 1393 2938 12 19 32,0775 / 6 / 8 13 234 1509 3220 15 - >36,000

5 / 8 / 10 15 270 1741 3712 18 - >36,000

Minimize Makespan

T10 T12Flakes2

Corn Flakes

T20

Flour

T21Flakes1

T22Coated Flakes

Frosted Flakes

T30 T31Loops

T32Coated Loops Froot

Loops

Food (5)

Coater (2)

Packer (3)

Unlimited StorageFinite StorageZero Wait

Page 134: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

General Hybrid Algorithm

S1 S2Heat

Reaction1 Separation

Reaction 3

S3

S5

S4

S7

S6

Reaction2

90%10%

40%

60%70%

30%

Multipurpose Batch Plant jESTSTMSZDjIi

jjc

icic ∀−−≤∑ ∑∈ )(

ciZBBZB icMAXiicic

MINi ∀∀≤≤ ,

sBBSSi c

icI

i cic

Os isis

∀∑ ∑−∑ ∑+= ρρ0

FPsdS ss ∈∀≥

INTsCS ss ∈∀≤

ciBBB MAXiic

MINi ∀∀≤≤ ,

Task[i,c] requires Unit[j] ∀j,∀i∈I(j),∀cTask[i,c] requires Ric Utility[r] ∀i,∀cTask[i,c] consumes ρc

isBis State[s] ∀i,∀c,∀sTask[i,c] produces ρp

isBics State[s] ∀i,∀c,∀sTask[i,c].end ≤ MS ∀i,∀c

FPsdB si c

Oics ∈∀≥∑ ∑

ciBR iciiic ∀∀+= ,βα

Multi-stage: no utilitiesunlimited storage

T10F1

T11S10

T12S11 P1

T20F2

T21S20

T22S21 P2

T30F3

T31S30

T32S31 P3

jESTSTMSZDjIi

jjc

icic ∀−−≤∑ ∑∈ )(

ciZBBZB icMAXiicic

MINi ∀∀≤≤ ,

sBBSSi c

ici c

ics ∀⋅−⋅+= ∑∑∑∑ 110

FPsdS ss ∈∀≥

ciBBB MAXiic

MINi ∀∀≤≤ ,

Task[i,c] requires Unit[j] ∀j,∀i∈I(j),∀cTask[i,c] precedes Task[i’,c] ∀(i,i’)∈A,∀cTask[i,c].end ≤ MS ∀i,∀c

FPsdB ssOi c

is ∈∀≥∑ ∑∈ )(

Single-stageDrop stage index k

jrdXD oOooOojOo

ojoj ∀−≤ ∈∈∈∑ }{min}{max

)(Task[o,j].start ≥ ro ∀o,∀jTask[o,,j].end ≤ do ∀o,∀jTask[o,j] requires Unit[j] ∀o,∀k,∀j|Zok=1Task[o,k,j].end ≤ MS ∀o,∀k,∀j|Zok=1

oZj

oj ∀=∑ 1

Preprocessing: Better Cover Cuts

Page 135: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Integration with Problem­specific Algorithms

Example: Minimization of cost of multi-stage problem for orders with release and due timesN orders have to be processed sequentially in K stages, where each stage consists of Mk units.Each order i has release ri and due di time, and a processing cost cij and processing time τij. The objective is to minimize the sum of processing costs subject to meeting the release and due times.

Subproblem is a traditional OR problem (job-shop problem) ⇒ There are efficient algorithmsUse Shifting Bottleneck Procedure (Adams and Balas, 1988) to solve the subproblem

Master Problem: AssignmentSubproblem: Sequencing

Computational Results Obj MIP CP MIP/CP: CUT H MIP/SBP CPU s CPU s Iter’s/Cuts CPU s Iter’s/Cuts CPU s P2D1 153 4.4 0.1 16/19 0.7 4/4 1.3 P2D2 188 0.8 0.3 4/3 0.1 1/0 0.2 P3D1 56 446.6 4.2 29/45 8.7 26/32 16.9 P3D2 1113 0.4 1375.0 5/5 0.4 2/2 1.1 P4D1 149 27.3 447.2 17/22 28.8 12/15 7.8 P4D2 946 1.4 359.0 20/26 11.0 6/14 9.8 P5D1 111 4041.7 293.0 43/56 318.4 19/25 17.2 P5D2 704 2767.8 712.6 2/2 13.7 2/1 0.4

Page 136: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Exploit Parallel Computing

Multiple CPUs on a machine

Multiple machines located close by

Multiple machines distributed globally

Multiple machines distributed globally

GridComputing

DistributedComputing

ClusterComputing

ParallelProcessing

ParallelComputing

Computer manufacturers focus on multi‐core architecturesComputational resources become cheapAlgorithms that utilize new architectures or exploit parallelization necessaryModeling languages provide tools for parallel algorithm development

Page 137: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Parallel Computing & Integer Programming

LP‐based branch‐and‐bound has inherent structure for parallelizationSubproblems associated with each node are independentEvaluate nodes simultaneously; share cuts and bounds

×

Nodes solved at the master computer

Information flow: master → slave• Subproblem formulation• Variable bounds

Information flow: slave → master• New feasible solutions• Current lower bound• Global cutting planes

Fundamental issues for parallelizing branch‐and‐cutGenerate good subproblems: not too easy or too hardMinimize subproblem (task) and cut generation timeMaximize useful sharing: pass bound information relevant cuts

Page 138: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

How Can We Use Grid Computing?

Master-worker ParadigmMaster generates and spawns all tasks (subproblems)tasks can be user-defined or generated automaticallyWorkers execute tasks and return resultsMaster collects results

Master

WorkersSubproblems1. Independent (e.g. scenarios in stochastic programming)

Submission Loop:modelname.solvelink=3;loop(scenario,

parameter1 = spara1(scenario); parameter2 = spara2(scenario);solve modelname using mip minimizing objective;h(scenario) = modelname.handle;

);

2. Solver generatedSubtrees resulting from strong branching

3. User generatedManually fix binary variables (Bussieck et al., 2007)

Page 139: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Optimization on the Grid

Master

Condo

r

Separate directoryfor each subproblem

“finished” file upon completion of subproblem

Worker 1

Sandbox

Worker 2

Sandbox

“trigger file” is created if new incumbent is found

1. Master creates a separate directory for each subproblemUnique handle for each subproblem“finished” file when task completed“trigger” file when new incumbent

2. Condor ships the subproblems to workers; executed on a Sandbox3. Master collects results using handlecollect

Repeatedly checks for completion; collection time can be adjusted4. Update on incumbent solution using utility condor_chirp

If new global incumbent is found, trigger file is createdIt also puts the new incumbent to the subproblem’s directory in Master computer.

condor_chirp utility

Fetch: copies trigger file

Remove: removes trigger file after copying

Put: places new incumbent in directory of master

Worker N

Sandbox

Page 140: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Dynamic Decomposition

1. Run branch-and-bound on master to generate 400 open nodes2. Spawn open nodes to servers3. Communicate bounds and incumbents every 5 min; wait for 1 hr

Integer solutionPruned nodeFractional (open) node

Page 141: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Dynamic Decomposition

1. Run branch-and-bound on master to generate 200 open nodes2. Spawn open nodes to servers3. Communicate bounds and incumbents; wait for 1 hr4. Decompose hard problems dynamically again using strong branching

Integer solutionPruned nodeFractional (open) node

Page 142: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Results ­ 1

Example10 orders, 3 stages, 2 units/stage; dissimilar units, forbidden assignments and paths Two instances parameterized via demand

Instance 1: ~20 batchesStrong Branching to generate 400 subproblems13 hr of CPU time, 2hr of wall clock time2,905,742 nodes

Instance 2: ~30 batchesStrong Branching generated too many subproblemsFilled the disk of the submitting machine!Failed in solving this hard problem

A better scheme is needed to generate subproblems

Page 143: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Exploit Problem Structure

KkllIiZX iilkiJAj

ilj ∈≤∈∀=∑∈

,, max

),(

( ) jkILliliYYXX ilkliklililjiilj ,,'',,1 ''''' ∈∀+≤−+

BatchSelection

Zil

Batch assignmentXilj

Batch sequencingYili′l′k

Traditional Multi-stageschedulingJobshop

problem

Hierarchy of decisions:

Zil = 1 if batch l is selected towards order i

X(i,l)j = 1 if batch (i,l) is assigned to unit j

Y(i,l)(i’,l’)k = 1 if batch (i,l) preecedes batch (i’,l’) in stage k

Page 144: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Domain­based Dynamic Decomposition

Fix Zil

Fix Xilj

P

P2P1 P3 PM1

Promising Non-promising

P4Π1 = {P1, P2,…. PM}

Π2 = , m = 1,2,….M

where

Π3 = , m = 1,2,….M

where,

22P 2

3P21P 2

M2(2)P 41P

41,1P 4

1,2P 41,3P 4

1,M3(4)P

m

m

2ΠUm m m m

1 2 32 {P , P , P ,.....}Π =

ms

m,s

3ΠUm m m ms s,1 s,2 s,33 {P ,P ,P ,.....}Π =

Promising Non-promising

Master computerDecomposition generates subproblems

Subproblems solved in workersCollect and updates are used

Master collects unsolved problems;2nd-level decomposition by fixing Xiljin one stage

Process repeated as necessary

Few 1st‐level subproblems are promising (and hard); reasonable batching2nd‐level decomposition can potentially generate too many subproblemsProcess can be combined with strong branching

Page 145: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Results ­ 2

Example10 orders, 3 stages, 2 units/stage; dissimilar units, forbidden assignments and paths Two instances parameterized via demand

Instance 1: ~20 batchesDecomposition with strong branching13 hr of CPU time, 2hr of wall clock time, 2,905,742 nodes

1st‐level decomposition followed by strong branching7.5 min of wall clock time; 9,601 nodes

Instance 2: ~30 batchesDecomposition with strong branchingFailed to solve the problem

1st‐, 2nd‐, 3rd‐ level decomposition (Zil + 2 stages) followed by strong branching6 2nd‐level unsolved problems → 56,628 3rd‐level subproblems26 3rd‐level unsolved subproblems → 31,761 subproblems

17.7 days of CPU time; 9 hr of wall clock time; 222,065,793 nodes

Page 146: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

8. Integration of Production Planning and Scheduling

Page 147: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

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

RequirementsPlanning

DistributionPlanning

TransportPlanning

DemandPlanning

Demand Fulfillment

Long‐term

Medium‐term

Short‐term

Strategic Planning

Master Planning

Scheduling

ProductionPlanning

Integration across time scales and functionsMany new interesting problems

Power – industrial gases – steel SC Oil – industrial gases – chemicals SCunder power constraintsBiomass to fuels and chemicals

Page 148: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Problem Statement

P2

P1Manufacturing Facility

WarehouseDistribution Center

P2

P1

P2

P1

1,iP1,iI0,iI

1,iδ

2,iP2,iI

2,iδ

itPitI1, −tiI

itδ

Given:Planning horizon divided into T uniform or non‐uniform time periods t∈{1, 2, … T}.Products (items), i∈I = {A, B, … } with demand δit and holding cost θi.Resource constraints: unit and utility capacities, raw material availability, etc.Production costs: these may include variable and fixed costs.

DetermineProduction Pit and inventory levels Iit to minimize cost

t = 0 1 2 t-1 t

Production planning provides production targets (set points) for each periodP1  P2 P1  P2 P1  P2 P1  P2

Page 149: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Why Integration with Scheduling?

Bottleneck and unit capacity (aggregate) constraints insufficientChemical processes: batch splitting/mixing, recycle streams, utilities, storage constraintsScheduling models needed to provide feasibility and cost information

2,000

PB

1,000

2,0001,000 PA

(a) Bottleneck constraint

AG: PA+PB ≤ 2,100

U1

AINT

(ZW)

RM

B

200 ≤ P1 ≤ 300 (kg/d) U2

U3P3 = 150 (kg/d)

150 ≤ P2 ≤ 200 (kg/d)

2,000

1,000

2,0001,000

(b) Unit capacity constraints 

U1: PA+PB ≤ 2,100

U3: PB ≤ 1,050

U2: PA ≤ 1,400

PA

PB 2,000

1,000

2,0001,000

(c) True feasible region(via scheduling)

PA

PB

4

Page 150: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

General Production Planning Formulation

tiδPII itittiit ,,1, ∀−+= −

0, ≥itit IP

( ) tiPf it ∀≤∈ ,0, I

( ) tiPgCp itt ∀∈= ,, I

( )∑ +=t tt ChCpz min

tIθChi itit ∀= ∑ ,

P2

P1

How much can we produceand at what cost?

Satisfy demand?At what (inventory) cost?

itP

itI1, −tiI

itδ

Hiddenscheduling problem

Demand (orders)ABCDE

A1 A2 A3

B1 B2

C1

D1 D2

Batching Batch‐unit Assignment

A1A2

A3B1

B2

C1 D1D2E1 E1

Sequencing & TimingU1

U2

A1 A2 A3 C1

D1 D2 B1 B2 E1

Batches

SchedulingGiven:

A production facility (processing units, storage vessels, utilities) & processing cost (feedstocks, utilities, etc)Production recipes (stoichiometric coefficients, processing times, utility requirements)Production targets 

Determine the optimal:Number and type of processing tasks (batches and lots)Allocation of resources to processing tasksSequencing of tasks on processing units

Page 151: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Planning­Scheduling Integration

nkζBρBρSS

nkWβBWβ

njW

MAXi

Ckknik

Pkτnkikniin

knMAXkknkn

MINk

Kk

nn

τnnkn

ii

i

j i

∀∀≤++=

∀∀≤≤

∀∀≤

∑∑

∑ ∑

∈∈−−

−>

,

,

,1

,1,

'

''

( )∑∑ +=k n

knkknkt BεWγCp

NntKkSP FPknkt =∀∈∀= ,,,

0,},1,0{,0, ≥∈≥ ktininktkt SBWIP

tiδPII itittiit ,,1, ∀−+= −

( )∑ +=t tt ChCpz min

tIθChi itit ∀= ∑ ,

Planning

Linking

Scheduling

Optimization

IntegratedFormulation

Scheduling time grid(small-bucket hn)Hours-days

Planning time grid(big-bucket Ht)Weeks-months

t=0 1 2

H1

n=0 1 2 … N N+1 … 2Nhn

Scheduling

Planning1,iP 2,iP

NiS , NiS 2,

Page 152: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Challenges in Chemical Production Planning

ModelingDifferent production environments Wide range of processing constraintsIntegration with multiple planning functions

⇒ Develop general modeling framework

TheoryDiscrete decisions lead to mixed‐integer programming modelsExisting hardware and software insufficient

⇒ Develop fundamental optimization theory

⇒ Use underlying theory to develop better solution methods

Solution MethodsApplications: optimize over long horizon

optimize multiple systems simultaneouslyIntractable large‐scale models

⇒ Develop general & computationally effective methodsProjection­based strategy

Page 153: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

The Modeling Challenge

FERMENTACIÓN

TANQUE REPOSO

REPOSO

TANQUES DE

GOBIERNO I

Bottling

D. W.

DILUTION

Filtering

TANQUES DE

GOBIERNO II

TANQUES DE GOBIERNO

Litro

500 BPM

¼ STD

700 BPM

½ STD

600 BPM

½ PREMIER

600 BPM

½ T.A., ¼ BOH.

750 BPM

Litro

350 BPM

LATA

1200 LPM

½ T.A EXP

750 BPM

Fermentation Storage

Batch processing Semi‐continuous

processing

Continuousprocessing

No batch mixingCleaning‐in‐placebetween batchesCooling utilitiesYeast requirementsRelease time for media

Products grouped in familiesChangeover times & costs between familiesOrders at due datesInventory constraintsUnit‐product compatibilityStorage constraints

Page 154: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Modeling Schools of Thought

Network processing

A

B

RM1

RM2

Int1

Int2

Int3

ImB

40%

60%

40%

60%10%

90%80%

20%

RM3

Batch splitting/mixing allowedRecycle streams, utility requirementsCommon in bulk chemicals & oil industriesMaterial­basedmethods

. . . . . . . . . . . .

Orders 1st stage 2nd stage Kth stage(batches) J1 J2 JK

FinishedOrders

Sequential processing

Operations follow a defined sequenceThe same batch/lot processed in all stagesNo batch mixing (blending) or splitting allowedCommon in biotech, specialty chemical, and pharmaceutical industriesBatch­based methods

Page 155: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Implications of Modeling DiversityT

radi

tiona

l pr

oces

s re

pres

enta

tion

T1 T2S1 S3 S5

T3S2 S6

{U1}

{U2, U3}

{U2, U3}

60%

40%

30%70%S4

Stage 1 Stage 2

U4

U5

U6

U7

Material‐based Batch‐based

T4 T5S7 S8

T6 T7S9 S10

T1 T2S1 S3 S5

T3S2 S6

{U4,U5} {U6,U7}

{U4,U5} {U6,U7}

{U1}

{U2, U3}

{U2, U3}

60%

40%

30%70%

S4

Network taskNetwork state

Sequential taskSequential state

Hybrid state

11

Network

60%

40%

30%70%

Feed1

P1

P2Mixer U1

Reactor U2

Reactor U3

intermediate

M

Feed 3

Feed 2

R1

R2

Sequential

P3

P4

Reactor U4/U5

Reactor U4/U5

Separator U6/U7

Separator U6/U7

R3 S1

Intermediate 1 (5 orders)

(7 orders)Intermediate 2

R4 S2

Sundaramoorthy & Maravelias, 2011

Page 156: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application

Processing Stages:  Fermentation → Filtering → Storage → BottlingProduction Type:  Batch, continuous, and semi‐continuousPlanning Horizon: 6 weeksProduction Environment: 

8       processing units (lines)22     products families25     product subfamilies162   products

FERMENTACIÓNFERMENTACIÓN

TANQUE REPOSOTANQUE REPOSO

REPOSOREPOSO

TANQUES DE

GOBIERNO I

TANQUES DE

GOBIERNO I

Bottling

D. W.

DILUTION

Filtering

TANQUES DE

GOBIERNO II

TANQUES DE

GOBIERNO II

TANQUES DE GOBIERNO

Litro

500 BPM

¼ STD

700 BPM

½ STD

600 BPM

½ PREMIER

600 BPM

½ T.A., ¼ BOH.

750 BPM

Litro

350 BPM

LATA

1200 LPM

½ T.A EXP

750 BPM

Fermentation

Storage

major changeover

Product family Product family

Product (item)minor changeover

(sequence independent)

Product families:  Products (for bottling) are grouped into familiesChangeover costs/times between families; setup costs/times between productsProducts belong to subfamilies

Kopanos et al.,, 2011

Page 157: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: Executed Schedule

Page 158: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: Executed Schedule

Page 159: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: Integrated Appoach

No “memory” across planning periods

Page 160: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: Integrated Approach

No “memory” across planning periodsMinimize setup time & costs

Page 161: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: ResultsExecuted Schedule

Page 162: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: ResultsSchedule Found Using Integrated Framework

Page 163: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Industrial Application: Results

Comparison with Implemented Solution

Page 164: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Challenges in Chemical Production Planning

FERMENTACIÓNFERMENTACIÓN

TANQUE REPOSOTANQUE REPOSO

REPOSOREPOSO

TANQUES DE

GOBIERNO I

TANQUES DE

GOBIERNO I

D. W.

DILUTION

TANQUES DE

GOBIERNO II

TANQUES DE

GOBIERNO II

TANQUES DE GOBIERNO

Litro

500 BPM

¼ STD

700 BPM

½ STD

600 BPM

½ PREMIER

600 BPM

½ T.A., ¼ BOH.

750 BPM

Litro

350 BPM

LATA

1200 LPM

½ T.A EXP

750 BPM

ModelingDifferent production environments Wide range of processing constraintsIntegration with multiple planning functions

⇒ Develop general modeling framework

TheoryDiscrete decisions lead to mixed‐integer programming modelsExisting hardware and software insufficient

⇒ Develop fundamental optimization theory

⇒ Use underlying theory to develop better solution methods

Solution MethodsApplications: optimize over long horizon

optimize multiple systems simultaneouslyIntractable large‐scale models

⇒ Develop general & computationally effective methodsProjection­based strategy

Page 165: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Polyhedral Background ­ Summary

Polyhedron PolytopeP = {x: Ax = b, l ≤ x ≤ u}

Integral Polytope

Definition 1. A polyhedron P is the solution set of a finite system of linear inequalities, i.e. P = {x: Ax ≤ b}. Definition 2. A polyhedron P is a polytope (i.e. a bounded polyhedron) if there exist l, u ∈ Rn: l ≤ x ≤ u; 

i.e. P = {x: Ax ≤ b, l ≤ x ≤ u for l, u ∈ Rn}. Remark 1:  A set of inequalities Ax ≤ b can be converted into a set of equalities Ax + Is = b, s ≥ 0. 

A polytope can be described by as P = {x: Ax = b, l ≤ x ≤ u}. 

P = {x: Ax = b}

Remark 2:  A vector v of a polyhedron is a vertex (extreme point) if and only if it cannot be written as a linear combination of points in P\{v}. A polytope P is the convex hull of its vertices.

Definition 3. A nonempty polyhedron is integral if its vertices are integral.

P = {x: Ax = b, l ≤ x ≤ u}

Definition 4.  An integral matrix A is totally unimodular (TU) if the determinant of each square submatrix of A is equal to 0, 1, or ‐1.

Theorem 1. If A is TU and vectors b, b’, d and d’ are integral, then P(b, b’, d, d’) = {x∈: b’ ≤ Ax ≤ b, d’≤ x ≤ d} is integral if it is not empty (Hoffman & Kruskal, 1956). 

A totally unimodularTheorem 1

Theorem 2.  If a {0, ±1} matrix has no more than two non zero coefficients in each column, and Σl alm = 0 if column m has two coefficients, then A is TU (Ghouila‐Houri, 1962). 

Theorem 3.  A {0, 1} matrix is an intervalmatrix (or has the consecutive 1’s property) if for all rows with alm = al’m = 1, l < l’, implies al”m = 1 for l < l” < l’. Interval matrices are TU (Fulkerson & Gross, 1965). 

MIP Formulations

Theorem 2Theorem 3.  .  .

Page 166: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Polyhedral Background ­ Summary

Polyhedron PolytopeP = {x: Ax = b, l ≤ x ≤ u}

Integral Polytope

Definition 1. A polyhedron P is the solution set of a finite system of linear inequalities, i.e. P = {x: Ax ≤ b}. Definition 2. A polyhedron P is a polytope (i.e. a bounded polyhedron) if there exist l, u ∈ Rn: l ≤ x ≤ u; 

i.e. P = {x: Ax ≤ b, l ≤ x ≤ u for l, u ∈ Rn}. Remark 1:  A set of inequalities Ax ≤ b can be converted into a set of equalities Ax + Is = b, s ≥ 0. 

A polytope can be described by as P = {x: Ax = b, l ≤ x ≤ u}. 

P = {x: Ax = b}

Remark 2:  A vector v of a polyhedron is a vertex (extreme point) if and only if it cannot be written as a linear combination of points in P\{v}. A polytope P is the convex hull of its vertices.

Definition 3. A nonempty polyhedron is integral if its vertices are integral.

P = {x: Ax = b, l ≤ x ≤ u}

Definition 5. A rational matrix is κ‐regular if for all its non‐singular square submatrices R, κR‐1 is integral. Theorem 4. If A is an m×n integral matrix, then the polyhedron P(A, b’, b, d’, d) = {x: b’ ≤ Ax ≤ b, d’ ≤ x ≤ d} 

is integral for all a,b∈κZm and l, u ∈ κZn, iff A is κ‐regular (Appa and Kotnyek, 2004). 

k‐regularTheorem 4

Proposition 1.Let A be a rational matrix and σ and κ positive integers. Then σ ‐1A is κ‐regular iff A is σκ‐regular.Proposition 2.Let A be κ‐regular. Then the following matrices are also κ‐regular: i)   the transpose of A, ii) any 

submatrix of A, iii) the matrix obtained by multiplying a row or column of A by ‐1, iv) the matrix obtained by interchanging two rows or columns of A, v) the matrix obtained by duplicating a row or column of A, vi) the matrix obtained by dividing a row or column of A by a non‐zero integer.

Proposition 1Proposition 2.  .  .

MIP Formulations

Page 167: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Discrete­time MIP Scheduling Model

{ }1P =×∈== ⋅+ xξwsx MBMB A:],0[),( NKR

{ }1wwP =∈= ⋅ ANIA A:]1,0[

Given are a set of tasks i∈I, processing units j∈J, chemicals (states) k∈K, and a scheduling horizon η.• A processing unit j can be used to carry out tasks i∈Ij.• The fixed production rate of task i is ρi.• A chemical can be consumed (produced) by multiple tasks i∈Ik- (i∈Ik+).• Each task consumes and produces one chemical. • Chemical k is stored in a dedicated tank with capacity ζk.

The time horizon is divided into periods n∈N={1, 2, …, N} of uniform length Δt = η/N,• Win∈{0, 1}; it is equal to 1 if task i is processed during period n.• Bin ≥ 0; extend (amount processed) of task i during period n.• Ssn ≥ 0; inventory of chemical k at time point n.

njWji

in ,,1 ∀=∑∈I

nkζγBBSS kkni

ini

in1nk,knkk

,, ∀≤+−+= ∑∑−+ ∈∈

−II

niWβB iniin ,, ∀=

nkγBβWβSS kni

inii

ininkknkk

,,1, ∀+−+= ∑∑−+ ∈∈

−II

{ } ],0[,1,0 ξsw ∈∈ ⋅ni

itρβ ii ∀= ,Δ

nkζSniW kknin ,],,0[;,},1,0{ ∀∈∀∈

Page 168: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Polyhedral Results

Let lcmβ be the least common multiple of all batchsizes, lcmβ = lcm(βi, i∈I) = lcm(β);Let gcfε be the greatest common factor of deliveries γkn and capacities ζk, gcfε = gcf(γkn, k∈K, n∈N; ζk, k∈K) = gcf(ε).If κ* is the greatest common factor of lcmβ and gcfε, κ* = gcf(lcmβ, gcfε), then lcmβ = κ* ⋅ κβ and gcfε = κ* ⋅ κε

Proposition 5. Matrix Α is (κβ κ* κε)‐regular.Proposition 6. Polyhedron PMB is integral if Δt = gcfε/lcmρ, where lcmρ is the least common multiple of production 

rates ρi, lcmβ = lcm(βi, i∈I) = lcm(β).Proposition 7. If λ is the least common multiple of the denominators of rational parameters γ, ζ and ρ, then the 

vertices of PMB are w‐integral if Δt = Δt* = gcf(λε)/lcm(λρ).

MBA PPP I=

Proposition 3.Matrix AA is an intervalmatrix; thus, it is totally unimodular.Corollary 1.  Polytope PA is integral.

APMBP

P

{ }1P =∈= ⋅ ww AA A:[0,1] NI

{ }γxξwsx =×∈== ⋅+

MBMB A:],[0),( NKRP

Page 169: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Geometric Interpretation

0 1 2 3 40

1

2

3

4

PA

WT2

WT1

PMB

P

0 1 2 3 40

1

2

3

4

PA

WT1

WT2

PMB

P

b) Δt = 0.75 hra) Δt = 0.5 hr

0 1 20

1

2

PA

WT1

WT2

PMB

P

0 1 20

1

2

PA

WT1

WT2

P

PMB

d) Δt = 1.5 hrc) Δt = 1.0 hr

T2

T1

U1

U2

RM

INT

FP

ζ = 4, S0 = 4

ζ = 2, S0 = 0

ζ = 2, S0 = 0

ρ = 2

ρ = 1

gcf(λε) = 2, lcm(λρ) = 2Δt* = 1

Page 170: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 1

T11 T12 T21 T22

T31 T32

U1 U2

U3

U4

RM2

INT1 INT2

RM1

T42T41 T43 T51 T52

INT3 INT4U5

A B1 C1 B2 C2

Model and solution statistics for instances Ex1/In-1/Δt. Δt (hr) 12 8 6 4 Periods (N) 28 42 56 84 Constraints 449 673 897 1,345 Binary var’s 448 672 896 1,344 Continuous var’s 309 463 617 925 LP-relaxation 198.275 202.161 204.0 205.95 Optimal solution 203.675 221.461 204.0 207.708 Integrality gap (%)* 2.65 8.71 0.00 0.85 CPU time (sec) 56.9 770.0 0.2 104.3 Nodes 103,631 874,116 5 82,968 Optimality gap (%) - - - - * Integrality gap: IG = (Z* - ZLP)/Z* ZLP = LP-relaxation; Z* = Optimal solution

3 stages; 5 units; 11 tasks; 11 chemicalsThree instances

In­1: 2‐week horizon; demands in 0.5 incrementsProposition 7 ⇒ Δt* = 6 hr

Page 171: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 1

Model and solution statistics for instances Ex1/In-2/Δt. Δt (hr) 6 4 3 2.4 2 Periods (N) 56 84 112 140 168 Constraints 897 1,345 1,793 2,241 2,689 Binary var’s 896 1,344 1,792 2,240 2,688 Continuous var’s 617 925 1,233 1,541 1,849 LP-relaxation 197.2725 199.143 200.081 200.64 201.028 Best/optimal solution 215.7550† 209.739† 209.619† 200.64 206.473† Integrality gap* (%) 8.0-8.6 3.2-5.1 3.8-4.6 0 1.3-2.6 CPU time (sec) 1,200 1,200 1,200 0.34 1,200 Nodes 985,501 717,501 699,601 0 520,501 Optimality gap (%) 0.65 1.96 0.77 - 1.36 † Instance not solved to optimality. * If not solved to optimality we calculate a range [IGMIN, IGMAX]. IGMIN = [Z*(1-OG) – ZLP]/ Z*(1-OG); IGMAX = (Z* - ZLP)/Z*. where ZLP = LP-relaxation; Z* = Best solution; OG = Optimality gap.

3 stages; 5 units; 11 tasks; 11 chemicalsThree instances

In­1: 2‐week horizon; demands in 0.5 incrementsProposition 7 ⇒ Δt* = 6 hrIn­2: 2‐week horizon; demands in 0.2 incrementsProposition 7 ⇒ Δt* = 2.4 hr

T11 T12 T21 T22

T31 T32

U1 U2

U3

U4

RM2

INT1 INT2

RM1

T42T41 T43 T51 T52

INT3 INT4U5

A B1 C1 B2 C2

Page 172: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

More Polyhedral Results

{ }1P =∈= ⋅ ww AA A:[0,1] NI

{ }γwusξwus =++××∈= ⋅+

⋅+ ws

MB2 AAA:],[0),,( uNINK RRP

S kn U kn W in

k = A k = B k = C k = A k = B k = C i = T1 i = T2

n 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 31 1 -1 β T1

k = RM 2 -1 1 1 -1 β T1

3 -1 1 1 -1 β T1

1 1 -1 -β T1 β T2

k = INT 2 -1 1 1 -1 -β T1 β T2

3 -1 1 1 -1 -β T1 β T2

1 1 -1 -β T2

k = FP 2 -1 1 1 -1 -β T2

3 -1 1 -1 1 -β T2

As Au Aw

Proposition 8.i) Matrix Α2 is (κβ κ*)-regular.ii) Polyhedron PMB2 is integral for Δt+ = gcfε/lcmρ.iii) The vertices of PMB2 are w-integral for Δt* = gcf(λε)/lcm(λρ).

Production planning with backlogged demand

Production planning with backlogged demand and shipments

{ }TNKNKNI ],0[A:],[0),,,( 3MB3 γxξuvwsx =×××∈== ⋅+

⋅+

⋅+ RRR P

{ }1P =∈= ⋅ ww AA A:[0,1] NI

⎥⎦

⎤⎢⎣

⎡−

=u

ws

AI000IAA

Awhere 3 x

S kn W in V kn U kn

k = A k = B k = C i = T1 i = T2 k = A k = B k = C k = A k = B k = C

n 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 31 1 β T1 1

k = RM 2 -1 1 β T1 13 -1 1 β T1 11 1 -β T1 β T2 1

k = INT 2 -1 1 -β T1 β T2 13 -1 1 -β T1 β T2 11 1 -β T2 1

k = FP 2 -1 1 -β T2 13 -1 1 -β T2 11 -1 -1

k = RM 2 -1 1 -13 -1 1 -11 -1 -1

k = INT 2 -1 1 -13 -1 1 -11 -1 -1

k = FP 2 -1 1 -13 -1 1 -1

Proposition 9. i) Matrix Α3 is (κβ κ*)-regular.ii) Polyhedron PMB3 is integral if Δt+ = gcfε/lcmρ.iii) The vertices of PMB3 are w-integral if Δt* = gcf(λε)/lcm(λρ).

Page 173: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 2

4 stages; 11 units; 37 tasks; 31 chemicalsη = 8 weeks (56 days); 

In‐1: Demand must be satisfied on timeProposition 11 ⇒ Δt* = (1/6) d = 4 hr

Model and solution statistics for instances of Example 2: In1/Δt. Δt (hr) 12 8 6 4 3 Periods (N) 112 168 224 336 448 Constraints 4,481 6,721 8,961 13,441 17,921 Binary var’s 5,488 8,232 10,976 16,464 21,952 Continuous var’s 3,137 4,705 6,273 9,409 12,545 LP-relaxation 1,576.5 1,588.9 1,595.0 1,601.1 1,604.2 Best/optimal solution - - - 1,601.1 - Integrality gap* (%) n/a n/a n/a 0 n/a CPU time (sec) 1,200 1,200 1,200 24.1 1,200 Nodes 294,900 177,000 112,800 114 33,400 Optimality gap* (%) n/a n/a n/a 0 n/a * If no integer feasible solution is found, optimality and integrality gaps cannot be calculated.

T111

U11 U13

RM2RM1

T112 T121

U12T122 T123 T131 T132

RM3

T211 T212 T213 T214

IN1A IN1B IN1CD

T211 T212 T213 T214

IN2A IN2BIN2C

IN2D

T311 T312 T321 T322 T331 T332

IN3A1 IN3B1 IN3C IN3DIN3A2 IN3B2

T411T412

T413T414

T421 T422 T423 T424T441 T442 T443 T444

U21 U22

T431T432

T433T434

U31 U32 U33

U41

U42

U43

U44

A11 B11 A21 B21 A12 B12 A22 B22 C1 C2 D1 D2

Page 174: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 2

4 stages; 11 units; 37 tasks; 31 chemicalsη = 8 weeks (56 days); 

In‐1: Demand must be satisfied on timeProposition 11 ⇒ Δt* = (1/6) d = 4 hrIn‐2: Shipments/backlogs are introducedProposition 11 ⇒ Δt* = (1/6) d = 4hr

T111

U11 U13

RM2RM1

T112 T121

U12T122 T123 T131 T132

RM3

T211 T212 T213 T214

IN1A IN1B IN1CD

T211 T212 T213 T214

IN2A IN2BIN2C

IN2D

T311 T312 T321 T322 T331 T332

IN3A1 IN3B1 IN3C IN3DIN3A2 IN3B2

T411T412

T413T414

T421 T422 T423 T424T441 T442 T443 T444

U21 U22

T431T432

T433T434

U31 U32 U33

U41

U42

U43

U44

A11 B11 A21 B21 A12 B12 A22 B22 C1 C2 D1 D2Model and solution statistics for instances Ex2/In-2/Δt. Δt (hr) 12 8 6 4 3 Periods (N) 120 180 240 360 480 Constraints 6,229 9,349 12,469 18,709 24,949 Binary var’s 5,880 8,820 11,760 17,640 23,520 Continuous var’s 6229 9,349 12,469 18,709 24,949 LP-relaxation 3,652.3 3,644.5 3,640.6 3,636.7 3,634.7 Best/optimal solution 3,848.7† 3,858.5† 3,801.3† 3,637.1 3,651.5† Integrality gap* (%) 0.04-5.10 0.41-5.55 0.02-4.23 0.01 0.01-0.46 CPU time (sec) 1,200 1,200 1,200 234.2 1,200 Nodes 155,762 95,981 67,501 1,350 11,251 Optimality gap (%) 5.06 5.16 4.21 0 0.45 † Instance not solved to optimality * If not solved to optimality we calculate a range [IGMIN, IGMAX]. IGMIN = [Z*(1-OG) – ZLP]/ Z*(1-OG); IGMAX = (Z* - ZLP)/Z*. where ZLP = LP-relaxation; Z* = Best solution; OG = Optimality gap.

Page 175: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Remarks

Integrality of PA and PMB is interesting theoreticallyIt cannot be directly used (e.g. in decomposition methods)Can be proved only for subset of problemsOur results are useful in practice:• Starting point for extended results and special cases• Computational performance of commercial solvers is improved

Proof of results suggests network structureStudy relationship between production facilities and graph­theoretic networks

Page 176: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Network Structure of Scheduling MIP Model 

Integral Polytope

P = {x: Ax = b}

A: totally unimodular(TU)

MIP Formulation

Theorem 2. If a {0, ±1} matrix has no more than two non zero coefficients in each column, and Σlalm = 0 if column m has two coefficients, then A is TU

1 2

34⎥⎥⎥

⎢⎢⎢

−−−

−−−

11111

1111111

(4,2) (4,1) (3,4) (2,3) (2,1) (1,2)

4321

Problem Representation

29

T11 T12 T21 T22

T31 T32

U1 U2

U3

U4

RM2

INT1 INT2

RM1

T42

B1

T41

A

T43

C1

T51

B2

T52

C2

INT3 INT4

U5

INT1 INT2

RM1 RM2

B1A C1 B2 C2

INT3 INT4

T11

T21

T12T22

T31 T32

T42T43

T51T52T41

Production Facility Digraph

Processing restrictions 

correspond to known 

problems in graph 

theory

Page 177: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Challenges in Chemical Production Planning

FERMENTACIÓNFERMENTACIÓN

TANQUE REPOSOTANQUE REPOSO

REPOSOREPOSO

TANQUES DE

GOBIERNO I

TANQUES DE

GOBIERNO I

D. W.

DILUTION

TANQUES DE

GOBIERNO II

TANQUES DE

GOBIERNO II

TANQUES DE GOBIERNO

Litro

500 BPM

¼ STD

700 BPM

½ STD

600 BPM

½ PREMIER

600 BPM

½ T.A., ¼ BOH.

750 BPM

Litro

350 BPM

LATA

1200 LPM

½ T.A EXP

750 BPM

ModelingDifferent production environments Wide range of processing constraintsIntegration with multiple planning functions

⇒ Develop general modeling framework

TheoryDiscrete decisions lead to mixed‐integer programming modelsExisting hardware and software insufficient

⇒ Develop fundamental optimization theory

⇒ Use underlying theory to develop better solution methods

Solution MethodsApplications: optimize over long horizon

optimize multiple systems simultaneouslyIntractable large‐scale models

⇒ Develop general & computationally effective methodsProjection­based strategy

APMBP

P

Page 178: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example Revisited

2,000

1,000

2,0001,000 PA

PB

PA ≤ PB

1.5PA +0.5PB ≤ 2,100

PB ≥ 0

Process Attainable Region

Fl

Kkkt

lk LlΠPw

FP

∈≤∑∈

PA

PB

Cp = f(PA,PB)

Surrogate cost model

OKk

ktlk

lt LlPwCp

FP

∈+≥ ∑∈

γ

All necessary production feasibility information in: 

All necessary production cost information in:

Can we systematically develop these constraints?

⇒ We have to analyze the underlying scheduling model

Fl

Kkkt

lk LlΠPw

FP

∈≤∑∈

OKk

ktlk

lt LlPwCp

FP

∈+≥ ∑∈

γ

U1

AINT

(ZW)

RM

B

200 ≤ P1 ≤ 300 (kg/d) U2

U3P3 = 150 (kg/d)

150 ≤ P2 ≤ 200 (kg/d)

Page 179: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Projection­based Method

1. Choose initial search vectors w = [w1, w2, …wK]T 2. Solve scheduling model (M1) for each vector to obtain a UE vertex and an OE inequality 3. Run Quickhull to convert UE vertices into inequalities  4. Iterate until MPD stops improving:     Find maximum perpendicular distance (MPD) and a new search vector     Solve (M2) for new search vector; obtain new vertex and new inequality     Run Quickhull to update UE 5. Set PAR equal to UECH 

Projection­based method: Develop feasibility/optimality constraints that involve only planning (x) variablesConvergence between overestimation (OE) and underestimation (UE) of true convex hull

Page 180: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Rolling­horizon Approach

Fl

Kkkt

lk LlΠPw

FP

∈≤∑∈

OKk

ktlk

lt LlPwCp

FP

∈+≥ ∑∈

γ

0)  Set θ = 1 1)  Solve (PP) for planning periods t∈{θ, θ +1, …, T} to obtain targets Pkθ,  Pkθ+1, …, PkT 2)  Solve scheduling model for period t = θ  to meet target Pkθ 3)  If production target is met exactly (i.e. SkN = Pkθ, ∀k∈KFP), fix Pkθ, , and return to 2   otherwise, fix Pkθ , and re‐solve (PP) to update targets Pkθ+1, Pkθ+2, …, PkT ,  4)  Set θ =θ+1, and return to 2 

(PP)tiδPII itittiit ,,1, ∀−+= −

0, ≥itit IP

( )∑ +=t tt ChCpz min

tIθChi itit ∀= ∑ ,

P2

P1

How much can we produceand at what cost?

Satisfy demand?At what (inventory) cost?

itP

itI1, −tiI

itδ

Model (PP) yields a complete production planning solution: Pit and IitIf detailed schedules are required, model (PP) can be used in a rolling horizon algorithm (S‐PP) to provide production targets for (weekly) scheduling models

Page 181: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 1

0 1000 2000 30000

1500

3000

4500

R120

R168

R216

PA

PB

(kg)

(kg)

R120: Ht = 120 hr

R168: Ht = 168 hr

R216: Ht = 216 hr

A

B

RM1

RM2

RM3

Int1

Int2

ImP2

40%

60%

40%

60% 10%

90%80%

20%

R1

S

HHT

R3

R2

RI

RII

Sep

H

R1, R2, R3

S

Kondili et al., 1993

Page 182: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 1

A

B

RM1

RM2

RM3

Int1

Int2

ImP2

40%

60%

40%

60% 10%

90%80%

20%

R1

S

HHT

R3

R2

RI

RII

Sep

H

R1, R2, R3

S

0 600 1200 18000

1000

2000

3000

R500

R1000

R1500P

A

PB (kg)

(kg)

R500: SIn2MAX = 500 Kg

R1000: SIn2MAX = 1,000 Kg

R1500: SIn2MAX = 1,500 Kg

Page 183: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 2

P3

P1

P2

F1

F2

S1 S2 Int1

Int2

S3

S4

S5 S695%

5%50%

50%90%

10%

T1 T2 T3 T4 T5

T6

T10T7 T8 T9

U1 U2 U3 U4 U3 U4

T1, T4 T2 T3 T5, T6 T7, T9 T8, T10

0500

10001500

5001000

1500

0

500

1000

PAPB

PC

Projection of scheduling feasible region onto Pi

Papageorgiou and Pantelides, 1996Production Planning48 1‐week periods

Page 184: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 2: Results

0

1000

2000

3000

0 12 24 36 48

(kg)InventoryProduction

-1500

-500

500

1500

2500

1 48

(kg)

Demand

Shipments

Backlog

Inventory (Ikt) and production (Pkt) levels for product A

Demand (Demkt), shipment (Dkt) and backlog (Ukt) profiles for product A

Page 185: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Example 2: Results

0

500

1000

1500

2000

2500

1

(kg)

0

25

50

75

(kg)Production Targets Deviation from Production Targets

Model (PP) Algorithm (S-PP) Holding cost ($) 574,756 568,345 Backlog cost ($) 183,933 210,221 Production cost ($) 408,405 411,910 Total cost ($) 1,167,094 1,190,475 CPU secs 0.162 5406.092

Solutions of (PP) and (S-PP)

Absolute deviation between production targets predicted by (PP) andproduction amounts obtained by detailed scheduling (S­PP)

Average total production (PA+PA+PC):  1,820.0 kgAverage total absolute deviation (PP)‐(S‐PP): 4.5 kg → 0.25%

Page 186: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Conclusions

Projection­based MethodCompact description of production targets and costsCan be combined with any scheduling formulationGenerated once off‐line; improved on‐line if necessaryEffective production planning approach

Polyhedral & Graph­theoretic ResultsRigorous treatment of MIP tightnessProvides insights into formulation of large‐scale problemsIntegration of combinatorial optimization algorithms

General Modeling FrameworkNo decoupling into subproblems ⇒ better solutionsUnique problem representation ⇒ better IT systemsComputational advances for wide range of problems

FERMENTACIÓNFERMENTACIÓN

TANQUE REPOSOTANQUE REPOSO

REPOSOREPOSO

TANQUES DE

GOBIERNO I

TANQUES DE

GOBIERNO I

D. W.

DILUTION

TANQUES DE

GOBIERNO II

TANQUES DE

GOBIERNO II

TANQUES DE GOBIERNO

Litro

500 BPM

¼ STD

700 BPM

½ STD

600 BPM

½ PREMIER

600 BPM

½ T.A., ¼ BOH.

750 BPM

Litro

350 BPM

LATA

1200 LPM

½ T.A EXP

750 BPM

APMBP

P

2,000

1,000

2,0001,000 PA

PB

PA ≤ PBPA ≤ PB

1.5PA +0.5PB ≤ 2,100

PB ≥ 0PB ≥ 0

Fl

Kkkt

lk LlΠPw

FP

∈≤∑∈

Page 187: Mixed integer programming methods supply chain …cepac.cheme.cmu.edu/pasi2011/library/maravelias/PASI2011-Marav... · Mixed-integer programming methods for supply chain optimization

Mixed-integer programming methods for supply chain optimizationChristos Maravelias, University of Wisconsin - Madison

Questions?