0% found this document useful (0 votes)
55 views6 pages

Assignment 2 (2500)

The document describes solving a linear programming problem to minimize the total cost of production across 4 quarters (Q1-Q4) given demand, production capacity, inventory levels, and costs of regular and overtime production. The problem is converted to canonical form by introducing slack variables. The simplex method is applied through 3 iterations to arrive at an optimal solution with objective function value of 368,750. Key steps include identifying entering/leaving variables based on minimum ratios and pivot elements.

Uploaded by

haseeb ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views6 pages

Assignment 2 (2500)

The document describes solving a linear programming problem to minimize the total cost of production across 4 quarters (Q1-Q4) given demand, production capacity, inventory levels, and costs of regular and overtime production. The problem is converted to canonical form by introducing slack variables. The simplex method is applied through 3 iterations to arrive at an optimal solution with objective function value of 368,750. Key steps include identifying entering/leaving variables based on minimum ratios and pivot elements.

Uploaded by

haseeb ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Task 1

Solution

Max Z = 100 x1 + 150 x2

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

1. As the constraint-1 is of type '≤' we should add slack variable S1

2. As the constraint-2 is of type '≤' we should add slack variable S2

3. As the constraint-3 is of type '≤' we should add slack variable S3

After introducing slack variables

Max Z = 100 x1 + 150 x2 + 0 S1 + 0 S2 + 0 S3

subject to

x1 + 2 x2 + S1 = 160

x1 + S2 = 100

x2 + S3 = 120

and x1,x2,S1,S2,S3≥0

Iteration-1 Cj 100 150 0 0 0

B CB XB x1 x2 S1 S2 S3 MinRatio
XBx2

S1 0 160 1 (2) 1 0 0 1602=80→

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

Zj-Cj -100 -150↑ 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.

∴ The pivot element is 2.

Entering =x2, Departing =S1, Key Element =2

R1(new)=R1(old)÷2
R1(old) = 160 1 2 1 0 0

R1(new)=R1(old)÷2 80 0.5 1 0.5 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

R1(new) = 80 0.5 1 0.5 0 0

R3(new)=R3(old) - R1(new) 40 -0.5 0 -0.5 0 1

Iteration-2 Cj 100 150 0 0 0

B CB XB x1 x2 S1 S2 S3 MinRatio
XBx1

x2 150 80 0.5 1 0.5 0 0 800.5=160

S2 0 100 (1) 0 0 1 0 1001=100→

S3 0 40 -0.5 0 -0.5 0 1 ---

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.

∴ The pivot element is 1.

Entering =x1, Departing =S2, Key Element =1

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

0.5×R2(new) = 50 0.5 0 0 0.5 0

R1(new)=R1(old) - 0.5R2(new) 30 0 1 0.5 -0.5 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

0.5×R2(new) = 50 0.5 0 0 0.5 0

R3(new)=R3(old) + 0.5R2(new) 90 0 0 -0.5 0.5 1


Iteration-3 Cj 100 150 0 0 0

B CB XB x1 x2 S1 S2 S3 MinRatio

x2 150 30 0 1 0.5 -0.5 0

x1 100 100 1 0 0 1 0

S3 0 90 0 0 -0.5 0.5 1

Z=14500 Zj 100 150 75 25 0

Zj-Cj 0 0 75 25 0

Since all Zj-Cj≥0

Hence, optimal solution is arrived with value of variables as:


x1=100, x2=30

Max Z=1450

Solving by LP:

The boxes in green, are decision variables


The boxes in blue are constrains
The boxes in orange is the objective function

The formulae used:

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

=C4*C7+C8*C9+ =D4*D7+D8*D9+ =E4*E7+E8*E9+ =F4*F7+F8*F9+


Cost C10*$A$10 D10*$A$10 E10*$A$10 F10*$A$10

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

Cost 50750 86000 158000 74000

Total cost 368750

Obj Func Minimize

You might also like