Upload
tatteya
View
3.845
Download
2
Embed Size (px)
DESCRIPTION
Simplex Method
Citation preview
Example
Max. Z = 13x1+11x2
Subject to constraints:
4x1+5x2 << 1500 1500
5x5x11+3x+3x2 2 << 1575 1575
xx11+2x+2x2 2 << 420 420
xx11, x, x2 2 > 0
دالة الهدف
القيود أو
الشروط
Rewrite objective function so it is equal to zero
We then need to rewrite Z = 13x1+11x2 as:
Z -13x1-11x2 =0
Convert all the inequality constraints into equalities by the use of slack variables S1, S2 , S3.
4x1+5x2 + S1 = 1500 1500
5x5x11+3x+3x2 2 +S+S22= 1575= 1575
xx11+2x+2x2 2 +S+S33 = 420 = 420
xx11, x, x22, S, S11, S, S22, S, S3 3 > 0
Z x1 x2 S1 S2 S3 Value Ratio
Z
S1
S2
S3
Z - 13x1 -11x2 = 0
Subject to constraints:
4x1+5x2 + S1 = 1500 1500
5x5x11+3x+3x2 2 +S+S2 2 = 1575= 1575
xx11+2x+2x2 2 +S+S33 = 420 = 420
Next, these equations are placed in a tableau
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
S2 0 5 3 0 1 0 1575
S3 0 1 2 0 0 1 420
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
S2 0 5 3 0 1 0 1575
S3 0 1 2 0 0 1 420
a) Choose the most negative number from Z-row. That variable ( x1 ) is the entering variable.
b) Calculate Ratio = (value-col.) / (entering -col.)
c) Choose minimum +ve Ratio. That variable (S2) is the departing variable.
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500 1500/4=375
S2 0 5 3 0 1 0 1575 1575/5=315
S3 0 1 2 0 0 1 420 420/1=420
a) Choose the most negative number from Z-row. That variable ( x1 ) is the entering variable.
b) Calculate Ratio = (value-col.) / (entering -col.)
c) Choose minimum +ve Ratio. That variable (S2) is the departing variable.
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
x1 0 5 3 0 1 0 1575
S3 0 1 2 0 0 1 420
Make the pivot element equal to 1
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
x1 0 5/5 3/5 0 1/5 0 1575/5S3 0 1 2 0 0 1 420
Make the pivot element equal to 1
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
x1 0 1 3/5 0 1/5 0 315
S3 0 1 2 0 0 1 420
Make the pivot element equal to 1
Make the pivot column values into zeros
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
x1 0 1 3/5 0 1/5 0 315
S3 0 1 2 0 0 1 420
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 4 5 1 0 0 1500
x1 0 1 3/5 0 1/5 0 315
S3 0
-0
1
-1
2
-3/5
0
-0
0
-1/5
1
-0
420
-315
Make the pivot column values into zeros
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0
-4(0)
4
-4(1)
5
-4(3/5)
1
-4(0)
0
-4(1/5)
0
-4(0)
1500
-4(315)
x1 0 1 3/5 0 1/5 0 315
S3 0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 -13 -11 0 0 0 0
S1 0 0 13/5 1 -4/5 0 240
x1 0 1 3/5 0 1/5 0 315
S3 0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S1 0 0 13/5 1 -4/5 0 240
x1 0 1 3/5 0 1/5 0 315
S3 0 0 7/5 0 -1/5 1 105
Make the pivot column values into zeros
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S1 0 0 13/5 1 -4/5 0 240
x1 0 1 3/5 0 1/5 0 315
S3 0 0 7/5 0 -1/5 1 105
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 0 -16/5 0 13/5 0 4095
S1 0 0 13/5 1 -4/5 0 240 92.3
x1 0 1 3/5 0 1/5 0 315 525
S3 0 0 7/5 0 -1/5 1 105 75
Z x1 x2 S1 S2 S3 Value Ratio
Z 1 0 0 0 15/7 16/7 4335
S1 0 0 0 1 -3/7 -13/7 45
x1 0 1 0 0 2/7 -3/7 270
x2 0 0 1 0 -1/7 5/7 75
Optimal Solution is : x1= 270, x2= 75, Z= 4335
Example
Max. Z = 3x1+5x2+4x3
Subject to constraints:
2x1+3x2 << 8 8
2x2x22+5x+5x3 3 << 10 10
3x3x11+2x+2x22+4x+4x3 3 << 15 15
xx11, x, x22, x, x3 3 > 0
Cont…
Let S1, S2, S3 be the three slack variables.
Modified form is:
Z - 3x1-5x2-4x3 =0
2x1+3x2 +S1= 8 8
2x2x22+5x+5x3 3 +S+S22= 10= 10
3x3x11+2x+2x22+4x+4x33+S+S33= 15= 15
xx11, x, x22, x, x33,, S1, SS22,, SS3 3 > 0
Initial BFS is : x1= 0, x2= 0, x3=0, S1= 8,
S2= 10, S3= 15 and Z=0.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z x1 x2 x3 S1 S2 S3
Z 1 -3 -5 -4 0 0 0 0
S1 0 2 3 0 1 0 0 8 8/3
S2 0 0 2 5 0 1 0 10 5
S3 0 3 2 4 0 0 1 15 15/2
Therefore, x2 is the entering variable and S1 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z x1 x2 x3 S1 S2 S3
Z 1 1/3 0 -4 5/3 0 0 40/3
x2 0 2/3 1 0 1/3 0 0 8/3 -
S2 0 -4/3 0 5 -2/3 1 0 14/3 14/15
S3 0 5/3 0 4 -2/3 0 1 29/3 29/12
Therefore, x3 is the entering variable and S2 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z x1 x2 x3 S1 S2 S3
Z 1 -11/15 0 0 17/15 4/5 0 256/15
x2 0 2/3 1 0 1/3 0 0 8/3 4
x3 0 -4/15 0 1 -2/15 1/5 0 14/15 -
S3 0 41/15 0 0 2/15 -4/5 1 89/15 89/41
Therefore, x1 is the entering variable and S3 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol.
Z x1 x2 x3 S1 S2 S3
Z 1 0 0 0 45/41 24/41 11/41 765/41
x2 0 0 1 0 15/41 8/41 -10/41 50/41
x3 0 0 0 1 -6/41 5/41 4/41 62/41
x1 0 1 0 0 -2/41 -12/41 15/41 89/41
Optimal Solution is : x1= 89/41, x2= 50/41, x3=62/41, Z= 765/41
Example
Min.. Z = x1 - 3x2 + 2x3
Subject to constraints:
3x1 - x2 + 3x3 << 7
-2x-2x1 1 + 4x+ 4x2 2 << 12 12
-4x-4x11 + 3x + 3x22 + 8x + 8x33 < < 1010
xx11, x, x22, x, x3 3 > 0
Cont…
Convert the problem into maximization problem
Max.. Z’ = -x1 + 3x2 - 2x3 where Z’= -Z
Subject to constraints:
3x1 - x2 + 3x3 << 7
-2x-2x1 1 + 4x+ 4x2 2 << 12 12
-4x-4x11 + 3x + 3x22 + 8x + 8x33 < < 1010
xx11, x, x22, x, x3 3 > 0
Cont…
Let S1, S2 and S3 be three slack variables.
Modified form is:
Z’ + x1 - 3x2 + 2x3 = 0
3x1 - x2 + 3x3 +S1 = 7
-2x-2x1 1 + 4x+ 4x2 2 + S + S22 = 12 = 12
-4x-4x11 + 3x + 3x22 + 8x + 8x33 +S +S33 = = 1010
xx11, x, x22, x, x3 3 > 0Initial BFS is : x1= 0, x2= 0, x3=0, S1= 7, S2= 12, S3 = 10
and Z=0.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z’ x1 x2 x3 S1 S2 S3
Z’ 1 1 -3 2 0 0 0 0
S1 0 3 -1 3 1 0 0 7 -
S2 0 -2 4 0 0 1 0 12 3
S3 0 -4 3 8 0 0 1 10 10/3
Therefore, x2 is the entering variable and S2 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z’ x1 x2 x3 S1 S2 S3
Z’ 1 -1/2 0 2 0 3/4 0 9
S1 0 5/2 0 3 1 1/4 0 10 4
x2 0 -1/2 1 0 0 1/4 0 3 -
S3 0 -5/2 0 8 0 -3/4 1 1 -
Therefore, x1 is the entering variable and S1 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol.
Z’ x1 x2 x3 S1 S2 S3
Z’ 1 0 0 13/5 1/5 8/10 0 11
x1 0 1 0 6/5 2/5 1/10 0 4
x2 0 0 1 3/5 1/5 3/10 0 5
S3 0 0 0 11 1 -1/2 1 11
Optimal Solution is : x1= 4, x2= 5, x3= 0,
Z’ = 11 Z = -11
Example
Max.. Z = 3x1 + 4x2
Subject to constraints:
x1 - x2 << 1
-x-x1 1 + x+ x2 2 << 2 2
xx11, x, x2 2 > 0
Cont…Let S1 and S2 be two slack variables
.
Modified form is:
Z -3x1 - 4x2 = 0
x1 - x2 +S1 = 1
-x-x1 1 + x+ x2 2 +S+S2 2 = 2= 2
xx11, x, x22, S, S11, S, S2 2 > 0Initial BFS is : x1= 0, x2= 0, S1= 1, S2= 2
and Z=0.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z x1 x2 S1 S2
Z 1 -3 -4 0 0 0
S1 0 1 -1 1 0 1 -
S2 0 -1 1 0 1 2 2
Therefore, x2 is the entering variable and S2 is the departing variable.
Cont…
Basic Variable
Coefficients of: Sol. Ratio
Z x1 x2 S1 S2
Z 1 -7 0 0 4 8
S1 0 0 0 1 1 3 -
x2 0 -1 1 0 1 2 -
x1 is the entering variable, but as in x1 column every no. is less than equal to zero, ratio cannot be calculated. Therefore given problem is having a unbounded solution.