Simplex two phase

shaktijk 14,554 views 61 slides Dec 03, 2014
Slide 1
Slide 1 of 61
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61

About This Presentation

No description available for this slideshow.


Slide Content

Simplex Method
When decision variables are more than 2, we always use
Simplex Method
Slack Variable: Variable added to a £ constraint to
convert it to an equation (=).
A slack variable represents unused resources
A slack variable contributes nothing to the objective
function value.
Surplus Variable: Variable subtracted from a ³
constraint to convert it to an equation (=).
A surplus variable represents an excess above a
constraint requirement level.
Surplus variables contribute nothing to the calculated
value of the objective function.

Cont….
Basic Solution(BS) : This solution is obtained by setting
any n variables (among m+n variables) equal to zero and
solving for remaining m variables, provided the
determinant of the coefficients of these variables is non-
zero. Such m variables are called basic variables and
remaining n zero valued variables are called non basic
variables.
Basic Feasible Solution(BFS) : It is a basic solution
which also satisfies the non negativity restrictions.

Cont…..
BFS are of two types:
Degenerate BFS: If one or more basic
variables are zero.
Non-Degenerate BFS: All basic variables are
non-zero.
Optimal BFS: BFS which optimizes the
objective function.

Example
Max. Z = 13x
1
+11x
2
Subject to constraints:
4x
1
+5x
2 << 1500 1500
5x5x
11+3x+3x
2 2 << 1575 1575
xx
11+2x+2x
2 2 << 420 420
xx
11, x, x
2 2
> 0

Solution :
Step 1: Convert all the inequality constraints into equalities
by the use of slack variables.
Let S
1
, S
2
, S
3
be three slack variables.
Introducing these slack variables into the inequality constraints
and rewriting the objective function such that all variables are
on the left-hand side of the equation. Model can rewritten as:
Z - 13x
1
-11x
2
= 0
Subject to constraints:
4x
1
+5x
2
+ S
1
= 1500 1500
5x5x
11+3x+3x
2 2 +S+S
22= 1575= 1575
xx
11+2x+2x
2 2 +S+S
33 = 420 = 420
xx
11, x, x
22, S, S
11, S, S
22, S, S
3 3
> 0

Cont…
Step II: Find the Initial BFS.
One Feasible solution that satisfies all the
constraints is: x
1
= 0, x
2
= 0, S
1
= 1500,
S
2
= 1575, S
3
= 420 and Z=0.
Now, S
1
, S
2
, S
3
are Basic variables.
Step III: Set up an initial table as:

Cont…
Row
NO.
Basic
Variable
Coefficients of: Sol.Rati
o
Zx
1
x
2
S
1
S
2
S
3
A1 Z 1-13-11000 0
B1 S
1
04 5100 1500375
C1 S
2
05 3010 1575315
D1 S
3
01 2001 420420
Step IV: a) Choose the most negative number from row A1(i.e Z row). Therefore,
x
1
is a entering variable.
b) Calculate Ratio = Sol col. / x
1
col. (x
1 > 0)
c) Choose minimum Ratio. That variable(i.e S
2
) is a departing
variable.

Cont….
Step V: x
1
becomes basic variable and S
2
becomes non basic
variable. New table is:
Row
NO.
Basic
Varia
ble
Coefficients of: Sol.Ratio
Zx
1
x
2
S
1
S
2
S
3
A1 Z 10 -16/5013/504095
B1 S
1
00 13/51-4/5024092.3
C1 x
1
01 3/501/50315525
D1 S
3
00 7/50-1/5110575

Cont…
Next Table is :
Row
NO.
Basic
Varia
ble
Coefficients of: Sol.
Zx
1
x
2
S
1
S
2
S
3
A1 Z 10 0 015/716/74335
B1 S
1
00 0 1-3/7-13/745
C1 x
1
01 0 02/7-3/7270
D1 x
2
00 1 0-1/75/775
Optimal Solution is : x
1
= 270, x
2
= 75, Z= 4335

Example
Max. Z = 3x
1
+5x
2
+4x
3
Subject to constraints:
2x
1
+3x
2 << 8 8
2x2x
22+5x+5x
3 3 << 10 10
3x3x
11+2x+2x
22+4x+4x
3 3 << 15 15
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Let S
1
, S
2
, S
3
be the three slack variables.
Modified form is:
Z - 3x
1
-5x
2
-4x
3
=0
2x
1
+3x
2
+S
1
= 8 8
2x2x
22+5x+5x
3 3 +S+S
22= 10= 10
3x3x
11+2x+2x
22+4x+4x
33+S+S
33= 15= 15
xx
11, x, x
22, x, x
33,,

S
1
,
SS
22,,
SS
3 3
> 0

Initial BFS is : x
1
= 0, x
2
= 0, x
3
=0, S
1
= 8,
S
2
= 10, S
3
= 15 and Z=0.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
x
3
S
1
S
2
S
3
Z 1-3-5-4000 0
S
1
02 30100 8 8/3
S
2
00 25010 10 5
S
3
03 24001 15 15/2
Therefore, x
2
is the entering variable and S
1
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
x
3
S
1
S
2
S
3
Z 11/30-45/300 40/3
x
2
02/3101/300 8/3-
S
2
0-4/305-2/310 14/314/15
S
3
05/304-2/301 29/329/12
Therefore, x
3
is the entering variable and S
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
x
3
S
1
S
2
S
3
Z 1-11/150017/154/50256/15
x
2
02/3 101/30 08/3 4
x
3
0-4/1501-2/151/5014/15-
S
3
041/15002/15-4/5189/1589/41
Therefore, x
1
is the entering variable and S
3
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Zx
1
x
2
x
3
S
1
S
2
S
3
Z 100045/4124/4111/41765/41
x
2
001015/418/41-10/4150/41
x
3
0001-6/415/414/4162/41
x
1
0100-2/41-12/4115/4189/41
Optimal Solution is : x
1
= 89/41, x
2
= 50/41, x
3
=62/41, Z= 765/41

Example
Min.. Z = x
1
- 3x
2
+ 2x
3
Subject to constraints:
3x
1
- x
2
+ 3x
3
<< 7
-2x-2x
1 1 + 4x+ 4x
2 2 << 12 12
-4x-4x
11 + 3x + 3x
22 + 8x + 8x
33 < < 1010
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Convert the problem into maximization problem
Max.. Z’ = -x
1
+ 3x
2
- 2x
3
where Z’= -Z
Subject to constraints:
3x
1
- x
2
+ 3x
3
<< 7
-2x-2x
1 1 + 4x+ 4x
2 2 << 12 12
-4x-4x
11 + 3x + 3x
22 + 8x + 8x
33 < < 1010
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Let S
1
, S
2
and S
3
be three slack variables.
Modified form is:
Z’ + x
1
- 3x
2
+ 2x
3
= 0
3x
1
- x
2
+ 3x
3
+S
1
= 7
-2x-2x
1 1 + 4x+ 4x
2 2 + S + S
22 = 12 = 12
-4x-4x
11 + 3x + 3x
22 + 8x + 8x
33 +S +S
33 = = 1010
xx
11, x, x
22, x, x
3 3
> 0
Initial BFS is : x
1
= 0, x
2
= 0, x
3
=0, S
1
= 7, S
2
= 12, S
3
= 10
and Z=0.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z’x
1
x
2
x
3
S
1
S
2
S
3
Z’ 11 -320000
S
1
03 -131007 -
S
2
0-24001012 3
S
3
0-43800110 10/3
Therefore, x
2
is the entering variable and S
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z’x
1
x
2
x
3
S
1
S
2
S
3
Z’ 1-1/20203/409
S
1
05/20311/4010 4
x
2
0-1/21001/403 -
S
3
0-5/2080-3/411 -
Therefore, x
1
is the entering variable and S
1
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Z’x
1
x
2
x
3
S
1
S
2
S
3
Z’ 10 013/51/58/100 11
x
1
01 06/52/51/100 4
x
2
00 13/51/53/100 5
S
3
00 011 1-1/21 11
Optimal Solution is : x
1
= 4, x
2
= 5, x
3
= 0,
Z’ = 11 Z = -11

Example
Max.. Z = 3x
1
+ 4x
2
Subject to constraints:
x
1
- x
2
<< 1
-x-x
1 1 + x+ x
2 2 << 2 2
xx
11, x, x
2 2
> 0

Cont…
Let S
1
and S
2
be two slack variables
.
Modified form is:
Z -3x
1
- 4x
2
= 0
x
1
- x
2
+S
1
= 1
-x-x
1 1 + x+ x
2 2 +S+S
2 2 = 2= 2
xx
11, x, x
22, S, S
11, S, S
2 2
> 0
Initial BFS is : x
1
= 0, x
2
= 0, S
1
= 1, S
2
= 2
and Z=0.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
S
1
S
2
Z 1-3-4000
S
1
01 -1101 -
S
2
0-11012 2
Therefore, x
2
is the entering variable and S
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
S
1
S
2
Z 1-70048
S
1
00 0113 -
x
2
0-11012 -
x
1
is the entering variable, but as in x
1
column every no. is less
than equal to zero, ratio cannot be calculated. Therefore given
problem is having a unbounded solution.

Introduction
LPP, in which constraints may also have > and = signs, we
introduce a new type of variable , called the artificial
variable. These variables are fictitious and cannot
have any physical meaning. Two Phase Simplex
Method is used to solve a problem in which some
artificial variables are involved. The solution is
obtained in two phases.

Example
Min.. Z = 15/2 x
1
- 3x
2
Subject to constraints:
3x
1
- x
2
- x
3
> 3 3
xx
11 - x - x
22 + x + x
33 > 2
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Convert the objective function into the maximization form
Max. Z’ = -15/2 x
1
+ 3x
2
where Z’= -Z
Subject to constraints:
3x
1
- x
2
- x
3
> 3 3
xx
11 - x - x
22 + x + x
33 > 2
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Modified form is :
Introduce surplus variables S
1
and S
2
, and artificial variables
a
1
and a
2

Z’ + 15/2 x
1
- 3x
2
= 0

Subject to constraints:
3x
1
- x
2
- x
3
–S
1
+ a
1
= 3 3
xx
11 - x - x
22 + x + x
33 –S –S
22 + a + a
22 = = 2
xx
11, x, x
22, x, x
3 3 , , S
1
, SS
22, , a
1
, aa
22 > 0

Cont…
Phase I : Simplex method is applied to a specially constructed
Auxiliary LPP leading to a final simplex table containing a BFS
to the original problem.
•Step 1: Assign a cost –1 to each artificial variable and a cost
0 to all other variables in the objective function.
•Step 2: Construct the auxiliary LPP in which the new
objective function Z
*
is to be maximized subject to the given
set of constraints.

Cont…
Max. Z
*
= -a
1
–a
2
Z
*
+ a
1
+ a
2
= 0
Subject to constraints:
3x
1
- x
2
- x
3
–S
1
+ a
1
= 3 3
xx
11 - x - x
22 + x + x
33 –S –S
22 + a + a
22 = = 2
xx
11, x, x
22, x, x
3 3 , , S
1
, SS
22, , a
1
, aa
22 > 0
Auxiliary LPP is:
Initial solution is a
1
= 3, a
2
= 2 and Z
*
= 0

Cont…
•Step 3: Solve the auxiliary problem by simplex method until either
of the following three possibilities arise:
•Max Z
*
< 0 and at least one artificial variable appear in the
optimum basis at a positive level. In this case given problem
does not have any feasible solution.
•Max Z
*
= 0 and at least one artificial variable appear in the
optimum basis at a zero level. In this case proceed to Phase II.
•Max Z
*
= 0 and no artificial variable appear in the optimum
basis. In this case also proceed to Phase II.

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
x
3
S
1
S
2
a
1
a
2
Z
*
10 0000110
a
1
03 -1-1-10103
a
2
01 -110-1012
This table is not feasible as a
1
and a
2
has non zero coefficients in
Z
*
row. Therefore next step is to make the table feasible.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z
*
x
1
x
2
x
3
S
1
S
2
a
1
a
2
Z
*
1-4201100-5
a
1
03 -1-1-10103 1
a
2
01 -110-1012 2
Therefore, x
1
is the entering variable and a
1
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z
*
x
1
x
2
x
3
S
1
S
2
a
2
Z
*
102/3-4/3-1/310-1
x
1
01-1/3-1/3-1/3001 -
a
2
00-2/34/31/3-111 3/4
Therefore, x
3
is the entering variable and a
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
x
3
S
1
S
2
Z
*
10000 0 0
x
1
01-1/20-1/4-1/45/4
x
3
00-1/211/4-3/43/4
As there is no variable to be entered in the basis, this table is
optimum for Phase I. In this table Max. Z
*
= 0 and no artificial
variable appears in the optimum basis, therefore we can proceed
to Phase II.

Cont…
Phase II: The artificial variables which are non basic at the end of
Phase I are removed from the table and as well as from the
objective function and constraints. Now assign the actual costs to
the variables in the Objective function. That is, Simplex method is
applied to the modified simplex table obtained at the Phase I.
Basic
Variable
Coefficients of: Sol.
Z’x
1
x
2
x
3
S
1
S
2
Z’ 115/2-300 0 0
x
1
01 -1/20-1/4-1/45/4
x
3
00 -1/211/4-3/43/4
Again this table is not feasible as basic variable x
1
has a non zero
coefficient in Z’ row. So make the table feasible.

Cont…
Basic
Variable
Coefficients of: Sol.
Z’x
1
x
2
x
3
S
1
S
2
Z’ 10 3/4015/815/8-75/8
x
1
01 -1/20-1/4-1/45/4
x
3
00 -1/211/4-3/43/4
Optimal Solution is : x
1
= 5/4, x
2
= 0, x
3
= 3/4,
Z’ = -75/8 Z = 75/8

Example
Min.. Z = x
1
- 2x
2
–3x
3
Subject to constraints:
-2x
1
+ x
2
+ 3x
3
= 2 2
2x2x
11 + 3x + 3x
22 + 4x + 4x
33 = = 1
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Phase I:
Introducing artificial variables a
1
and a
2
Auxiliary LPP is: Max. Z* = -a
1
- a
2

Z* + a
1
+ a
2
= 0
Subject to constraints:
-2x
1
+ x
2
+ 3x
3
+ a
1
= 2 2
2x2x
11 + 3x + 3x
22 + 4x + 4x
33 + a + a
2 2 == 1
xx
11, x, x
22, x, x
3 3
> 0

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
x
3
a
1
a
2
Z
*
10 00110
a
1
0-213102
a
2
02 34011
This table is not feasible as a
1
and a
2
has non zero coefficients in
Z
*
row. Therefore next step is to make the table feasible.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z
*
x
1
x
2
x
3
a
1
a
2
Z
*
10 -4-700-3
a
1
0-213102 2/3
a
2
02 34011 1/4
Therefore, x
3
is the entering variable and a
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
x
3
a
1
Z
*
17/45/400-5/4
a
1
0-7/2-5/4015/4
x
3
01/23/4101/4
As there is no variable to be entered in the basis, therefore
Phase I ends here. But one artificial variable is present in the
basis and Z
*
< 0. Therefore we cannot proceed to Phase II.
Given problem is having a non-feasible solution.

Example
Min.. Z = 4x
1
+ x
2
Subject to constraints:
3x
1
+ x
2
= 3 3
4x4x
11 + 3x + 3x
22 > 6
x
1
+2x
2
< < 44
xx
11, x, x
22 > 0

Cont…
Phase I:
Introducing artificial variable a
1
and a
2
, surplus variable S
1
and
slack variable S
2
Auxiliary LPP is:
Max. Z* = -a
1
- a
2

Z* + a
1
+ a
2
= 0
Subject to constraints:
3x
1
+ x
2
+a
1
= 3 3
4x4x
11 + 3x + 3x
22 –S –S
11 + a + a
22 = 6
x
1
+2x
2
+S
2
= 44
xx
11, x, x
22 > 0

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
S
1
S
2
a
1
a
2
Z
*
10 000110
a
1
03 100103
a
2
04 3-10016
S
2
01 201004
This table is not feasible as a
1
and a
2
has non zero coefficients in
Z
*
row. Therefore next step is to make the table feasible.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z
*
x
1
x
2
S
1
S
2
a
1
a
2
Z
*
1-7-41000-9
a
1
03 100103 1
a
2
04 3-10016 3/2
S
2
01 201004 4
Therefore, x
1
is the entering variable and a
1
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z
*
x
1
x
2
S
1
S
2
a
2
Z
*
10 -5/3100-2
x
1
01 1/30001 3
a
2
00 5/3-1012 6/5
S
2
00 5/30103 9/5
Therefore, x
2
is the entering variable and a
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
S
1
S
2
Z
*
10 0000
x
1
01 01/503/5
x
2
00 1-3/506/5
S
2
00 0111
As there is no variable to be entered in the basis, this table is
optimum for Phase I. In this table Max. Z
*
= 0 and no artificial
variable appears in the optimum basis, therefore we can proceed
to Phase II.

Cont…
Phase II:
Original Objective function is:
Min.. Z = 4x
1
+ x
2
Convert the objective function into the maximization form
Max. Z’ = -4 x
1
- x
2
where Z’= -Z
Basic
Variable
Coefficients of: Sol.
Z
*
x
1
x
2
S
1
S
2
Z
*
14 1000
x
1
01 01/503/5
x
2
00 1-3/506/5
S
2
00 0111
Again this table is not feasible as basic variable x
1
and x
2
has a non zero
coefficient in Z’ row. So make the table feasible.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Z

x
1
x
2
S
1
S
2
Z

10 0-1/50-18/5
x
1
01 01/503/53
x
2
00 1-3/506/5-
S
2
00 0111 1
Therefore, S
1
is the entering variable and S
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Z

x
1
x
2
S
1
S
2
Z

10 001/5-17/5
x
1
01 00-1/52/5
x
2
00 103/59/5
S
2
00 011 1
Optimal Solution is : x
1
= 2/5, x
2
= 9/5,
Z’ = -17/5 Z = 17/5

Introduction
At the stage of improving the solution during Simplex
procedure, if a tie for the minimum ratio occurs at least
one basic variable becomes equal to zero in the next
iteration and the new solution is said to be Degenerate.

Example
Max.. Z = 3x
1
+ 9x
2
Subject to constraints:
x
1
+ 4x
2 << 8 8
xx
11 + 2x + 2x
22 << 4
xx
11, x, x
22 > 0

Cont…
Let S
1
and S
2
be two slack variables.
Modified form is:
Z - 3x
1
- 9x
2
= 0
x
1
+ 4x
2
+ S
1
= 8 8
xx
11 + 2x + 2x
2 2 +S+S
22 = = 4
xx
11, x, x
22, S, S
11, S, S
22 > 0
Initial BFS is : x
1
= 0, x
2
= 0, S
1
= 8, S
2
= 4 and Z=0.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
S
1
S
2
Z 1-3-9000
S
1
01 4108 2
S
2
01 2014 2
In this table S
1
and S
2
tie for the leaving variable. So
any one can be considered as leaving variable.
Therefore, x
2
is the entering variable and S
1
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.Ratio
Zx
1
x
2
S
1
S
2
Z 1-3/409/4018
x
2
01/411/402 8
S
2
01/20-1/210 0
Therefore, x
1
is the entering variable and S
2
is the
departing variable.

Cont…
Basic
Variable
Coefficients of: Sol.
Zx
1
x
2
S
1
S
2
Z 10 03/23/218
x
2
00 11/2-1/22
x
1
01 0-12 0
Optimal Solution is : x
1
= 0, x
2
= 2
Z = 18
It results in a Degenerate Basic Solution.
Tags