Lecture 5 - Network Models-Part-1 (2021) - Student
Lecture 5 - Network Models-Part-1 (2021) - Student
n a set of nodes,
1
More “Network Models”
Transportation, Assignment,
and Transshipment Problems
n Each of these three models (transportation,
assignment, and transshipment models) can be
formulated as linear programs and solved by general
purpose linear programming codes.
2
Transportation Problem
Transportation Problem
n Network Representation
1 d1
c11
s1 1 c12
c13
2 d2
c21
c22
s2 2
c23
3 d3
SOURCES DESTINATIONS
3
Transportation Problem
n LP Formulation
The linear programming formulation in terms of
the amounts shipped from the origins to the
destinations, xij, can be written as:
Min cijxij
ij
Problem: How many tons of coal to transport from each coal mine to
each power plant on a monthly basis in order to minimize the total cost
of transportation?
Assume: The coal has the same calory
Data: Coal Mine Supply Power Plant Demand
1. Balikpapan 150 A. Plant Jakarta 200
2. Samarinda 225 B. Plant Smrng 100
3. Palembang 275 C. Plant Gresik 300
Total 650 tons Total 600 tons
4
Transportation Model Example
n Network Representation
6
150 1 8 A 200
10
7
225 2 11
B 100
11
4
5
275 3 C 300
12
10
10
5
Transportation Model Formulation
11
11
12
12
6
Transportation Problem
13
13
Transportation Problem
n Network Representation
1 d1
c11
s1 1 c12
c13
2 d2
c21
c22
s2 2
c23
3 d3
SOURCES DESTINATIONS
14
14
7
Transportation Problem
n LP Formulation
The linear programming formulation in terms of
the amounts shipped from the origins to the
destinations, xij, can be written as:
Min cijxij
ij
15
16
16
8
Transportation Model Formulation
Subject to:
x1A + x1B + x1C <= 150 (s1 = 150)
x2A + x2B + x2C <= 175 (s2 = 175)
x3A + x3B + x3C <= 275 (s3 = 275)
xij < si for each origin i
j
17
17
SETS:
Elevator / GE1, GE2, GE3/ : CAPACITY;
Mill / M1, M2, M3 / : DEMAND;
ROUTES( Elevator, Mill) : COST, VOLUME;
ENDSETS
18
18
9
Transportation Model Formulation
19
19
Subject to:
x1A + x2A + x3A = 200 (demandA = 200)
x1B + x2B + x3B = 100 (demandB = 100)
x1C + x2C + x3C = 300 (demandC = 300)
xij = dj for each destination j
I
! The demand constraints;
@FOR( Mill( J): [DEM]
@SUM( Elevator( I): VOLUME( I, J)) >= DEMAND( J));
20
20
10
Transportation Model Formulation
Subject to:
x1A + x1B + x1C <= 150 (Capacity1 = 150)
x2A + x2B + x2C <= 175 (Capacity2 = 175)
x3A + x3B + x3C <= 275 (Capacity3 = 275)
xij < si for each origin i
j
! The supply constraints;
@FOR( Elevator( I): [SUP]
@SUM( Mill( J): VOLUME( I, J)) <= CAPACITY( I));
21
21
MODEL:
!xij = tons of wheat from each grain elevator, i,
i = 1, 2, 3, to each mill j, j = A,B,C;
SETS:
Elevator / GE1, GE2, GE3/ : CAPACITY;
Mill / M1, M2, M3 / : DEMAND;
ROUTES( Elevator, Mill) : COST, VOLUME;
ENDSETS
! The objective;
[OBJ] MIN = @SUM( ROUTES: COST * VOLUME);
22
22
11
Transportation Model Formulation
23
23
24
24
12
Transportation Model Formulation (Large Scale)
25
25
26
26
13
Transportation Problem: Special Situations
27
27
Transportation Problem
28
28
14
Transportation Problem
D1 D2 D3 Supply
15 30 20
S1 50
30 40 35
S2 30
Demand 25 45 10
29
29
Formulation Practice
D1 D2 D3 Supply
15 30 20
S1 50
30 40 35
S2 30
Demand 25 45 10
30
30
15
Transportation Problem
31
31
Transportation Algorithm
32
32
16
Transportation Algorithm
33
Transportation Algorithm
34
34
17
Transportation Algorithm
35
35
Example: BBC
36
36
18
Example: BBC
24 30 40 0
Plant 1 50
30 40 42 0
Plant 2 50
Demand 25 45 10 20
37
37
Example: BBC
24 30 40
Plant 1 50
30 40 42
Plant 2 50
Demand 25 45 10
38
38
19
Transportation Problem
39
39
Example: BBC
40
20
Example: BBC
n Iteration 1
• MODI Method
1. Set u1 = 0
2. Since u1 + vj = c1j for occupied cells in row 1, then
v1 = 24, v2 = 30, v4 = 0.
3. Since ui + v2 = ci2 for occupied cells in column 2,
then u2 + 30 = 40, hence u2 = 10.
4. Since u2 + vj = c2j for occupied cells in row 2, then
10 + v3 = 42, hence v3 = 32.
41
41
Example: BBC
n Iteration 1
• MODI Method (continued)
Calculate the reduced costs (circled numbers on the
next slide) by cij - ui + vj.
42
42
21
Example: BBC
n Iteration 1 Tableau
30 40 42 0
Plant 2 -4 40 10 -10 10
vj 24 30 32 0
43
43
Example: BBC
n Iteration 1
• Stepping Stone Method
The stepping stone path for cell (2,4) is (2,4), (1,4),
(1,2), (2,2). The allocations in the subtraction cells are 20
and 40, respectively. The minimum is 20, and hence
reallocate 20 along this path. Thus for the next tableau:
x24 = 0 + 20 = 20 (0 is its current allocation)
x14 = 20 - 20 = 0 (blank for the next tableau)
x12 = 5 + 20 = 25
x22 = 40 - 20 = 20
The other occupied cells remain the same.
44
44
22
Example: BBC
n Iteration 2
• MODI Method
The reduced costs are found by calculating
the ui's and vj's for this tableau.
1. Set u1 = 0.
2. Since u1 + vj = cij for occupied cells in row 1, then
v1 = 24, v2 = 30.
3. Since ui + v2 = ci2 for occupied cells in column 2,
then u2 + 30 = 40, or u2 = 10.
4. Since u2 + vj = c2j for occupied cells in row 2, then
10 + v3 = 42 or v3 = 32; and, 10 + v4 = 0 or v4 = -10.
45
45
Example: BBC
n Iteration 2
• MODI Method (continued)
Calculate the reduced costs (circled numbers on the
next slide) by cij - ui + vj.
46
46
23
Example: BBC
n Iteration 2
• Stepping Stone Method
The most negative reduced cost is = -4 determined
by x21. The stepping stone path for this cell is
(2,1),(1,1),(1,2),(2,2). The allocations in the subtraction
cells are 25 and 20 respectively. Thus the new solution
is obtained by reallocating 20 on the stepping stone
path. Thus for the next tableau:
x21 = 0 + 20 = 20 (0 is its current allocation)
x11 = 25 - 20 = 5
x12 = 25 + 20 = 45
x22 = 20 - 20 = 0 (blank for the next tableau)
The other occupied cells remain the same.
47
47
Example: BBC
n Iteration 3
• MODI Method
The reduced costs are found by calculating
the ui's and vj's for this tableau.
1. Set u1 = 0
2. Since u1 + vj = c1j for occupied cells in row 1, then
v1 = 24 and v2 = 30.
3. Since ui + v1 = ci1 for occupied cells in column 2,
then u2 + 24 = 30 or u2 = 6.
4. Since u2 + vj = c2j for occupied cells in row 2, then
6 + v3 = 42 or v3 = 36, and 6 + v4 = 0 or v4 = -6.
48
48
24
Example: BBC
n Iteration 3
• MODI Method (continued)
Calculate the reduced costs (circled numbers on the
next slide) by cij - ui + vj.
49
49
Example: BBC
n Iteration 3 Tableau
Since all the reduced costs are non-negative, this is
the optimal tableau.
30 40 42 0
Plant 2 20 +4 10 20 6
vj 24 30 36 -6
50
50
25
Example: BBC
n Optimal Solution
51
51
Assignment Problem
52
52
26
Assignment Problem
n Network Representation
c11
1 1
c12
c13
c21
c22
2 2
c23
c31
c32
3 c33 3
WORKERS JOBS
53
53
Assignment Problem
Min cijxij
ij
54
54
27
The Assignment Problem:
55
55
56
56
28
Assignment Problem--Special Considerations:
57
57
Hungarian Method
58
58
29
Hungarian Method (continued)
59
59
Hungarian Method
60
30
Example: Hungry Owner
A contractor pays his subcontractors a fixed fee
plus mileage for work performed. On a given day the
contractor is faced with three electrical jobs associated
with various projects. Given below are the distances
between the subcontractors and the projects.
Project
A B C
Westside 50 36 16
Subcontractors Federated 28 30 18
Goliath 35 32 20
Universal 25 25 14
How should the contractors be assigned to minimize
total costs?
61
61
50
West. 36
A
0 16
28
30
Fed. B
18
0
35 32
20
Gol. C
0
25 25
14
Univ. Dum.
0
62
62
31
The Assignment Problem:
63
63
A B C Dummy
Westside 50 36 16 0
Federated 28 30 18 0
Goliath 35 32 20 0
Universal 25 25 14 0
64
32
Example: Hungry Owner
A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0
65
65
66
33
Example: Hungry Owner
A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2
67
67
68
68
34
Example: Hungry Owner
A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3
69
69
70
70
35
Example: Hungry Owner
71
71
Transshipment Problem
72
72
36
Transshipment Problem
n Network Representation
3 c36
c13 c37
s1 1 c14 6 d1
c15 c46
4 c47
c23 c24
c56 7 d2
s2 2
c25
5 c57
73
73
Transshipment Problem
Min cijxij
ij
74
74
37
The Transshipment Problem :
75
75
Example: Transshipping
76
76
38
Example: Transshipping
77
77
Example: Transshipping
n Network Representation
ZROX
Zrox 50
5 1
75 Arnold Thomas 5
8 8
ARNOLD Hewes 60
3 4
7
Super Wash-
75
Shelf 4 Burn 4
Rock-
Wright 40
78
78
39
Example: Transshipping
79
Example: Transshipping
80
80
40
Example: Transshipping
n Constraints Defined
81
81
Sunco Oil produces oil at two wells. Well 1 can produce as many as 150,000 barrels
per day, and well 2 can produce as many as 200,000 barrels per day. It is possible to
ship oil directly from the wells to Sunco’s customers in Los Angeles and New York.
Alternatively, Sunco could transport oil to the ports of Mobile and Galveston and then
ship it by tanker to New York or Los Angeles. Los Angeles requires 160,000 barrels
per day, and New York requires 140,000 barrels per day. The costs of shipping 1,000
barrels between two points are shown in Table 61. Formulate a transshipment model
(and equivalent transportation model) that could be used to minimize the transport
costs in meeting the oil demands of Los Angeles and New York.
82
82
41
Example: Sun Co Oil (2)
83
83
42