You are on page 1of 5

Distribution Unlimited Co.

Minimum Cost Flow Problem


From To Ship Capacity Unit Cost Nodes Net Flow
F1 W1 30 700 F1 80 =
F1 DC 50 <= 50 300 F2 70 =
DC W1 30 <= 50 200 DC 0 =
DC W2 50 <= 50 400 W1 -60 =
F2 DC 30 <= 50 500 W2 -90 =
F2 W2 40 1,000

Total Cost 117000

Solver Parameters J
Set Objective Cell: Total Cost 3 Net Flow
To: Min
By Changing Variable Cells: Ship 4 a=SUMIF(FROM,I4,Ship)-SUMIF(TO,I4,Ship)
Subject to the Constraints: 5 a=SUMIF(FROM,I5,Ship)-SUMIF(TO,I5,Ship)
D5:D8 <= Capacity 6 a=SUMIF(FROM,I6,Ship)-SUMIF(TO,I6,Ship)
NetFlow = SupplyDemand
7 a=SUMIF(FROM,I7,Ship)-SUMIF(TO,I7,Ship)
Solver Options: 8 a=SUMIF(FROM,I8,Ship)-SUMIF(TO,I8,Ship)
Make Variables Nonnegative
Solving Method: Simplex LP
C D
11 Total Cost SUMPRODUCT(Ship,Unit Cost)
Supply/Demand Range Name Cells
80 Capacity F5:F8
70 From B4:B9
0 NetFlow J4:J8
-60 Nodes I4:I8
-90 Ship D4:D9
SupplyDemand L4:L8
To C4:C9
TotalCost D11
UnitCost G4:G9

J
Net Flow
F(FROM,I4,Ship)-SUMIF(TO,I4,Ship)
F(FROM,I5,Ship)-SUMIF(TO,I5,Ship)
F(FROM,I6,Ship)-SUMIF(TO,I6,Ship)
F(FROM,I7,Ship)-SUMIF(TO,I7,Ship)
F(FROM,I8,Ship)-SUMIF(TO,I8,Ship)

D
SUMPRODUCT(Ship,Unit Cost)
Little Town Fire Department Shortest Path Problem

From To On Route Distance Nodes


Fire St. A 1 3 Fire St.
Fire St. B 0 6 A
Fire St. C 0 4 B
A B 1 1 C
A D 0 6 D
B A 0 1 E
B C 0 2 F
B D 0 4 G
B E 1 5 H
C B 0 2 Farm Comm.
C E 0 7
D E 0 3
D F 0 8
E D 0 3
E F 1 6
E G 0 5
E H 0 4
F G 0 3
F Farm Comm. 1 4
G F 0 3
G H 0 2 Range Name
G Farm Comm. 0 6 Distance
H G 0 2 From
H Farm Comm. 0 7 NetFlow
Nodes
Total Distance: 19 OnRoute
SupplyDemand
To
TotalDistance

Solver Parameters
Set Objective Cell: TotalDistance
To: Min
By Changing Variable Cells:
OnRoute
Subject to the Constraints:
Netflow = SupplyDemand

Solver Options:
Make Variables Nonnegative
Solving Method: Simplex LP
Make Variables Nonnegative
Solving Method: Simplex LP
Net Flow Supply/Demand
1 = 1
0 = 0
0 = 0
0 = 0
0 = 0
0 = 0
0 = 0
0 = 0
0 = 0
-1 = -1

I
3 Net Flow
4 a=SUMIF(FROM,H4,OnRoute)-SUMIF(TO,H4,OnRoute)
5 a=SUMIF(FROM,H5,OnRoute)-SUMIF(TO,H5,OnRoute)
Cells 6 a=SUMIF(FROM,H6,OnRoute)-SUMIF(TO,H6,OnRoute)
F4:F27 7 a=SUMIF(FROM,H7,OnRoute)-SUMIF(TO,H7,OnRoute)
B4:B27 8 a=SUMIF(FROM,H8,OnRoute)-SUMIF(TO,H8,OnRoute)
I4:I13 9 a=SUMIF(FROM,H9,OnRoute)-SUMIF(TO,H9,OnRoute)
H4:H13 10 a=SUMIF(FROM,H10,OnRoute)-SUMIF(TO,H10,OnRoute)
D4:D27 11 a=SUMIF(FROM,H11,OnRoute)-SUMIF(TO,H11,OnRoute)
K4:K13 12 a=SUMIF(FROM,H12,OnRoute)-SUMIF(TO,H12,OnRoute)
C4:C27 13 a=SUMIF(FROM,H13,OnRoute)-SUMIF(TO,H13,OnRoute)
D29
C D
29 Total Distance a=SUMPRODUCT(OnRoute,Distance)

You might also like