Special LP Models
Special LP Models
Learning Objectives
By the end of this lecture, the students are expected to:
▪ Model appropriate situations as transportation, transshipment, and
assignment problems
▪ Solve the given model using at least one software
▪ Solve the given model using the appropriate manual solution
algorithm
Storage / Client D1 D2 D3 D4
S1 12 11 14 16
S2 22 12 13 11
S3 16 17 13 14
1,200
D1
12
2,000
22
S1 11
14 1,500
16 D2
12
1,500
S2 13 17
11 1,000
D3
16
1,500 13
S3
14 700
D4
Objective Function:
Min Z (Cost) = 12X11 + 11X12 + 14X13 + 16X14 + 22X21 + 12X22 +
13X23 + 11X24 + 16X31 + 17X32 + 13X33 + 14X34
Subject to:
X11 + X12 + X13 + X14 ≤ 2000
X21 + X22 + X23 + X24 ≤ 1500 Capacity constraints
X31 + X32 + X33 + X34 ≤ 1500
X11 + X21 + X31 ≥ 1200
X12 + X22 + X32 ≥ 1500
X13 + X23 + X33 ≥ 1000 Demand constraints
X14 + X24 + X34 ≥ 700
𝑠𝑖 = 𝑑𝑗
𝑖=1 𝑗=1
𝑛 𝑛
𝑥𝑖𝑗 ≤ 𝑠𝑖 ∀𝑖 𝑥𝑖𝑗 = 𝑠𝑖 ∀𝑖
𝑗=1 𝑗=1
𝑚 𝑚
𝑥𝑖𝑗 ≥ 𝑑𝑗 ∀𝑗 𝑥𝑖𝑗 = 𝑑𝑗 ∀𝑗
𝑖=1 𝑖=1
𝑥𝑖𝑗 ≥ 0 ∀ 𝑖, 𝑗 𝑥𝑖𝑗 ≥ 0 ∀ 𝑖, 𝑗
Destinations
1 2 3 4
6 4 7 8
A 100
50 50
Capacity (si)
Sources
10 8 11 9
B 100
50 50
7 5 6 5
C 100
70 30
50 120 80 50
Demand (dj)
8 11 19 9
400
12 13 a 10
320
11 16 22 14
350
Unit Cost
Mode of Production Monthly Capacity
(labor + material)
Regular 500 boxes / worker PhP 2,000 / box
Overtime 100 boxes / worker PhP 2,500 / box
Subcontracting Not applicable PhP 3,200 / box
D1 D2 D3 D4
12 11 14 16
S1 2,000
22 12 13 11
S2 1,500
16 17 13 14
S3 1,500
D1 D2 D3 D4 D5 (dummy)
12 11 14 16 0
S1 2,000
22 12 13 11 0
S2 1,500
16 17 13 14 0
S3 1,500
Remarks:
a. A feasible solution must satisfy all the equality constraints of the
balanced transportation problem.
b. There are m + n functional constraints, but 1 of them is redundant.
Hence, there are m + n – 1 independent functional constraints.
Consequently, there are m + n – 1 basic variables in each iteration.
12 11 14 16 0
S1 2,000 1,000
1,000 1,000
22 12 13 11 0
S2 1,500 1,000
500 1,000 0
16 17 13 14 0
S3 1,500 800
700 800
12 11 14 16 0
S1 2,000
1,000 1,000
22 12 13 11 0
S2 1,500
500 1,000 0
16 17 13 14 0
S3 1,500
700 800
12 11 14 16 0
S1 2,000 1,200
1,200 800
22 12 13 11 0
S2 1,500 800 500
300 500 700
16 17 13 14 0
S3 1,500 1,000
1,000 500
12 11 14 16 0
S1 2,000
1,200 800
22 12 13 11 0
S2 1,500
300 500 700
16 17 13 14 0
S3 1,500
1,000 500
12 11 14 16 0
S1 2,000 11 1 3 X
1,000 1,000 1,000
22 12 13 11 0
S2 1,500 11 1 1 2
500 300 700 1,000
300
16 17 13 14 0
S3 1,500 13 1 1 1
700 800 700
4 1 0 3 0
X 5 0 3 X
12 11 14 16 0
S1 2,000
1,000 1,000
22 12 13 11 0
S2 1,500
500 300 700
16 17 13 14 0
S3 1,500
700 800
12 11 14 16 0
S1 2,000
1,000 1,000 θ
22 12 13 11 0
S2 1,500
500 1,000 0
16 17 13 14 0
S3 1,500
700 800
D1 D2 D3 D4 D5
12 - 11 + 14 16 0
S1 2,000
1,000 1,000 θ
S2
22 + 12 - 13 11 0
1,500
500 1,000 0
16 17 13 14 0
S3 1,500
700 800
12 - 11 + 14 16 0
S1 2,000
1,000 1,000 θ
S2
22 + 12 - 13 11 0
1,500
500 1,000 0
16 17 13 14 0
S3 1,500
700 800
D1 D2 D3 D4 D5
12 - 11 14 + 16 0
S1 2,000
1,000 1,000 θ
S2
22 + 12 13 - 11 0
1,500
500 1,000 0
16 17 13 14 0
S3 1,500
700 800
D1 D2 D3 D4 D5
12 - 11 14 16 + 0
S1 2,000
1,000 1,000 θ
S2
22 + 12 13 - 11 0
1,500
500 1,000 0
16 17 13 + 14 - 0
S3 1,500
700 800
D1 D2 D3 D4 D5
- 12 + 11 14 16 0
S1 2,000
1,000 1,000
S2
+ 22 - 12 13 11 0
1,500
θ 500 1,000 0
16 17 13 14 0
S3 1,500
700 800
D1 D2 D3 D4 D5
12 11 14 16 0
S1 2,000
1,000 1,000
22 12 13 - 11 + 0
S2 1,500
500 1,000 0 θ
S3
16 17 13 + 14 - 0
1,500
700 800
D1 D2 D3 D4 D5
- 12 + 11 14 16 0
S1 2,000
1,000 1,000
22 - 12 13 + 11 0
S2 1,500
500 1,000 0
+ 16 17 13 - 14 0
S3 1,500
θ 700 800
D1 D2 D3 D4 D5
12 11 14 16 0
S1 2,000
1,000 1,000
22 - 12 13 + 11 0
S2 1,500
500 1,000 0
16 + 17 13 - 14 0
S3 1,500
θ 700 800
D1 D2 D3 D4 D5
12 11 14 16 0
S1 2,000
1,000 1,000
22 12 - 13 + 11 0
S2 1,500
500 1,000 0
16 17 + 13 - 14 0
S3 1,500
θ 700 800
current
next iteration
iteration
University of the Philippines
TRANSPORTATION SIMPLEX ALGORITHM
Example S1
Step 3 (Stepping Stone)
Step 3g. Repeat steps a to f until an optimal tableau is found.
D1 D2 D3 D4 D5
12 11 14 16 0
S1 2,000
1,000 1,000
22 12 13 11 0
S2 1,500
500 300 700
16 17 13 14 0
S3 1,500
700 800
12 13 a 10
B 320
11 16 22 14
C 350
1 2 3 4 5 (dummy)
8 11 19 9 0
A 400
12 13 100 10 0
B 320
11 16 22 14 0
C 350
1 2 3 4 5 (dummy)
8 11 19 9 0
A 400
240 160
12 13 100 10 0
B 320
20 300
11 16 22 14 0
C 350
10 80 260
Non-basic
Computation of ui + vj – cij
Variable
v1 = 8 v2 = 13 v3 = 19 v4 = 10 v5 = 0 xA2 uA + v2 -- cA2 = 0 + 13 – 11 = +2
uA 8 2 11 0 19 1 9 0
xA3 uA + v3 – cA3 = 0 + 19 – 10 = 0
=0 240 160
uB –4 12 13 –81 100 10 0 0 xA4 uA + v4 – cA4 = 0 + 10 – 9 = +1
=0 20 300 xB1 uB + v1 – cB1 = 0 + 8 – 12 = –4
uC 11 16 22 –1 14 3 0
xB3 uB + v3 – cB3 = 0 + 19 – 100 = –81
=3 10 80 260
xB5 uB + v5 – cB5 = 0 + 0 – 0 = 0
xC4 uC + v4 – cC4 = 3 + 10 – 14 = –1
xC5 uC + v5 – cC5 = 3 + 0 – 0 = +3
University of the Philippines
TRANSPORTATION SIMPLEX ALGORITHM
Example S2
Step 3 (Method of Multipliers)
Step 3c. If all ui + vj – cij are smaller than or equal to zero, the current
tableau is optimal. Otherwise, select the non-basic variable with the most
positive ui + vj – cij as entering variable. Break ties arbitrarily.
v1 = 8 v2 = 13 v3 = 19 v4 = 10 v5 = 0
8 2 11 0 19 1 9 0
uA = 0
240 160
–4 12 13 –81 100 10 0 0
uB = 0
20 300
11 16 22 –1 14 3 0
uC = 3
10 80 260
8 2 11 0 19 1 9 0
+ 240 - 160
–4 12 13 –81 100 10 0 0
20 300
11 16 22 –1 14 3 0
- 10 80 260 + θ
Leaving Variable: xC1
University of the Philippines
TRANSPORTATION SIMPLEX ALGORITHM
Example S2
Step 3 (Method of Multipliers)
Step 3e. To get the values of basic variables in the next iteration, add the
value of the leaving variable to the cells with plus (+) sign and subtract the
same value from the cells with minus (-) sign.
New iteration
Current iteration(Iteration
(Iteration2)1)
8 2 11 0 19 1 9 0
+ 250
240 - 150
160
–4 12 13 –81 100 10 0 0
20 300
11 16 22 –1 14 3 0
- 10 80 260 + 10
θ
Leaving Variable: xC1
University of the Philippines
TRANSPORTATION SIMPLEX ALGORITHM
Example S2
Step 3 (Method of Multipliers)
Step 3f. Return to Step 3a. Continue until an optimal iteration is found.
Iteration 2
v1 = 8 v2 = 16 v3 = 22 v4 = 7 v5 = 0
8 5 11 3 19 -2 9 0
uA = 0
250 + - 150
-7 12 13 -81 100 10 -3 0
uB = -3
20 300
-3 11 16 22 -7 14 0
uC = 0
- 80 260 + 10
7 300
4 4 7
3
300 6
2 2
9
7 200
5 8
6
4 250
3 6
6
400 8
1 5
7 300
4 4 7
3
300 6
2 2
9
7 200
5 8
6
4
50
D 6
4 6 7 M M M
2 300
M M M 4 M 6
D 50
0 M M 4 8 M
3 0+750
M 0 2 M 7 9
4 0+750
M M 0 M 3 6
5 0+750
6 100
C F
14
8
150
A 14 12
9
7
11 100
D G
5 7
150
B 15 3
11
8
10 100
E H
4
5 15 8 M M M
B 150
0 12 M 6 14 M
C 0+300
M 0 M 9 11 7
D 0+300
M M 0 11 10 4
E 0+300
M M M M 0 3
G 0+300
M M M M 3 0
H 0+300
Machine / Job 1 2 3 4 5 6 7 8
A 1.4 1.6 1.0 2.4 2.1 0.8 1.4 1.7
B 1.3 0.9 1.0 1.7 1.1 1.3 2.3 2.3
C 1.2 1.9 2.2 2.0 2.0 -- 1.3 2.0
D 1.8 1.4 -- 1.6 2.2 -- 1.0 2.4
E 0.9 2.0 2.4 0.8 0.6 1.6 0.7 2.5
F 0.5 1.4 1.2 2.1 1.0 -- 1.3 1.1
G 1.6 0.8 1.4 0.9 1.6 0.6 1.3 1.0
H 2.0 -- 1.0 2.0 -- 1.3 1.2 2.3
University of the Philippines
ASSIGNMENT MODEL
Example 2
Four different subjects should be assigned to different professors. Given
below are the suitability ratings (up to 10) of the professors when
assigned to the subjects. Find the best assignment that will maximize the
total suitability rating.
Row Min
–8 –7 –6 –5 00 1 –8 2 3 8
–7 –5 –7 –9 20 4 –9 2 0 9
–7 –4 –9 –6 20 5 –9 0 3 9
–4 –8 –7 –9 50 1 –9 2 0 9
–5 –8 –7 –7 30 0 –8 1 1 8
0 1 2 3 08 1 2 3 0
2 4 2 0 29 4 2 0 1
2 5 0 3 29 5 0 3 1
5 1 2 0 59 1 2 0 1
3 0 1 1 38 0 1 1 0
Col Min 0 0 0 0 8
0 1 2 3 0
2 4 2 0 1
2 5 0 3 1
5 1 2 0 1
3 0 1 1 0
0 1 2 30 01 3 4 0
2 4 2 01 13 2 0 0
2 5 0 31 14 0 3 0
5 1 2 04 10 2 0 0
3 0 1 13 00 2 2 0
0 1 3 4 0
1 3 2 0 0
1 4 0 3 0
4 0 2 0 0
3 0 2 2 0
Row Min
40 65 80 75 40 0 25 40 35
40 65 80 75 40 0 25 40 35
50 60 75 80 50 0 10 25 30
70 85 45 55 45 25 40 0 10
Col Min 25 40 0 10
0 15 40 25 0 0 25 10
0 15 40 25 0 0 25 10
0 0 25 20 15 0 25 20
25 30 0 0 40 30 0 0
0 0 15 0
0 0 15 0
15 0 15 10
50 40 0 0
University of the Philippines
Thank you!