Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

32
Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks Speaker Name: Robert Stawicki Speaker Title: Assistant Professor Ramapo College of NJ

description

Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks. Speaker Name: Robert Stawicki Speaker Title: Assistant Professor Ramapo College of NJ. Background. Based on 20 Years Experience Implementing Supply Chain Models for Fortune 100 Companies - PowerPoint PPT Presentation

Transcript of Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Page 1: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Speaker Name: Robert StawickiSpeaker Title: Assistant Professor Ramapo College of NJ

Page 2: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Background

• Based on 20 Years Experience Implementing Supply Chain Models for Fortune 100 Companies

• Formulating Models from ScratchOr

• Models Provided by Major Supply Chain Solutions Vendors

Page 3: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Outline

• LP Formulation for Supply Chain Optimization• Six Common Pitfalls and Their Work Arounds– Using Full Costing– Time Frame Too Short– Production Levelling– Inventory being “Reborn” (Product Aging Constraints)

– Honoring Safety Stocks while Stocking Out Customers

– Starting Inventory is “Free”

Page 4: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Basic Formulation

• Minimize Total Cost• Production Cost• Inventory Carrying Cost• Intra-Company Transportation Cost • Transportation Cost to Customers• Stock Out Costs • Safety Stock Violation Cost

• Subject To:• Material Balance Constraints• Capacity Constraints• Satisfy Demand Constraints• Satisfy Safety Stock Constraints

Page 5: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Basic Formulation (Continued)

To Discuss: Maximize vs. Minimize Stockout vs. Backorder Other Constraints Model Size

See Appendix

Page 6: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Using Full Costing

Plant AFixed Cost $2.00Variable Cost / Unit $5.00Total Cost / Unit $7.00

Plant BFixed Cost $0.50Variable Cost / Unit $6.00Total Cost / Unit $6.50

Assume Demand = 10,000 unitsAll Other Costs Equal

Page 7: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Using Full Costing (continued)

Full Costing Based ModelPlant B Produces all 10,000 Units

Plant AFixed Cost $20,000Variable Cost 0Total Cost $20,000

Plant BFixed Cost $5,000Variable Cost 60,000Total Cost $65,000

Total Cost $85,000

Marginal Cost Based ModelPlant A Produces all 10,000 Units

Plant AFixed Cost $20,000Variable Cost 50,000Total Cost $70,000

Plant BFixed Cost $5,000Variable Cost 0Total Cost $5,000

Total Cost $75,000

___________________________________________________________________________________________________________________________________________________________________________________

Page 8: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Time Frame Too Short

___________________________________________________________________________________________________________________________________________________________________________________

1 2 3 4 5 6 7 8 9 10 11 12 13-100

0

100

200

300

400

500

12 Month Model Underestimates Production Requirements

DemandProduceInventory

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24-50

0

50

100

150

200

250

300

350

400

450

A 24 Month Model Adequately Calculates the First 12 Months

DemandProduceInventory

Page 9: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Loosely defined: “Minimize the change in production level from period to period.”

Production Levelling

A typical method is to add the following to the objective function:+ 𝐿𝐸𝑉𝐸𝐿𝐶𝑂𝑆𝑇∗𝑡∈𝑇𝐼𝑀𝑙∈𝐿𝑂𝐶 𝐿𝑙,𝑡+ + 𝐿𝐸𝑉𝐸𝐿𝐶𝑂𝑆𝑇∗𝑡∈𝑇𝐼𝑀𝑙∈𝐿𝑂𝐶 𝐿𝑙,𝑡−

And the following set of constraints:

Where:LEVELCOST = A large penalty L+, L- = Change in Production Level

∀𝑙,𝑡 ∈𝐿𝑂𝐶,𝑇𝐼𝑀 𝑚∈𝑀𝐴𝐶 𝐾𝑈𝑆𝐸𝑝,𝑚,𝑙,𝑡𝑝∈𝑃𝑅𝑂 ∗ 𝑃𝑝,𝑚,𝑙,𝑡 − 𝑚∈𝑀𝐴𝐶 𝐾𝑈𝑆𝐸𝑝,𝑚,𝑙,𝑡+1𝑝∈𝑃𝑅𝑂 ∗ 𝑃𝑝,𝑚,𝑙,𝑡+1

− 𝐿𝑙,𝑡− + 𝐿𝑙,𝑡+ = 0

Page 10: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

The problem with this formulation is LP sees no difference between several small changes and one large one. It may actually prefer the large one as shown below.

Production Levelling (Continued)

D0 D1 D2 D3 D4 D5 D6Demand 5 5 8 10 10 10Production Level 5 8 8 8 8 8 8Delta Level 3 0 0 0 0 0Inventory 3 6 6 4 2 0

Page 11: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

A better formulation:

Production Levelling (Continued)

Instead of the previous change, add the following to the objective function:Notice only one variable per location for all time periods:

+ 𝐿𝐸𝑉𝐸𝐿𝐶𝑂𝑆𝑇𝑙∈𝐿𝑂𝐶 𝐿𝐿𝑙+ + 𝐿𝐸𝑉𝐸𝐿𝐶𝑂𝑆𝑇𝑙∈𝐿𝑂𝐶 𝐿𝐿𝑙−

In addition to the previous set of constraints, add the following two sets of constraints:

∀𝑙 ,𝑡∈𝐿𝑂𝐶 ,𝑇𝐼𝑀 𝐿𝑙 , 𝑡+¿ ≤𝐿𝐿𝑙

+¿ ¿¿

∀𝑙 ,𝑡∈𝐿𝑂𝐶 ,𝑇𝐼𝑀 𝐿𝑙 , 𝑡− ≤ 𝐿𝐿𝑙

Page 12: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

For the same demand pattern, the change in production level from period to period is much smaller.

Production Levelling (Continued)

Note: A similar approach works well for minimizing the change in other variables across multiple time periods.

D0 D1 D2 D3 D4 D5 D6Demand 5 5 8 10 10 10Production Level 5 6 7 8 9 9 9Delta Level 1 1 1 1 0 0Inventory 1 3 3 2 1 0

Page 13: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Loosely defined as, “Product must be <= k periods old.”

Inventory Being Reborn

Typically modeled as:

∀𝑝,𝑙,𝑡 ∈𝑃𝑅𝑂,𝐿𝑂𝐶,𝑇𝐼𝑀 𝐼𝑝,𝑙,𝑡 − 𝑇𝑝,𝑙,𝑙′ ,𝑡 𝑡+𝑘𝑡+1 𝑙′∈𝐿𝑂𝐶′ − 𝑇𝑝,𝑙,𝑐,𝑡

𝑡+𝑘𝑡+1𝑐∈𝐶𝑈𝑆 ≤ 0

Problem: LP will use the Tp,l,l’,t variables to bypass this constraint by moving inventory between locations. (see example next slide)

Page 14: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Assume: Production Capacity at Locations 1&2 = 1 unit/period.k=2

Inventory Being Reborn (continued)

Period 1 2 3 4Demand 0 0 0 7

Prod Loc (1) 1 1 1 1T(1,2) 1T(1,CUS) 3Inventory (1) 1 2 2

Prod Loc (2) 0 1 1 1Inventory (2) 1 3T(2,CUS) 4

Inventory is Re-bornI

Page 15: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Solutions:

Inventory Being Reborn (continued)

Easiest - Eliminate the Tp,l,l’,t variables. • To discuss: “execution” vs. “planning”

Harder - Add an additional time based domain to most of the variables and inventory balance rows.• This is beyond the scope of this presentation.

Page 16: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over Customers

Min Z =

Safety Stock Constraint: ∀𝑝 ,𝑙 ,𝑡∈𝑃𝑅𝑂 ,𝐿𝑂𝐶 ,𝑇𝐼𝑀 𝐼𝑝 , 𝑙 , 𝑡+𝑆𝑉 𝑝 , 𝑙 ,𝑡 ≥𝑆𝑆𝑝 ,𝑙 ,𝑡

Refresher:

Standard Practice:SOCOST = M SVCOST = 0.5*M

Where: SO= Stockout Amount SV= Safety Stock Violation Amount

Page 17: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersScenario

Period 1 2 3 4Demand 10 10 10 10Capacity 5 5 5 20SS Target 5 5 5 5

Page 18: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersHonor Safety Stock

Period 1 2 3 4Production 5 5 5 10Sales 0 5 5 10Stockout 10 5 5 0End. Inv. 5 5 5 5SO Penalty 10 5 5 0SS Penalty 0 0 0 0

Total Penalty---> 20

Note: There is an alternate solution with the same total penalty cost in which you ship 10 in Period 3.

Page 19: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersSatisfy Customer Demand over Safety Stock

Period 1 2 3 4Production 5 5 5 15Sales 5 5 5 10Stockout 5 5 5 0End. Inv. 0 0 0 5SO Penalty 5 5 5 0SS Penalty 2.5 2.5 2.5 0

Total Penalty --> 22.5

Page 20: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersSolution

𝑆𝑂𝐶𝑂𝑆𝑇𝑡=𝑛 ≫ 𝑆𝑉𝐶𝑂𝑆𝑇𝑡=𝑛

∀𝑡∈𝑇𝐼𝑀 𝑆𝑂𝐶𝑂𝑆𝑇 𝑡=𝑆𝑂𝐶𝑂𝑆𝑇 𝑡+1+𝑆𝑉𝐶𝑂𝑆𝑇 𝑡

Page 21: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersSolution

Maintain Safety Stock

Period 1 2 3 4SO Units 10 5 5 0SV Units 0 0 0 0SOCOST 2.5 2 1.5 1SVCOST 0.5 0.5 0.5 0.5SO Total 25 10 7.5 0SV Total 0 0 0 0

Total Penalty --> 42.5

Page 22: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Honoring Safety Stocks Over CustomersSolution

Satisfy Customers

Period 1 2 3 4SO Units 5 5 5 0SV Units 5 5 5 0SOCOST 2.5 2 1.5 1SVCOST 0.5 0.5 0.5 0.5SO Total 12.5 10 7.5 0SV Total 2.5 2.5 2.5 0

Total Penalty --> 37.5

Page 23: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Starting Inventory is “Free”

Objective function does not account for inventory consumption• LP may ship to inappropriate locations• Reporting Issues

Page 24: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Starting Inventory is “Free”

P= $10

T= $15

P= $15

T= $10

Plant BPlant A

No issue if inventory is consumed elsewhere during the model horizon.

Page 25: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Starting Inventory is “Free”Solution

Add to the objective function:

+ ∑𝑝∈𝑃𝑅𝑂

∑𝑙 ∈𝐿𝑂𝐶

𝑃𝐶𝑂𝑆𝑇 ∗𝐼𝐶𝑝 , 𝑙

Add a new set of constraints:∀𝑝,𝑙 ∈𝑃𝑅𝑂,𝐿𝑂𝐶 𝐼𝐶𝑝,𝑙 + 𝐼𝑝,𝑙,𝑡=𝑛 − 𝐼𝑝,𝑙,𝑡=1 ≥ 0

Note: Easily modified if you wish to capture increases in inventory as well.

Page 26: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Questions?

Page 27: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Thank you!

Page 28: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Appendix

Page 29: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Basic Formulation𝑀𝑖𝑛 𝑍= 𝑃𝐶𝑂𝑆𝑇𝑝,𝑚,𝑙,𝑡𝑡∈𝑇𝐼𝑀𝑙∈𝐿𝑂𝐶𝑚∈𝑀𝐴𝐶𝑝∈𝑃𝑅𝑂 ∗ 𝑃𝑝,𝑚,𝑙,𝑡 + 𝐼𝐶𝑂𝑆𝑇𝑝,𝑙,𝑡𝑡∈𝑇𝐼𝑀𝑙∈𝐿𝑂𝐶𝑝∈𝑃𝑅𝑂 ∗ 𝐼𝑝,𝑙,𝑡

+ 𝑇𝐶𝑂𝑆𝑇𝑝,𝑙,𝑙′ ,𝑡𝑡∈𝑇𝐼𝑀𝑙′ ∈𝐿𝑂𝐶′𝑙∈𝐿𝑂𝐶𝑝∈𝑃𝑅𝑂 ∗ 𝑇𝑝,𝑙,𝑙′ ,𝑡 + 𝑇𝐶𝐶𝑂𝑆𝑇𝑝,𝑙,𝑐,𝑡 𝑡∈𝑇𝐼𝑀𝑐∈𝐶𝑈𝑆𝑙∈𝐿𝑂𝐶𝑝∈𝑃𝑅𝑂 ∗ 𝑇𝐶𝑝,𝑙,𝑐,𝑡

+ 𝑆𝑂𝐶𝑂𝑆𝑇𝑝,𝑐,𝑡 𝑡∈𝑇𝐼𝑀𝑐∈𝐶𝑈𝑆𝑝∈𝑃𝑅𝑂 ∗ 𝑆𝑂𝑝,𝑐,𝑡 + 𝑆𝑉𝐶𝑂𝑆𝑇𝑝,𝑙,𝑡 𝑡∈𝑇𝐼𝑀𝑙∈𝐿𝑂𝐶𝑝∈𝑃𝑅𝑂 ∗ 𝑆𝑉𝑝,𝑙,𝑡

Where:PRO = Set of All ProductsMAC = Set of All MachinesLOC = Set of All LocationsTIM = Set of All Time PeriodsCUS = Set of All CustomersPCOST= Cost to ProduceICOST = Cost to Hold InventoryTCOST = Inter LOC Transportation Cost SOCOST = Stockout CostTCCOST = LOC to CUS Transportation Cost

SVCOST = Safety Stock Violation CostP = Amount to ProduceI = Inventory at the END of the PeriodT = Amount to Move Between LOC’sTC = Amount to Move Between LOC– CUSSO = Demand not FulfilledSV = Amount of Safety Stock ViolationK = CapacitySS = Safety Stock D = Demand

Page 30: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Basic Formulation (Continued)Subject To:Capacity Constraint:

Safety Stock:

Material Balance:

Demand:

∀𝑚 , 𝑙 , 𝑡∈𝑀𝐴𝐶 ,𝐿𝑂𝐶 ,𝑇𝐼𝑀 ∑𝑝∈𝑃𝑅𝑂

𝐾𝑈𝑆𝐸𝑝 ,𝑚 , 𝑙 ,𝑡∗𝑃𝑝 ,𝑚 , 𝑙 ,𝑡 ≤𝐾𝑚 , 𝑙 ,𝑡

∀𝑝 ,𝑙 ,𝑡∈𝑃𝑅𝑂 ,𝐿𝑂𝐶 ,𝑇𝐼𝑀 ∑𝑚∈𝑀𝐴𝐶

𝑃𝑝 ,𝑚 , 𝑙 , 𝑡+𝐼𝑝 ,𝑙 , 𝑡− 1− 𝐼𝑝 ,𝑙 , 𝑡+ ∑𝑙′∈𝐿𝑂𝐶′

𝑇 𝑝 ,𝑙′ , 𝑙 ,𝑡

∀𝑝 ,𝑐 , 𝑡∈𝑃𝑅𝑂 ,𝐶𝑈𝑆 ,𝑇𝐼𝑀 ∑𝑙∈𝐿𝑂𝐶

𝑇𝐶𝑝 ,𝑙 ,𝑐 ,𝑡+𝑆𝑂𝑝 ,𝑐 , 𝑡=𝐷𝑝 ,𝑐 ,𝑡

∀𝑝 ,𝑙 ,𝑡∈𝑃𝑅𝑂 ,𝐿𝑂𝐶 ,𝑇𝐼𝑀 𝐼𝑝 , 𝑙 , 𝑡+𝑆𝑉 𝑝 , 𝑙 ,𝑡 ≥𝑆𝑆𝑝 ,𝑙 ,𝑡

− ∑𝑙 ′∈𝐿𝑂𝐶′

𝑇 𝑝 ,𝑙 , 𝑙′ ,𝑡− ∑𝑐∈𝐶𝑈𝑆

𝑇 𝑝 ,𝑙 , 𝑐 ,𝑡=0

Page 31: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Model Size

Variables:

P – 100 * 5* 10 * 52 = 260,000 I – 100 * 10 * 52 = 52,000 T – 100 * 10 * 9 * 52 = 468,000 TC – 100 * 3 * 100 *52 = 1,560,000 SO = 100 * 100 * 52 = 520,000 SV = 100 * 10 *52 52,000

Total 2,912,000

Assumptions:

10 Plants 5 Machines / Plant 100 Products 100 Customers (Assume 3 Plants/Customer) 52 Periods

Page 32: Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks

Model Size (continued)

Note: Real Models tend to be smaller because not every combination exists.

Constraints:

Capacity – 10 * 5* 52 = 2,000 Balance – 100 * 10 * 52= 52,000 Demand – 100 * 100 * 52 = 520,000 Safety Stock - 100 * 10 * 52 = 52,000

Total 574,000