Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Assignment No:1

Graphical and Simplex Solution Method


of Linear programming

Operation Research Technique (CVE 657)

By
AREMU, A.O. (04/30GB024)
Department of Civil Engineering
University of Ilorin, Nigeria

CVE 657 Course Lecturer: Dr Salami

February 18th, 2013.


GRAPHICAL SOLUTION METHOD

1. Max Z=120 x 1 +80 x 2 ………………………………………………………………. (1)


s . t 2 x1 + x2 ≤ 6 ………………………………………………………………. (2)
7 x 1+ 8 x2 ≤28 ………………………………………………..…………….. (3)
x1 , x2 ≥ 0

¿ equation ( 2 )
when x 1=0 , x 2 ≤ 6(0 , 6)
x 2=0 , x 1 ≤ 3(3 , 0)

¿ equation ( 3 )
when x 1=0 , x 2 ≤ 3.5(0 , 3.5)
x 2=0 , x 1 ≤ 4 (4 , 0)

¿ graph(1)
x 1=2.22 , x 2=1.58 Z (2.22 ,1.58)
Z=120 ×2.22+80 ×1.58
¿ 266.4+ 126.4
¿ 392.8

Graph 1: x 2 Vs x 1

7
x2
6

4 2 x1 + x 2 ≤6

3
Z (2.22 ,1.58)
2
7 x 1+ 8 x2 ≤28

0
0 0.5 1 1.5 2 2.5 3 3.5 4x 4.5
1
2. Max Z=140 x 1 +160 x 2 …………………………………………………………….. (1)
s . t 2 x 1 + 4 x 2 ≤ 28 …………………………………………………………….. (2)
5 x 1+5 x 2 ≤ 50 …………………………………………………………….. (3)
x1 , x2 ≥ 0

¿ equation ( 2 )
when x 1=0 , x 2 ≤ 7(0 , 7)
x 2=0 , x 1 ≤ 14(14 , 0)

¿ equation ( 3 )
when x 1=0 , x 2 ≤ 10(0 , 10)
x 2=0 , x 1 ≤ 10(10 , 0)

¿ graph(2)
x 1=6 x 2=4 Z (6 , 4)
Z=140 ×6+160 × 4
¿ 840+640
¿ 1480

Graph 2: x 2 Vs x 1

12
x2
10

5 x 1+5 x 2 ≤ 50
8

6 Z (6 , 4)
2 x1 + 4 x 2 ≤ 28
4

0
0 2 4 6 8 10 12 14 16
x1
SIMPLEX METHOD

Max Z=4 x 1 +3 x2 +6 x 3 … … … … … … … … … … … … … … … … … … … … … …(i)


s . t 2 x 1 +3 x 2+ 2 x 3 ≤ 440 … … … … … … … … … … … … … … … … … … … … … …(ii)
4 x1 +3 x 3 ≤ 470 … … … … … … … … … … … … … … … … … … … … … …(iii )
2 x1 +5 x 2 ≤ 430 … … … … … … … … … … … … … … … … … … … … … …(iv)
x1 , x2 , x3 ≥ 0

1. Converting the linear programming to standard form by introducing slack variables and equate Z = 0
¿ ( i ) Z−4 x 1−3 x2 −6 x3 =0 Row 0
¿ ( ii ) 2 x 1 +3 x 2+ 2 x 3 +S 1=440 Row 1
¿ ( iii ) 4 x 1+ 3 x 3 + S2=470 Row 2
¿ ( iv ) 2 x1 +5 x 2+ S 3=430 Row 3
x1 , x2 , x3 ≥ 0

2. Obtaining Basic Feasible Solution (bfs)


Representing above in tabular form
Table 1: Cononical form
Row Basic Variables
0 Z−4 x 1−3 x 2−6 x 3=0 Z=0
1 2 x1 +3 x 2 +2 x 3 + S1=440 S 1=440
2 4 x1 +3 x 3 +S 2=470 S 2=470
3 2 x1 +5 x 2+ S 3=430 S 3=430

Column “Basic Variables” is obtained as follows


¿ equation ( i ) put x 1=x 2=x 3=0 Z=0
¿ equation ( ii ) put x 1=x 2=x 3=0 S 1=440
¿ equation ( iii ) put x 1=x 3=0 S2 =470
¿ eq uation ( iv ) put x 1=x 2=0 S 3=430

N.B Basic Variables (BV) = [ Z , S1 , S 2 , S 3 ]


Non Basic Variables (NBV) = [ x1 , x2 , x3 ]

3. Checking whether the basic feasible solution is optimal (Entering Variables)


From objective function
Z=4 x 1 +3 x 2+ 6 x3
a. when x 1=1 , x 2=x 3=0 ,then Z=4
b. when x 2=1 , x 1=x 3=0 ,then Z=3
c. when x 3=1 , x 1=x 3=0 ,then Z=6

∴ x3 is the entering variables being the one of the NBV that gives the highest value of Z (It has the most
negative coefficient in row 0)

4. ROW TEST (To determine pivot row)

Rigth hand side of row


Row 1 limit on x 3=
Coefficient of entering variable∈row

440
¿ =220
2

470
Row 2 limit on x 3= =156.67
3

Row 3 limit on x 3=No Limit (Because coefficient of x 3 isnon positive∨ zero).

∴Row 2 is the “winner of ratio test” being the row with smallest ratio (pivot row). The smallest ratio is
the largest entering variable that will keep the current basic variable non-negative.

5. To find new basic feasible solution

Row 2 is pivot row

ERO 1

Make x 3 a basic variable in row 2 by dividing through by coefficient of x 3 in row 2

4 x 1 3 x 2 S 2 470
+ + =
3 3 3 3
'
1.33 x 1+ x 3 +0.33 S2=156.67 … … … … … … … … … … … … … … … ..(Row 2 )

ERO 2

To create a zero coefficient for x 3 in row 0, by replacing row 0 with 6(row 2’) + row 0 i.e eliminate x 3

'
Z+3.98 x 1−3 x 2 +1.98 S 2=940 … … … … … … … … … … … … … … … … .(Row 0 )

ERO 3

To create a zero coefficient for x 3 in row 1, by replacing row 1 with -2(row 2’) + row 1 i.e eliminate x 3

'
−0.66 x 1 +3 x2 + S1−0.66 S 2=126.66 … … … … … … … … … … … … … … … … .(Row 1 )
ERO 4

To create a zero coefficient for x 3 in row 3, since x 3 does not appear in row 3, then we don’t need to
perform ERO.

∴ 2 x 1 +5 x2 + S3 =430 … … … … … … … … … … … … … … … … .(Row 3' )

Therefore BV = [ Z , S1 , S 3 , x 3 ]
NBV = [ S2 , x 1 , x2 ]

Thus, canonical form 1 yield the basic feasible solution (bfs)

Z=940 , S 1=126.66 , S 3=430 , x 3 =156.67


S2=x 1=x 2=0

Basic Variables
i.e from Row 0’ S2=x 1=x 2 Z=940
Row 1’ x 1=x 2=S2=0 S1 =126.66
Row 2’ x 1=S2=0 x 3=156.67
Row 3’ x 1=x 2=0 S3=430

Table 2: Cononical form


Row’ Basic Variables
0’ Z+3.98 x 1−3 x 2 +1.98 S 2=940 Z=940 1’
−0.66 x 1 +3 x2 + S1−0.66 S 2=126.66 S1=126.66
2’ 1.33 x 1+ x 3 +0.33 S2=156.67 x 3=156.66
3’ 2 x1 +5 x 2+ S 3=430 S 3=430

Repeating step 3
2nd iteration

From the 1st iteration, Objective function is


Z=940−3.98 x 1 +3 x 2−1.98 S 2
Z+3.98 x 1−3 x 2 +1.98 S 2=940

Entering variable
 Increasing NBV x 1 by 1 while x 2=S2=0 will decrease Z by 3.98
 Increasing NBV x 2 by 1 while x 1=S2=0 will increase Z by 3
 Increasing NBV S2 by 1 while x 1=x 2=0 will decrease Z by 1.98
∴ x2 is the entering variables being the one of the NBV that gives the highest value of Z (It has the most
negative coefficient in row 0)

4. ROW TEST (To determine pivot row)

Rigth hand side of row


Row 1’ limit on x 2=
Coefficient of entering variable∈row

126.66
¿ =42.22
3

Row 2’ limit on x 2=No Limit (Because coefficient of x 2 is non positive∨zero ∈row 2 ').

430
Row 3’ limit on x 3= =86
5

∴Row 1’ is the “winner of ratio test” being the row with smallest ratio (pivot row). The smallest ratio is
the largest entering variable that will keep the current basic variable non-negative.

5. To find new basic feasible solution

Row 1’ is pivot row

ERO 1

Make x 2 a basic variable in row 1’ by dividing through by coefficient of x 2 in row 1’

−0.66 x 1 3 x 2 S1 0.66 S 2 126.66


+ + + =
3 3 3 3 3
'
−0.22 x 1+ x 2 +0.33 S1 +0.22 S 2=42.22… … … … … … … … … … … … … … … ..(Row 1' )

ERO 2

To create a zero coefficient for x 2 in row 0’, by replacing row 0’ with 3(row 1’’) + row 0’ i.e eliminate x 2

Z+3.32 x 1+ 0.99 S 1+ 2.64 S 2=1066.66 … … … … … … … … … … … … … .(Row 0 ' ')

ERO 3

To create a zero coefficient for x 2 in row 2’, since x 2 does not appear in row 2’, then we don’t need to
perform ERO.

∴ 1.33 x 1 + x 3+ 0.33 S 2=156.67 … … … … … … … … … … … … … … … .( Row 2'' )


ERO 4

To create a zero coefficient for x 2 in row 3’, by replacing row 3’ with -5(row 1’’) + row 3’ i.e eliminate x 2

0.9 x 1−1.65 S 1−1.1 S 2+ S 3=218.9 … … … … … … … … … … … … … … … … .(Row 3 ' ')


Therefore BV = [ Z , x 2 , x 3 , S3 ]
NBV = [ x 1 , S1 , S 2 ]

Thus, canonical form 2 yield the basic feasible solution (bfs)

Z=1066.66 , x2 =42.22 , x3 =156.66 S 3=218.9 x 1=S1=S2 =0

Basic Variables
i.e from Row 0’’ x 1=S1=S2 Z =1066.66
Row 1’’ x 1=S1=S2 x 2=42.22
Row 2’’ x 1=S2=0 x 3=156.67
Row 3’’ x 1=S1=S2 0 S 3=218.9

Table 3: Cononical form


Row’’ Basic Variables
0’’ Z+3.32 x 1+ 0.99 S 1+ 2.64 S 2=1066.66 Z=1066.66
1’’ −0.22 x 1+ x 2 +0.33 S1 +0.22 S 2=42.22 x 2=42.22
2’’ 1.33 x 1+ x 3 +0.33 S2=156.67 x 3=156.66
3’’ 0.9 x 1−1.65 S 1−1.1 S 2+ S 3=218.9 S 3=218.9

Therefore ,
Z=1066.667 , x1 =0.0000 , x 2=42.22 , x 3=156.67

You might also like