Capacitated plant location - casestudy P2

Supply Chain Analytics in Python

Aaren Stubberfield

SuSupply Chain Analytics Mgr.

Geconstr. locatiemodel voor fabrieken

Modelleren

  • Productie in regionale faciliteiten
    • Twee fabriekformaten (laag / hoog)
  • Productie exporteren naar andere regio's
  • Productielocaties openen / sluiten

afbeelding van wereldbol met regionale productie

Supply Chain Analytics in Python

Beslissingsvariabelen

Wat we sturen:

  • x$_{\text{ij}}$ = hoeveelheid geproduceerd op locatie _i_ en verzonden naar _j_
  • y$_{\text{is}}$ = 1 als fabriek op locatie _i_ met capaciteit _s_ open is, 0 als gesloten
    • s = lage of hoge capaciteit
Supply Chain Analytics in Python

Beperkingen

  • Totale productie = totale vraag
    • $\sum_{i=1}^{n}$ x$_{ij}$ = D$_{\text{j}}$ voor $j = 1, ..., m$
    • $n$ = aantal productielocaties
    • $m$ = aantal markten of vraagpunten per regio
Supply Chain Analytics in Python

Beperkingen

  • Totale productie ≤ totale productiecapaciteit
    • $\sum_{j=1}^{m}$ x$_{ij}$ ≤ $\sum_{s=1}$ K$_{is}$y$_{is}$
    • K$_{is}$ = potentiële capaciteit van fabriek _i_ met grootte _s_
Supply Chain Analytics in Python
from pulp import *

# Initialize Class
model = LpProblem("Capacitated Plant Location Model", LpMinimize)

# Define Decision Variables
loc = ['A', 'B', 'C', 'D', 'E']
size = ['Low_Cap','High_Cap']
x = LpVariable.dicts("production_", [(i,j) for i in loc for j in loc], 
                      lowBound=0, upBound=None, cat='Continuous')
y = LpVariable.dicts("plant_", [(i,s) for s in size for i in loc], cat='Binary')

# Define Objective Function
model += (lpSum([fix_cost.loc[i,s]*y[(i,s)] for s in size for i in loc])
          + lpSum([var_cost.loc[i,j]*x[(i,j)] for i in loc for j in loc]))
Supply Chain Analytics in Python

Codevoorbeeld (vervolg)

# Define the Constraints
for j in loc:
   model += lpSum([x[(i, j)] for i in loc]) == demand.loc[j,'Dmd']

for i in loc: model += lpSum([x[(i, j)] for j in loc]) <= lpSum([cap.loc[i,s]*y[(i,s)] for s in size])
Supply Chain Analytics in Python

Samenvatting

Capacitated Plant Location Model:

  • Beperkingen
    • Totale productie = totale vraag
    • Totale productie ≤ totale productiecapaciteit
Supply Chain Analytics in Python

Tijd voor een review

Supply Chain Analytics in Python

Preparing Video For Download...