3 Simplex Procedure
3 Simplex Procedure
BITS Pilani
K KK
Birla
K Birla
GoaGoa
Campus
Campus
Dr. Varinder Singh
2
• Simplex Method
• Examples
Simplex Method
The method uses the concept of a simplex, which is a polytope (such as polygon,
polyhedron etc.,) with finite number of vertices.
A polytope is a geometric object with flat sides, and may exist in any general number of
dimensions n as an n-dimensional polytope or n-polytope
BITS Pilani, K K Birla Goa Campus
2-dimensional Polytope
5
If we can determine all the vertices of the polytope, then we can calculate the
value of the objective function at these points and take the best one as our
optimal solution.
The Simplex Method is an iterative method which moves from one vertex to
another vertex (in the direction of optimum improvement) until the
optimal solution is reached
An iterative
Initialization
procedure (Find initial BFS)
Move to a better
adjacent BFS
x1, x2 ≥ 0
subject to x1 +s1 =4
2x2 +s2 = 12
3x1+ 2x2 +s3 = 18
• Equivalent to:
Choose original variables to be nonbasic (xi=0, i=1,…n) and let the slack variables be
basic (sj=bj, j=1,…m)
Let aij be the coefficient of the entering variable xj in the ith row.
The following “minimum ratio test” decides the leaving variable Choose xk as the leaving
variable where k is given as that row index i for which the ratio
bi
, aij 0 is Minimum
aij
subject to
x1 ≤4
2x2 ≤ 12
3x1+ 2x2 ≤18
x1, x2 ≥ 0
Z - 3x1 - 5x2 =0
x1 +s1 =4
2x2 +s2 = 12
3x1+ 2x2 +s3 = 18
Basic
Z x1 x2 s1 s2 s3 Solution
variable
s1
s2
s3
Z 1 -3 -5 0 0 0 0
s1 0 1 0 1 0 0 4
s2 0 0 2 0 1 0 12
s3 0 3 2 0 0 1 18
Choose that variable as the “entering” variable which has the most –ve coefficient in the z-row
in case it is a maximization
12/2 =6
s2 0 0 2 0 1 0 12
18/2 =9
s3 0 3 2 0 0 1 18
The coefficient in the intersection of the two is referred to as the pivot element.
Apply elementary row operations to modify the simplex tableau so that the pivot column has 1 at the
pivot element and zero in all other places.
Iteration 2 :
Min.
Basic Ratio
Z x1 x2 s1 s2 s3 Solution
variable
S3-2x2 s3 6/3 =2
0 3 0 0 -1 1 6
Z 1 0 0 0 3/2 1 36
s1 0 0 0 1 1/3 -1/3 2
x2 0 0 1 0 1/2 0 6
x1 0 1 0 0 -1/3 1/3 2
Feasible (4, 3)
Region
(0, 0) (4, 0)
Min Z = x1 -2x2 + x3
subject to
x1 + 2x2 -2x3 ≤4
x1 -x3 ≤ 3
2x1 -x2 +2x3 ≤ 2
x1, x2, x3 ≥ 0
Standard Form
Min Z = x1 -2x2 + x3
subject to
x1 + 2x2 -2x3 + s1 =4
x1 -x3 + s2 =3
2x1 -x2 +2x3 + s3 = 2
x1, x2, x3 , s1, s2, s3 ≥ 0
Z - x1 + 2x2 - x3 =0
x1 + 2x2 -2x3 + s1 =4
x1 - x3 + s2 =3
2x1 - x2 + 2x3 + s3 = 2
Z 1 -1 2 -1 0 30 0 0 0 ---
S1 0 1 2 -2 1 0 0 4 4/2=2
S2 0 1 0 -1 0 1 0 3 -----
S3 0 2 -1 2 0 0 1 2 -----
Z 1 -2 0 1 -1 0 0 -4 ---
x2 0 1/2 1 -1 ½ 0 0 2 -----
S2 0 1 0 -1 0 1 0 3 -----
S3 0 5/2 0 1 ½ 0 1 4 4/1=1
31
BV Z x1 x2 x3 S1 S2 S3 Solution Ratio
x2 0 3 1 0 1 0 1 6 -----
S2 0 7/2 0 0 ½ 1 1 7 -----
x3 0 5/2 0 1 ½ 0 1 4 -----
The entering variable will be the one which has most negative (most positive) z-row
coefficient in case of max. (min.) problem.
When all the z-row coefficients are ≥ 0 (or ≤ 0) in case of max. (or min.) problem
the optimality is reached and we will stop the simplex iteration.
(ii) Max. z 2 x1 3 x2
subject to x1 x2 2
2 x1 x2 2
x1 x2 2
x1 0, x2 unrestriced
35
(iii) Max. z 3 x1 2 x2 5 x3
subject to x1 2 x2 x3 430
3 x1 2 x3 460
x1 4 x2 420
x1 , x2 , x3 0
(iv) Min. z 6 x1 2 x2 6 x3
subject to 2 x1 3 x2 x3 14
4 x1 4 x2 10 x3 46
2 x1 2 x2 4 x3 37
x1 2, x2 1, x3 3
36
(2). Solve the following LPPs using Big-M method:
(i) Max. z x1 3 x2
subject to x1 2 x2 2
3 x1 x2 3
x1 4
x1 , x2 0
(ii) Min. z 9 x1 x2 2 x3
subject to 4 x1 2 x2 x3 5
x1 2 x2 3 x3 4
x1 , x2 , x3 0
37
Thank You
BITS Pilani, K K Birla Goa Campus