0% found this document useful (0 votes)
48 views38 pages

3 Simplex Procedure

The document discusses the simplex method for solving linear programming problems. It begins with an overview of linear programming problems and the simplex method. It then provides details on: - Representing linear programming problems and their constraints geometrically using polytopes - The initialization step which selects an initial basic feasible solution - The optimality test to determine if the current solution is optimal - Choosing entering and leaving variables to move to an adjacent solution - An example problem solved using the simplex method in tabular form through iterations - Key terms used in the simplex method like pivot column, pivot row, and pivot element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views38 pages

3 Simplex Procedure

The document discusses the simplex method for solving linear programming problems. It begins with an overview of linear programming problems and the simplex method. It then provides details on: - Representing linear programming problems and their constraints geometrically using polytopes - The initialization step which selects an initial basic feasible solution - The optimality test to determine if the current solution is optimal - Choosing entering and leaving variables to move to an adjacent solution - An example problem solved using the simplex method in tabular form through iterations - Key terms used in the simplex method like pivot column, pivot row, and pivot element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 38

ME F344 Engineering Optimization

BITS Pilani
K KK
Birla
K Birla
GoaGoa
Campus
Campus
Dr. Varinder Singh
2

• Simplex Method

• Algebra of Simplex Method

• Examples

BITS Pilani, K K Birla Goa Campus


3

Simplex Method

BITS Pilani, K K Birla Goa Campus


4

In optimization theory, the simplex algorithm, is a popular algorithm


for numerically solving linear programming problems.

The algorithm was created by the American Mathematician


George B. Dantzig in 1947.
The journal “Computing in Science and Engineering”

Listed as one of the top 10 algorithms of the century.

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

BITS Pilani, K K Birla Goa Campus


How to Solve an LPP of higher dimension ?
6

 The constraints of a Linear Programming Problem give rise to a polytope


with finite number of vertices.

 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

BITS Pilani, K K Birla Goa Campus


7

BITS Pilani, K K Birla Goa Campus


Simplex Method 8

An iterative
Initialization
procedure (Find initial BFS)

Is the current Stop


BFS optimal?

Move to a better
adjacent BFS

BITS Pilani, K K Birla Goa Campus


Initial Assumptions

• All constraints are of ≤ type

• All right-hand-side values (bj, j=1, …,m) must be non-


negative

BITS Pilani, K K Birla Goa Campus


Algebra of the Simplex Method
10

Let us consider the following LPP

Maximize Z = 3x1+ 5x2


subject to
x1 ≤4
2x2 ≤ 12
3x1+ 2x2 ≤18

x1, x2 ≥ 0

BITS Pilani, K K Birla Goa Campus


11
Standard form :

Maximize Z = 3x1+ 5x2

subject to x1 +s1 =4
2x2 +s2 = 12
3x1+ 2x2 +s3 = 18

x1,x2, s1, s2, s3 ≥ 0

BITS Pilani, K K Birla Goa Campus


Initialization 12

• Find an initial basic feasible solution

“If possible, use the origin as the initial BFS”

• 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)

BITS Pilani, K K Birla Goa Campus


Optimality Test 13

• Are any adjacent BFS better than the current one?


• Rewrite Z in terms of nonbasic variables and investigate rate of improvement
• Current nonbasic variables: x1 , x2
• Corresponding Z: Z = 3x1 + 5x2

BITS Pilani, K K Birla Goa Campus


Direction of Movement
14

• Which edge to move on?


• Determine the direction of movement by selecting the entering variable
(variable ‘entering’ the basis)
• Choose the direction of steepest ascent
– x1: Rate of improvement in Z = 3
– x2: Rate of improvement in Z = 5

• Entering basic variable = x2

BITS Pilani, K K Birla Goa Campus


15

The nonbasic variable that will become basic is referred to as


“entering” variable.

The basic variable that will become nonbasic is referred to as


“leaving” variable.

Criterion for “entering” variable


Choose that variable as the “entering” variable which has the most –ve coefficient in
the z-row in case it is a maximization problem (most +ve coefficient in the z-row in
case it is a minimization problem) while writing it as an equation CX=0.

BITS Pilani, K K Birla Goa Campus


Criterion for “leaving” variable (Feasibility Condition)
16

Let bi be the RHS of the ith row.

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
 

BITS Pilani, K K Birla Goa Campus


Simplex Method in Tabular form
17

Let us consider the following problem

Maximize Z = 3x1+ 5x2

subject to
x1 ≤4
2x2 ≤ 12
3x1+ 2x2 ≤18
x1, x2 ≥ 0

BITS Pilani, K K Birla Goa Campus


Write as system of equations 18

Z - 3x1 - 5x2 =0
x1 +s1 =4
2x2 +s2 = 12
3x1+ 2x2 +s3 = 18

BITS Pilani, K K Birla Goa Campus


19

Basic
Z x1 x2 s1 s2 s3 Solution
variable

s1

s2

s3

BITS Pilani, K K Birla Goa Campus


20

 Z-row is the objective equation row.

 The remaining 3 rows are the basic variable rows.

 Each row corresponds to a basic variable

BITS Pilani, K K Birla Goa Campus


Iteration 1 :
21

Basic variable Z x1 x2 s1 s2 s3 Solution

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

BITS Pilani, K K Birla Goa Campus


22

Choose that variable as the “entering” variable which has the most –ve coefficient in the z-row
in case it is a maximization

x2 enters the basis


Basic Min.
Z x1 x2 s1 s2 s3 Solution
variable Ratio
0/-5=No Ratio
Z 1 -3 -5 0 0 0 0
s1 0 1 0 1 0 0 4 4/0= ---------

12/2 =6
s2 0 0 2 0 1 0 12
18/2 =9
s3 0 3 2 0 0 1 18

Minimum Ratio is corresponding to S2


S2 leaves the basis
BITS Pilani, K K Birla Goa Campus
23

The entering variable column is called the pivot column.

The leaving variable row is called the pivot row.

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.

BITS Pilani, K K Birla Goa Campus


24

Iteration 2 :
Min.
Basic Ratio
Z x1 x2 s1 s2 s3 Solution
variable

Z+5x2 Z 1 -3 0 0 5/2 0 30 No Ratio


S1 s1 0 1 0 1 0 0 4 4/1 = 4

S2/2 x2 0 0 1 0 1/2 0 6 -------

S3-2x2 s3 6/3 =2
0 3 0 0 -1 1 6

Stop: If all the entries in the Z-row are ≥ 0 ( or ≤ 0 )


in Max. (or Min.) then stop else repeat the iteration.

BITS Pilani, K K Birla Goa Campus


25

Basic variable Z x1 x2 s1 s2 s3 Solution

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

All the entries in the Z-row are ≥ 0, hence we have reached


the optimal solution.

Optimal Solution: x1 = 2, x2 = 6, Z=36


BITS Pilani, K K Birla Goa Campus
Optimal 26
Solution
(0, 6) (2, 6)

Feasible (4, 3)
Region

(0, 0) (4, 0)

BITS Pilani, K K Birla Goa Campus


Example 2: 27

Min Z = x1 -2x2 + x3
subject to
x1 + 2x2 -2x3 ≤4
x1 -x3 ≤ 3
2x1 -x2 +2x3 ≤ 2
x1, x2, x3 ≥ 0

BITS Pilani, K K Birla Goa Campus


28

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

BITS Pilani, K K Birla Goa Campus


29
System of equations

Z - x1 + 2x2 - x3 =0
x1 + 2x2 -2x3 + s1 =4
x1 - x3 + s2 =3
2x1 - x2 + 2x3 + s3 = 2

BITS Pilani, K K Birla Goa Campus


BV Z x1 x2 x3 S1 S2 S3 Solution Ratio

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

Z 1 -9/2 0 0 -3/2 0 -1 -8 ---

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 table is Optimal, since all the coefficient in


Z-row are ≤ 0 (Minimization Problem).
Optimal solution : x1= 0, x2 = 6, x3 = 4, Z = -8

BITS Pilani, K K Birla Goa Campus


Example 3: 32

Max Z = -x1 +3x2 -3x3


subject to
3x1 -x2 +x3 ≤ 7
-x1 +2x2 ≤6
-4x1 +3x2 +8x3 ≤ 10
x1, x2, x3 ≥ 0

BITS Pilani, K K Birla Goa Campus


33

Points to Remember in Simplex Algorithm

 All the constraints should be ≤ type.

 All variables should be ≥ 0.

 Coefficients of basic variables in z-row should be zero.

 The coefficients matrix corresponding to initial basic variables forms an identity


matrix.

 The entering variable will be the one which has most negative (most positive) z-row
coefficient in case of max. (min.) problem.

BITS Pilani, K K Birla Goa Campus


34

Points to Remember …..

 Leaving variable should follow the minimum ratio test.

 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.

BITS Pilani, K K Birla Goa Campus


(1). Solve the following LPPs using Simplex method:

(i) Max. z  12 x1  15 x2


subject to 4 x1  3 x2  12
2 x1  5 x2  10
x1 , x2  0

(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

You might also like