Assignment 2 (2500)
Assignment 2 (2500)
Solution
subject to
x1 + 2 x2 ≤ 160
x1 ≤ 100
x2 ≤ 120
and x1,x2≥0;
The problem is converted to canonical form by adding slack, surplus and artificial variables as
appropriate
subject to
x1 + 2 x2 + S1 = 160
x1 + S2 = 100
x2 + S3 = 120
and x1,x2,S1,S2,S3≥0
B CB XB x1 x2 S1 S2 S3 MinRatio
XBx2
S2 0 100 1 0 0 1 0 ---
S3 0 120 0 1 0 0 1 1201=120
Z=0 Zj 0 0 0 0 0
Negative minimum Zj-Cj is -150 and its column index is 2. So, the entering variable is x2.
Minimum ratio is 80 and its row index is 1. So, the leaving basis variable is S1.
R1(new)=R1(old)÷2
R1(old) = 160 1 2 1 0 0
R2(new)=R2(old)
R2(old) = 100 1 0 0 1 0
R2(new)=R2(old) 100 1 0 0 1 0
R3(new)=R3(old) - R1(new)
R3(old) = 120 0 1 0 0 1
B CB XB x1 x2 S1 S2 S3 MinRatio
XBx1
Z=12000 Zj 75 150 75 0 0
Zj-Cj -25↑ 0 75 0 0
Negative minimum Zj-Cj is -25 and its column index is 1. So, the entering variable is x1.
Minimum ratio is 100 and its row index is 2. So, the leaving basis variable is S2.
R2(new)=R2(old)
R2(old) = 100 1 0 0 1 0
R2(new)=R2(old) 100 1 0 0 1 0
R1(new)=R1(old) - 0.5R2(new)
R1(old) = 80 0.5 1 0.5 0 0
R2(new) = 100 1 0 0 1 0
R3(new)=R3(old) + 0.5R2(new)
R3(old) = 40 -0.5 0 -0.5 0 1
R2(new) = 100 1 0 0 1 0
B CB XB x1 x2 S1 S2 S3 MinRatio
x1 100 100 1 0 0 1 0
S3 0 90 0 0 -0.5 0.5 1
Zj-Cj 0 0 75 25 0
Since all Zj-Cj≥0
Max Z=1450
Solving by LP:
Q1 Q2 Q3 Q4
Dem
and 65 95 140 70
Begi
n Inv 30 =C10 =D10 =E10
D
ec
V Reg
ar Prod 50 50 50 50
Reg
Capa
city 50 50 50 50
Cost
regul
ar 1000 1000 1000 1000
D
ec
V OT
ar Prod 0 30 90 20
Cost
OT 1200 1200 1200 1200
Closi
5 ng
0 Inv =C4+C8+C3-C2 =D4+D8+D3-D2 =E4+E8+E3-E2 =F4+F8+F3-F2
0 0 0 0
Total
cost =SUM(C13:F13)
Obj
Func Minimize
The solution using solver:
Q1 Q2 Q3 Q4
Demand 65 95 140 70
Begin Inv 30 15 0 0
Dec
Var Reg Prod 50 50 50 50
Reg
Capacity 50 50 50 50
Cost
regular 1000 1000 1000 1000
Dec
Var OT Prod 0 30 90 20
1200.0
Cost OT 1200.00 1200.00 0 1200.00
Closing
50 Inv 15 0 0 0
0 0 0 0