You are on page 1of 4

A B C D E F G H I J

1 Littletown Fire Department Shortest Path Problem


2
3 From To On Route Distance Nodes Net Flow Supply/Demand
4 Fire St. A 1 3 Fire St. 1 =
5 Fire St. B 0 6 A 0 =
6 Fire St. C 0 4 B 0 =
7 A B 1 1 C 0 =
8 A D 0 6 D 0 =
9 B A 0 1 E 0 =
10 B C 0 2 F 0 =
11 B D 0 4 G 0 =
12 B E 1 5 H 0 =
13 C B 0 2 Farm Com. -1 =
14 C E 0 7
15 D E 0 3 Data Cells
16 D F 0 8 Changing Data Cells
17 E D 0 3 Objective Cell
18 E F 1 6
19 E G 0 5 I
20 E H 0 4 3 NetFlow
21 F G 0 3 4 =SUMIF(From,H4,OnRoute)-SUMIF(To,
22 F Farm Com. 1 4 5 =SUMIF(From,H5,OnRoute)-SUMIF(To,
23 G F 0 3 6 =SUMIF(From,H6,OnRoute)-SUMIF(To,
24 G H 0 2 7 =SUMIF(From,H7,OnRoute)-SUMIF(To,
25 G Farm Com. 0 6 8 =SUMIF(From,H8,OnRoute)-SUMIF(To,
26 H G 0 2 9 =SUMIF(From,H9,OnRoute)-SUMIF(To,
27 H Farm Com. 0 7 10 =SUMIF(From,H10,OnRoute)-SUMIF(To
28 11 =SUMIF(From,H11,OnRoute)-SUMIF(To
29 Total Distance 19 12 =SUMIF(From,H12,OnRoute)-SUMIF(To
30 13 =SUMIF(From,H13,OnRoute)-SUMIF(To
31
32 Objective: Determine the shortest path from the fire station to each of the farming communities.
33
34
35
36
37
38
39
40
41
42
43
44
45 Solver Parameters
46 Set Objective Cell: TotalDistance
To: Min
By Changing Variable Cells:
OnRoute
Subject to the Constraints:
NetFlow=SupplyDemand
Solver Options:
Make Variables Nonnegative
A Set Objective
B Cell: TotalDistance
C D E F G H I J
47 To: Min C D
By Changing Variable Cells:
48 OnRoute 29 Total Distance =SUMPRODUCT(OnRoute,Distance)
49 Subject to the Constraints:
50 NetFlow=SupplyDemand
Solver Options:
51 Make Variables Nonnegative
Solver Screenshot:
52 Solving Method: Simplex LP
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
K L M N O
1
2
3 Supply/Demand
4 1 Range Name Cells
5 0 Distance F4:F27
6 0 From B4:B27
7 0 NetFlow I4:I13
8 0 Nodes H4:H13
9 0 OnRoute D4:D27
10 0 SupplyDemandK4:K13
11 0 To C4:C27
12 0 TotalDistance D29
13 -1
14
15 Data Cells
16Changing Data Cells
17 Objective Cell
18
19 I
20 NetFlow
21
=SUMIF(From,H4,OnRoute)-SUMIF(To,H4,OnRoute)
22
=SUMIF(From,H5,OnRoute)-SUMIF(To,H5,OnRoute)
23
=SUMIF(From,H6,OnRoute)-SUMIF(To,H6,OnRoute)
24
=SUMIF(From,H7,OnRoute)-SUMIF(To,H7,OnRoute)
25
=SUMIF(From,H8,OnRoute)-SUMIF(To,H8,OnRoute)
26
=SUMIF(From,H9,OnRoute)-SUMIF(To,H9,OnRoute)
27
=SUMIF(From,H10,OnRoute)-SUMIF(To,H10,OnRoute)
28
=SUMIF(From,H11,OnRoute)-SUMIF(To,H11,OnRoute)
29
=SUMIF(From,H12,OnRoute)-SUMIF(To,H12,OnRoute)
30
=SUMIF(From,H13,OnRoute)-SUMIF(To,H13,OnRoute)
31
32
f the farming communities.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
K L M N O
47 D
48
=SUMPRODUCT(OnRoute,Distance)
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

You might also like