You are on page 1of 8

DALHOUSIE UNIVERSITY

Usemore Soap
Company
Supply Chain 5-Year Plan
Eric Noel

Abstract
The Usemore soap company currently has 4 plants and 10 warehouses in its
distribution network. In response to forecasted demands in 5 years, Usemore is
considering building 2 new plants and 6 new warehouses. The problem is modeled
as a linear program with objective to minimize cost. However, the model must be
formulated as piecewise linear in order to account for the non-linear warehousing
costs. The recommended course of action for Usemore is to build 1 new plant, shut
down 5 of the existing public warehouses, and open 5 of the new warehouses.

Table of Contents
Abstract...................................................................................................................... ii
1. Introduction............................................................................................................ 1
2. Current Situation.................................................................................................... 2
2.1 Problem Statement............................................................................................ 2
2.2 Problem Data..................................................................................................... 2
3. Proposed Model...................................................................................................... 2
3.1 Explanation....................................................................................................... 2
3.2 Formulation....................................................................................................... 2
4. Solution.................................................................................................................. 4
4.1 Plants................................................................................................................ 4
4.2 Warehouses....................................................................................................... 4
4.3 Average Inbound and Outbound Distances.......................................................5
5. Discussion.............................................................................................................. 5
6. Conclusion.............................................................................................................. 5
7. Bibliography........................................................................................................... 5

1. Introduction
The Usemore soap company currently has 4 plants and 10 warehouses within its
distribution network. In response to forecasted demands in 5 years, Usemore is
considering building 2 new plants and 6 new warehouses.
2

The problem was solved using a linear programming approach utilizing a GLPK (GNU
MathProg) formulation. In addition to this report, the following files were required to
solve the problem:

Usemore.mod : GLPK model


Plants.csv : Model plants data in CSV format
Potential_plants.csv: Model potential plants data in CSV format
Warehouses.csv: Model warehouses plants data in CSV format
Potential_warehouses.csv: Model potential warehouses data in CSV format
Costing_info.csv: Model warehouse costing data in CSV format
Demand.csv: Model customer demand data in CSV format

Using glpsol or gusek, the model is then solved and generates output files:

optimal_warehouse_flows.csv: Optimal warehouse to customer flows in CSV

format
optimal_plant_flows.csv: Optimal plant to warehouse flows in CSV format

The purpose of this report is to discuss the formulation of the MIP and answer the
following questions:
1.
2.
3.
4.
5.
6.

How many plants and warehouses should be operated?


Where should they be located?
Which customers should be assigned to which warehouse?
Which warehouses should be assigned to which plants?
What is the average length of the inbound warehouse flows?
What is the average length of the outbound warehouse flows?

2. Current Situation
2.1 Problem Statement
A detailed problem statement is included in Appendix A: Usemore.doc

2.2 Problem Data


Plant and warehouse locations, various costs, customer demands and forecasts are
included in Appendix B: Usemore.xls

3. Proposed Model
This section will discuss the model adapted to the problem as well as its
formulation.

3.1 Explanation
The problem is modeled as a linear program with objective to minimize the cost of
the distribution network. However, the model must be formulated as piecewise
linear in order to account for the non-linear warehousing costs.

Figure 1 - Non-linear warehousing cost (Warehouse 1)

The function was converted into 10 linear pieces. Additionally, since there are
toggle variables (to build a plant or not to build), the problem changes from an LP to
an MIP (Mixed integer program).

3.2 Formulation
The following is the actual GLPK model formulation:
#
#
#
#

Usemore piecewise GLPK implementation (GNU MathProg)


Written by Eric Noel
December 5, 2010
Dalhousie University

set P;
set PP;
set EP, default P diff PP;

# Set of plants (includes potentials)


# Subset of potential plants
# Subset of existing plants

set
set
set
set
set

W;
# Set of warehouses (including potentials)
PW;
# Subset of potential warehouses
EW, default W diff PW; # Subset of existing warehouses
D;
# Demand Zones
n, default 0..9;
# Piecewise pieces

# Parameters
param XP{i in P};
param YP{i in P};
param XW{i in W};
param YW{i in W};
param PC{i in P};
param PT{i in P};
param PV{i in P};
param GF{i in D};
param XD{i in D};
param YD{i in D};
param DD{i in D};
param SR{i in W};
param HR{i in W};
param order_cost{i in W};
param order_size{i in W}; # Order
param customer_cost{i in W};
param customer_size{i in W};

#
#
#
#
#
#
#
#
#
#
#
#

Plant X Coordinate
Plany Y Coordinate
Warehouse X Coordinate
Warehouse Y Coordinate
Plant capacity
Plant throughput
Plant variable cost
5-yr growth factor
Demand Zone X Coordinate
Demand Zone Y Coordinate
Demand Zone Actual Demand
Storage rate
# Handling rate
# Order Cost
Size
# Customer Cost
# Customer Size

# Piecewise X values
param a{i in n}, default (350000/10)*i;
# Piecewise Y values
param b{i in n, j in W}, default (a[i])^0.58 * (SR[j] * 293.8 + HR[j] + 35.3);
# Variables
var UseWarehouse{i in W}, binary; # Build warehouse i (No cost)
var BuildPlant{i in P}, binary;
# Build or upgrade (potential) plant i
var x1{i in P, j in W}, >=0;
# Flow from factory to warehouses and demand zones
var x2{i in W, j in D}, >=0;
# Flow from warehouse to demand zone
var lambda{i in n, j in W}, >=0, <= 1; # Piecewise lambdas
var z{i in n, j in W}, binary;
# Adjency variables
# Input parameters from CSV files
table dataset1 IN "CSV" "plants.csv" :
P <- [Plant], XP ~ X, YP ~ Y, PC ~ capacity, PT ~ throughput, PV ~ variable_cost;
table dataset2 IN "CSV" "potential_plants.csv" :
PP <- [Plant];
table dataset3 IN "CSV" "warehouses.csv" :
W <- [Warehouse], XW ~ X, YW ~ Y;
table dataset4 IN "CSV" "potential_warehouses.csv" :
PW <- [Warehouse];
table dataset6 IN "CSV" "demand.csv" :
D <- [center], XD ~ x, YD ~ y, DD ~ demand, GF ~ GF;
table dataset7 IN "CSV" "costing_info.csv" :
[Warehouse], SR ~ storage, HR ~ handling, order_cost ~ order_cost, order_size ~ order_size, customer_cost ~
customer_cost, customer_size ~ customer_size;
# Objective
minimize cost: sum{i in P, j in W} (0.92 + x1[i,j] * (0.0034*(0.36*((XP[i]-XW[j])^2 + (YP[i]-YW[j])^2)^0.5) + PV[i] +
order_cost[j]/order_size[j]))
+ sum{i in W, j in D} (5.45 + x2[i,j] * (0.0037*(0.36*((XW[i]-XD[j])^2 + (YW[i]-YD[j])^2)^0.5))
+customer_cost[i]/customer_size[i])
+ sum{i in P} 4000000*BuildPlant[i]
+ sum{i in n, j in W} lambda[i,j]*b[i,j];
# Demand must be met
s.t. Demand{j in D}: sum{i in W} x2[i,j] >= DD[j]*GF[j];
# Flow from potential plant must be 0 if warehouse is not built.
s.t. Plants{i in PP}: sum{j in W} x1[i,j] <= BuildPlant[i]*999999999;
# Flow from potential warehouses must be 0 if warehouse is not built.

s.t. Warehouses1{i in W}: sum{j in D} x2[i,j] <= UseWarehouse[i]*350000;


s.t. Warehouses2{i in W}: sum{j in D} x2[i,j] >= UseWarehouse[i]*10400;
# Flow from warehouse to customers must equal flow from plants to warehouses
s.t. Flow{i in W}: sum{j in P} x1[j,i] - sum{j in D} x2[i,j] = 0;
# Plant capacity constraint
s.t. PlantCapacity{i in P}: sum{j in W} x1[i,j] <= PC[i] + 1000000*BuildPlant[i];
# Piecewise constraints
s.t. lambda1{j in W}: sum{i in n} lambda[i,j] = 1;
s.t. lambda2{i in n, j in W}: z[i,j] - lambda[i,j] >= 0;
s.t. WarehouseAsFnLambda{i in W}: sum{j in P} x1[j,i] - sum{k in n} a[k] * lambda[k,i] <= 0;
s.t. adjency{i in W, j in 0 .. 7, k in (j+2) .. 9}: z[j,i] + z[k,i] <= 1;
# Display Solution
solve;
display cost, UseWarehouse, BuildPlant;
# Create output file for plant flows
table tab_result1{i in P, j in W} OUT "CSV" "optimal_plant_flows.csv" :
i ~ plant, j ~ market, x1[i,j] ~ flow;
# Create output file for warehouse flows
table tab_result2{i in W, j in D} OUT "CSV" "optimal_warehouse_flows.csv" :
i ~ warehouse, j ~ market, x2[i,j] ~ flow;
end;

4. Solution
The recommended course of action for Usemore is to build 1 new plant, shut down 5
of the existing public warehouses, and open 5 of the new warehouses for a total
cost of $46,691,314. Plants and warehouse configurations are summarized in Table
1 and Table 2.

4.1 Plants
The following is a summary of the GLPK output file optimal_plant_flows.csv:
Table 1: Warehouses to Plants

Plant
COVINGTON
,KY
NEW
YORK,NY
ARLINGTON,
TX
LONG
BEACH,CA
MEMPHIS,T
N

Warehouses
COVINGTON,KY, CHICAGO,IL, CLEVELAND,OH
NEW YORK,NY
ARLINGTON,TX
LONG BEACH,CA
MEMPHIS,TN, DAVENPORT,IA, NEW ORLEANS,LA

4.2 Warehouses
The following is a summary of the GLPK output file optimal_warehouse_flows.csv:
Table 2: Customers to Warehouses

Warehouse
COVINGTON,K
Y
BOSTON,MA
MEMPHIS,TN

CLEVELAND,O
H
DAVENPORT,IA
NEW
ORLEANS,LA
NEW YORK,NY
ARLINGTON,TX

LONG
BEACH,CA
CHICAGO,IL

Customers
1, 2, 5, 6, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 80, 82, 83,
85, 86, 87, 91, 115, 116, 117, 118, 139, 140
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 60, 61
3, 4, 15, 29, 30, 31, 32, 33, 34, 35, 36, 39, 89, 90, 92, 93, 100,
101, 104, 105, 107, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 141,
142, 143, 144, 145, 146, 147, 148, 151, 153, 154, 155, 156
7, 8, 17, 66, 68, 69, 70, 71
92, 94
149
57, 58, 59, 60,
81, 83, 84
37, 38, 40, 41,
152, 157, 158,
169, 170, 171,
173, 176, 177,
188, 189, 191
22, 23, 24, 25,

62, 63, 64, 65, 67, 72, 73, 74, 75, 76, 77, 78, 79,
102,
159,
172,
178,

106,
160,
173,
179,

108,
161,
174,
180,

109,
162,
175,
181,

110, 111, 112, 113, 114, 150,


163, 164, 165, 166, 167, 168,
190
182, 183, 184, 185, 186, 187,

26, 27, 28, 88, 95, 96, 97, 98, 99, 103

4.3 Average Inbound and Outbound Distances


The following summarizes the average distances covered after having applying the
K = 0.36 distance conversion factor:

Average inbound distance covered: 363.60 (unit distance)


Average outbound distance covered: 387.06 (unit distance)

These distances were computed within the model, outputted to


optimal_plant_flows.csv and optimal_warehouse_flows.csv, and then averaged.

5. Discussion
The implementation of the GLPK MIP was successful. However, the 10-piece
piecewise approximation has likely altered the optimal solution, since the LP
relaxation suggested that plant flows be anywhere from 100-100,000 and the MIP
is only accounting for a few specific cases. It is in fact possible to break the cost
6

function into more pieces, but the processing time required to solve the model
becomes too lengthy (several hours).
However, the implementation is successful and flexible. Parameters of the CSV files
may easily be altered and the model may solve different cases. For example, if
there are an additional 20 warehouse locations to consider, simply add them to the
data set and re-run the model. Additionally, if time is available, the cost function
may be broken into several more pieces for a more optimal solution.

6. Conclusion
As stated, the recommended course of action for Usemore is to build 1 new plant,
shut down 5 of the existing public warehouses, and open 5 of the new warehouses
for a total cost of $46,691,314. Should Usemore want to consider even more plants
and warehouses, the MIP formulation provided is flexible enough to easily
accommodate new data sets.

7. Bibliography
Uday Venkatadri, IENG 4579: Supply Chain Managenent The Supply Chain
Design Problem, Department of Industrial Engineering, Dalhousie University, 2008

You might also like