Simplex Method: Prepared By: Eng. Sarah Azzam

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

Simplex Method

Prepared by: Eng. Sarah Azzam

Problem 1

Maximize Subject to:

Z=6x1-2x2

2x1-x2 2 x1 4 x1, x2 0

Step 1 Put the Problem in the Standard Form

Maximize Subject to:

Z=6x1-2x2

2x1-x2+s1= 2 x 1 + s2 = 4 x1, x2, s1 , s2 0

Step 2 Find an Initial Basic Solution


We have m constraints where m=2 We have m+n variables where m+n=4 n=2 Therefore we will have m=2 basic variables First Trial choose x1=x2=0

s1=2 , s2=4

Step 3 Construct the Simplex Tableau


Maximize Subject to:

Z=6x1-2x2

Cj CB 0 0 Basis s1 s2 Ej=CB aij Cj-Ej

2x1-x2+s1= 2 x1 + s2 = 4 x1, x2, s1 , s2 0


-2 x2 -1 0 0 -2

0 s1 1 0 0 0

0 s2 0 1 0 0 b 2 4 0

x1 2 1 0 6

Step 4 Decide about the Leaving Variable


Cj j C CB 0 0 0 0 Basis Basis ss1 1 ss2 2 EEj=CB aij j=CB aij CCj-Ej j-Ej 66 x1 x1 2 2 1 1 0 0 6 6 -2 -2 x2 x2 -1 -1 0 0 0 0 0 s1 1 0 0 0 s1 1 0 0 0 s2 0 1 0 0 0 s2 0 1 0 0 b 2 4 0
= b k

b 1 2 4 4 Smalle st 0 positiv e value

The leaving variable is s1 and the entering variable is x1

-2 -2 0 0 K-Column (highest positive value)

Cj CB 0 0 Basis s1 s2 Ej=CB aij Cj-Ej

6 x1 2 1 0 6

-2 x2 -1 0 0 -2

0 s1 1 0 0 0

0 s2 0 1 0 0 b 2 4 0

Pivo t Row

Step 5 Perform Row Operations using the Pivot Row


Cj CB 6 0 Basis x1 s2 Ej=CB aij Cj-Ej 6 x1 1 0 6 0 -2 x2 -1/2 1/2 -3 1 0 s1 1/2 -1/2 3 -3 0 s2 0 1 0 0 b 1 3 6

Divide by 2 Pivot row*-1 + row2

Cj CB 6 0 Basis x1 s2 Ej=CB aij Cj-Ej

6 x1 1 0 6 0

-2 x2 -1/2 1/2 -3 1

0 s1 1/2 -1/2 3 -3

0 s2 0 1 0 0 b 1 3 6
= b k

-2 6 -2 Smalle st positiv e value

The leaving variable is s2 and the entering variable is x2

K-Column (highest positive value)

Cj CB 6 0 Basis x1 s2 Ej=CB aij Cj-Ej

6 x1 1 0 6 0

-2 x2 -1/2 1/2 -3 1

0 s1 1/2 -1/2 3 -3

0 s2 0 1 0 0 b 1 3 6

Pivot Row

Cj CB 6 -2 Basis x1 X2 Ej=CB aij Cj-Ej

6 x1 1 0 6 0

-2 x2 0 1 -2 0

0 s1 0 -1 2 -2

0 s2 1 2 2 -2 b 4 6 12 Pivot row*2 Pivot row*1/2 + row 1

No more positive values solution reached s1,s2 are non-basic s1=s2=0 x1,x2 are basic, x1=4 , x2=6 , Zmax=12

You might also like