Vous êtes sur la page 1sur 34

Simplex Method

Example
Max. Z = 13x
1
+11x
2
Subject to constraints:

4x
1
+5x
2
< 1500
5x
1
+3x
2
< 1575
x
1
+2x
2
< 420
x
1
, x
2
> 0
Objective Function
Constraints
Rewrite objective function so it is equal to
zero
We then need to rewrite Z = 13x
1
+11x
2
as:
Z -13x
1
-11x
2
=0
Convert all the inequality constraints into
equalities by the use of slack variables S
1
, S
2
, S
3
.
4x
1
+5x
2
+ S
1
= 1500
5x
1
+3x
2
+S
2
= 1575
x
1
+2x
2
+S
3
= 420
x
1
, x
2
, S
1
, S
2
, S
3
> 0
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z
S
1

S
2

S
3

Z - 13x
1
-11x
2
= 0

Subject to constraints:
4x
1
+5x
2
+ S
1
= 1500
5x
1
+3x
2
+S
2
= 1575
x
1
+2x
2
+S
3
= 420
Next, these equations are placed in a tableau
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
S
2
0 5 3 0 1 0 1575
S
3
0 1 2 0 0 1 420
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
S
2
0 5 3 0 1 0 1575
S
3
0 1 2 0 0 1 420

a) Choose the most negative number from Z-row. That variable ( x
1
) is
the entering variable.
b) Calculate Ratio = (value-col.) / (entering

-col.)
c) Choose minimum +ve Ratio. That variable (S
2
) is the departing
variable.
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500 1500/4=375
S
2
0 5 3 0 1 0 1575 1575/5=315
S
3
0 1 2 0 0 1 420 420/1=420

a) Choose the most negative number from Z-row. That variable ( x
1
) is
the entering variable.
b) Calculate Ratio = (value-col.) / (entering

-col.)
c) Choose minimum +ve Ratio. That variable (S
2
) is the departing
variable.
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
x
1
0 5 3 0 1 0 1575
S
3
0 1 2 0 0 1 420
Make the pivot element equal to 1
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
x
1
0 5/5 3/5 0 1/5 0
1575/5
S
3
0 1 2 0 0 1 420
Make the pivot element equal to 1
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
x
1
0 1 3/5 0 1/5 0 315
S
3
0 1 2 0 0 1 420
Make the pivot element equal to 1
Make the pivot column values into zeros
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
x
1
0 1 3/5 0 1/5 0 315
S
3
0 1 2 0 0 1 420
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 4 5 1 0 0 1500
x
1
0 1 3/5 0 1/5 0 315
S
3
0
-0
1
-1
2
-3/5
0
-0
0
-1/5
1
-0
420
-315
Make the pivot column values into zeros
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0
-4(0)
4
-4(1)
5
-4(3/5)
1
-4(0)
0
-4(1/5)
0
-4(0)
1500
-4(315)
x
1
0 1 3/5 0 1/5 0 315
S
3
0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 -13 -11 0 0 0 0
S
1
0 0 13/5 1 -4/5 0 240
x
1
0 1 3/5 0 1/5 0 315
S
3
0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S
1
0 0 13/5 1 -4/5 0 240
x
1
0 1 3/5 0 1/5 0 315
S
3
0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S
1
0 0 13/5 1 -4/5 0 240
x
1
0 1 3/5 0 1/5 0 315
S
3
0 0 7/5 0 -1/5 1 105
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S
1
0 0 13/5 1 -4/5 0 240 92.3
x
1
0 1 3/5 0 1/5 0 315 525
S
3
0 0 7/5 0 -1/5 1 105 75
Z x
1
x
2
S
1
S
2
S
3
Value Ratio
Z 1 0 0 0 15/7 16/7 4335
S
1
0 0 0 1 -3/7 -13/7 45
x
1
0 1 0 0 2/7 -3/7 270
x
2
0 0 1 0 -1/7 5/7 75
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
2x
2
+5x
3
< 10
3x
1
+2x
2
+4x
3
< 15
x
1
, x
2
, x
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
2x
2
+5x
3
+S
2
= 10
3x
1
+2x
2
+4x
3
+S
3
= 15
x
1
, x
2
, x
3
,

S
1
,

S
2
,

S
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
Z x
1
x
2
x
3
S
1
S
2
S
3

Z 1 -3 -5 -4 0 0 0 0
S
1
0 2 3 0 1 0 0 8 8/3
S
2
0 0 2 5 0 1 0 10 5
S
3
0 3 2 4 0 0 1 15 15/2
Therefore, x
2
is the entering variable and S
1
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/3 0 -4 5/3 0 0 40/3
x
2
0 2/3 1 0 1/3 0 0 8/3 -
S
2
0 -4/3 0 5 -2/3 1 0 14/3 14/15
S
3
0 5/3 0 4 -2/3 0 1 29/3 29/12
Therefore, x
3
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 -11/15 0 0 17/15 4/5 0 256/15
x
2
0 2/3 1 0 1/3 0 0 8/3 4
x
3
0 -4/15 0 1 -2/15 1/5 0 14/15 -
S
3
0 41/15 0 0 2/15 -4/5 1 89/15 89/41
Therefore, x
1
is the entering variable and S
3
is the
departing variable.
Cont
Basic
Variable
Coefficients of: Sol.
Z x
1
x
2
x
3
S
1
S
2
S
3

Z 1 0 0 0 45/41 24/41 11/41 765/41
x
2
0 0 1 0 15/41 8/41 -10/41 50/41
x
3
0 0 0 1 -6/41 5/41 4/41 62/41
x
1
0 1 0 0 -2/41 -12/41 15/41 89/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
1
+ 4x
2
< 12
-4x
1
+ 3x
2
+ 8x
3
< 10
x
1
, x
2
, x
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
1
+ 4x
2
< 12
-4x
1
+ 3x
2
+ 8x
3
< 10
x
1
, x
2
, x
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
1
+ 4x
2
+ S
2
= 12
-4x
1
+ 3x
2
+ 8x
3
+S
3
= 10
x
1
, x
2
, x
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 1 1 -3 2 0 0 0 0
S
1
0 3 -1 3 1 0 0 7 -
S
2
0 -2 4 0 0 1 0 12 3
S
3
0 -4 3 8 0 0 1 10 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/2 0 2 0 3/4 0 9
S
1
0 5/2 0 3 1 1/4 0 10 4
x
2
0 -1/2 1 0 0 1/4 0 3 -
S
3
0 -5/2 0 8 0 -3/4 1 1 -
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 1 0 0 13/5 1/5 8/10 0 11
x
1
0 1 0 6/5 2/5 1/10 0 4
x
2
0 0 1 3/5 1/5 3/10 0 5
S
3
0 0 0 11 1 -1/2 1 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
1
+ x
2
< 2
x
1
, x
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
1
+ x
2
+S
2
= 2
x
1
, x
2
, S
1
, S
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
Z x
1
x
2
S
1
S
2

Z 1 -3 -4 0 0 0
S
1
0 1 -1 1 0 1 -
S
2
0 -1 1 0 1 2 2
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
S
1
S
2

Z 1 -7 0 0 4 8
S
1
0 0 0 1 1 3 -
x
2
0 -1 1 0 1 2 -
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.

Vous aimerez peut-être aussi