Talk Title: Pitfalls with Linear Programming Optimization of Supply chain Networks
Speaker Name: Robert StawickiSpeaker Title: Assistant Professor Ramapo College of NJ
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
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β
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
Basic Formulation (Continued)
To Discuss: Maximize vs. Minimize Stockout vs. Backorder Other Constraints Model Size
See Appendix
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
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
___________________________________________________________________________________________________________________________________________________________________________________
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
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
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
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:
βπ ,π‘βπΏππΆ ,ππΌπ πΏπ , π‘+ΒΏ β€πΏπΏπ
+ΒΏ ΒΏΒΏ
βπ ,π‘βπΏππΆ ,ππΌπ πΏπ , π‘β β€ πΏπΏπ
β
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
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)
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
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.
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
Honoring Safety Stocks Over CustomersScenario
Period 1 2 3 4Demand 10 10 10 10Capacity 5 5 5 20SS Target 5 5 5 5
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.
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
Honoring Safety Stocks Over CustomersSolution
πππΆππππ‘=π β« πππΆππππ‘=π
βπ‘βππΌπ πππΆπππ π‘=πππΆπππ π‘+1+πππΆπππ π‘
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
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
Starting Inventory is βFreeβ
Objective function does not account for inventory consumptionβ’ LP may ship to inappropriate locationsβ’ Reporting Issues
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.
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.
Questions?
Thank you!
Appendix
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
Basic Formulation (Continued)Subject To:Capacity Constraint:
Safety Stock:
Material Balance:
Demand:
βπ , π , π‘βππ΄πΆ ,πΏππΆ ,ππΌπ βπβππ π
πΎπππΈπ ,π , π ,π‘βππ ,π , π ,π‘ β€πΎπ , π ,π‘
βπ ,π ,π‘βππ π ,πΏππΆ ,ππΌπ βπβππ΄πΆ
ππ ,π , π , π‘+πΌπ ,π , π‘β 1β πΌπ ,π , π‘+ βπβ²βπΏππΆβ²
π π ,πβ² , π ,π‘
βπ ,π , π‘βππ π ,πΆππ ,ππΌπ βπβπΏππΆ
ππΆπ ,π ,π ,π‘+πππ ,π , π‘=π·π ,π ,π‘
βπ ,π ,π‘βππ π ,πΏππΆ ,ππΌπ πΌπ , π , π‘+ππ π , π ,π‘ β₯πππ ,π ,π‘
β βπ β²βπΏππΆβ²
π π ,π , πβ² ,π‘β βπβπΆππ
π π ,π , π ,π‘=0
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
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