Class 3 and 4 - SunOil Cost Minimization Problem - Excel Help File
Class 3 and 4 - SunOil Cost Minimization Problem - Excel Help File
Note: The model is built step by step in each sheet. There are 10 sheets which take through the
In each sheet, in rows 1 to 3, I specify which rows and columns have been added in that
Use sheet 1 as your starting point. Move to sheet 2 and follow the steps in sheet 2. Once you finish that move on t
Low Capacity High Capacity
Decision Variables
Demand Regions
Supply Regions
N. America
S. America
Europe
Asia
Africa
n this sheet. Cells N5 to N8 has the mathematical definition of decision variables
Rows 15 to 23 give the setup of the decision variables in Excel and the explanation.
Low
capacity High capacity
Plant plant Cells C19 to G23 are the xij decision variables. For example, D21 denotes the numb
(1=open, (1=open,
0=closed) 0=closed)
Cells H19: H23 are the yil decision variables. For example, H22 denotes whether a l
Cells I19: I23 are the yih decision variables. For example, I23 denotes whether a hig
nd the explanation.
example, D21 denotes the number of units transported from Europe to South America
xample, H22 denotes whether a low capacity plant should be opened in Asia or not. 0 denoting do NOT open a low capacity plant and 1 de
ample, I23 denotes whether a high capacity plant should be opened in Africa or not. 0 denoting do NOT open a high capacity plant and 1 d
w capacity plant and 1 denoting - open a low capacity plant in Asia.
gh capacity plant and 1 denoting - open a high capacity plant in Asia.
Sun Oil - Objective Function for Cost Minimization is added in this sheet.
Decision Variables
Demand Regions
Supply Regions
N. America
S. America
Europe
Asia
Africa
Cell C25 has the value of the objective function. The formula for calculating the objective function in C25 is typed o
SUMPRODUCT(H6:H10, H19:H23) calculates the total fixed cost of opening low capacity plants. This is done by mu
SUMPRODUCT(J6:J10, I19:I23) calculates the total fixed cost of opening high capacity plants. This is done by multip
SUMPRODUCT(C6:G10, C19:G23) calculates the total cost of transporting goods from the supply regions to the dem
This multiplication is carried out for each supply and demand location.
dded in this sheet. Cells N5 to N8 has the mathematical statement of the objective function.
Row 25 gives the calculation of the objective function in Excel and the Excel formu
Rows 27 to 31 give detailed explanation for how the objective function formula is
(in
Low Capacity High Capacity
s)
Fixed cost Capacity Fixed cost Capacity
Africa (5) (in 1000s of (in millions of (in 1000s of (in millions of
$) units) $) units) Objective Function
115 6,000 10 9,000 20 yil = 16,000y1l
Minimize: if plant i+is4,500y2l
open wit+
100 4,500 10 6,750 20 yih =+16,750
9,000y1h if plant
y2hi is+open
9,750wiy
111 6,500 10 9,750 20 81x11 x+ij =92quantity
x12 + 101shipped
x13 + (in
130m
74 4,100 10 6,150 20 117 x21 + 77x22 + 108x23 + 98
71 4,000 10 6,000 20 102 x31 + 105xx32 + 95 x33 +…
7
Low
capacity High capacity
Plant plant
(1=open, (1=open,
Africa
0=closed) 0=closed)
SUMPRODUCT(J6:J10,I19:I23) + SUMPRODUCT(C6:G10,C19:G23)
ve Function
e: 6,000y1l + 4,500y2l + 6,500y3l + 4,100y4l + 4,000y5l +
h + 6,750 y2h + 9,750 y3h + 6,150 y4h + 6,000 y5h +
92 x12 + 101 x13 + 130 x14 + 115 x15 +
+ 77x22 + 108x23 + 98 X24 + 100 x25 +
+ 105xx32 + 95 x33 +…. + 71 x55
ts (given in H6:H10) by the decision variables denoting whether to open a low capacity plant in a specific continent or not (given in H19:H2
(given in J6:J10) by the decision variables denoting whether to open a high capacity plant in a specific continent or not (given in I19:I23)
from supply location i to demand location j by the decision variable denoting how many units are transported from supply location i to dem
t or not (given in H19:H23)
r not (given in I19:I23)
m supply location i to demand location j.
Sun Oil - Supply Constraints for Cost Minimization is added in this sheet.
Decision Variables
Demand Regions
Supply
Regions
N. America S. America Europe Asia Africa
N. America
S. America
Europe
Asia
Africa
Objective functi -
Capacity Capacity
Fixed cost (in Fixed cost
1000s of $)
(in millions of
(in 1000s of $)
(in millions of Supply Constraints
units) units)
6,000 10 9,000 20 N. America: x11 + x12 + x13 + x14 + x
4,500 10 6,750 20 S. America: x21 + x22 + x23 + x24 + x
6,500 10 9,750 20 Europe: x31 + x32 + x33 + x34 + x
4,100 10 6,150 20 Asia: x41 + x42 + x43 + x44 + x
4,000 10 6,000 20 Africa: x51 + x52 + x53 + x54 + x
Example: The LHS of the N.America supply constraint is the total amount transported out of N.America.
This equals the amount transported from N.America to N.America(C19) + amount transported from N.America to S. America(D19) + amo
In other words this is sum(C19:G19)
The RHS of the N.America constraint is the total supply availablein N.America
This equals the supply at the low capacity plant(I6) if there is a low capacity plant(H19) + the supply at the high capacity plan(K6)t if there
This is I6*H19+K6*I19
The inequality is of <type because amounted transported out has to be at most equal to supply.
aints are written in Excel
to S. America(D19) + amount transported from N. America to Europe (E19) + amount transported from N.America to Asia(F19) + amount
Decision Variables
Demand Regions
Supply
Regions
N. America S. America Europe Asia Africa
N. America
S. America
Europe
Asia
Africa
Objective functi -
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 0 <= 0
Europe 0 <= 0
Asia 0 <= 0
Africa 0 <= 0
Capacity Capacity
Fixed cost (in Fixed cost
1000s of $)
(in millions of
(in 1000s of $)
(in millions of Demand Constraints
units) units)
6,000 10 9,000 20 N. America: x11 + x21 + x31 + x41 + x
4,500 10 6,750 20 S. America: x12 + x22 + x32 + x42 + x
6,500 10 9,750 20 Europe: x13 + x23 + x33 + x43 + x
4,100 10 6,150 20 Asia: x14 + x24 + x34 + x44 + x
4,000 10 6,000 20 Africa: x15 + x25 + x35 + x45 + x
Example: The LHS of the demand constraint for Europe is the total amount transported to Europe
This equals amount transported from N.America to Europe(E19) plus amount transported from S. America to
In other words the LHS of the demand constraint for Europe is sum(E19:E23)
The RHS of the demand constraint for Europe is the actual demand at Europe which is given in cell E11 as 14.
hence the RHS of the demand constraint for Europe is E11.
All demand must be met and so the amount transported to Europe must equal demand at Europe.
nd constraints
raints are written in Excel
rted to Europe
ported from S. America to Europe(E20) plus amount transported from Europe to Europe(E21) plus amount transported from Asia to Euro
h is given in cell E11 as 14.
mand at Europe.
ansported from Asia to Europe(E22) plus amount transported from Africa to Europe (E23)
Sun Oil - At most one facility in each continent is added in this sheet.
Decision Variables
Demand Regions
Supply
Regions
N. America S. America Europe Asia Africa
N. America
S. America
Europe
Asia
Africa
Objective functi -
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 0 <= 0
Europe 0 <= 0
Asia 0 <= 0
Africa 0 <= 0
Capacity Capacity
Fixed cost (in Fixed cost
1000s of $)
(in millions of
(in 1000s of $)
(in millions of At most one facility in each continent
units) units)
6,000 10 9,000 20 N. America: y1l + y1h
4,500 10 6,750 20 S. America: y2l + y2h
6,500 10 9,750 20 Europe: y3l + y3h
4,100 10 6,150 20 Asia: y4l + y4h
4,000 10 6,000 20 Africa: y5l + y5h
y in each continent
< 1
< 1
< 1
< 1
< 1
nt (H22) or one high capacity plant (I22) in Asia.
Sun Oil - Cost Minimization. This includes the Solver window for Decision Varia
Decision Variables
Demand Regions
Supply Regions
N. America S. America Europe Asia Africa
N. America
S. America
Europe
Asia
Africa
Objective functio -
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 0 <= 0
Europe 0 <= 0
Asia 0 <= 0
Africa 0 <= 0
nu bar on the top pick, "Data" and then "Solver", the following window opens up
" cell, pick the cell in your Excel sheet which has the objective function value.
Decision Variables
Demand Regions
Supply Regions
N. America
S. America
Europe
Asia
Africa
Objective function -
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 0 <= 0
Europe 0 <= 0
Asia 0 <= 0
Africa 0 <= 0
Low
capacity High capacity
Plant plant
(1=open, (1=open,
0=closed) 0=closed)
ooks like the picture given below once you add, the objective function,
oose simplex LP and pick "Min". Next we add the constraints.
nts that says that each continent can have at most one plant by adding a constraint again.
Sun Oil - Cost Minimization. This includes the completed Solver window and ho
Decision Variables
Demand Regions
Supply Regions
N. America
S. America
Europe
Asia
Africa
Objective function -
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 0 <= 0
Europe 0 <= 0
Asia 0 <= 0
Africa 0 <= 0
Once you click "ok", the Solver window looks like the
Low
capacity High capacity
Plant plant
(1=open, (1=open,
0=closed) 0=closed)
Decision Variables
Demand Regions
Supply Regions
N. America 0 0 0 0 0
S. America 12 8 0 0 0
Europe 0 0 0 0 0
Asia 1.776356839E-15 0 4 16 0
Africa 0 0 10 0 7
Constraints
Supply Region LHS inequality RHS
N. America 0 <= 0
S. America 20 <= 20
Europe 0 <= 0
Asia 20 <= 20
Africa 17 <= 20
Low
capacity High capacity
Plant plant
(1=open, (1=open,
0=closed) 0=closed) The default choice is "Keep Solver Solution".
0 0 If you leave at default, the value of decision variables
0 1 The value of the objective function at optimality is giv
0 0
0 1
0 1
w you the window that opens up when you click on "Solve" in the Solver window.