Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

4-Simplex Method

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

SIMPLEX METHOD

► Introduction
► Terminologies
► Simplex steps
► Case of a minimization problem
► Special cases
Simplex Method

▪ A linear programming algorithm that can solve problems having


more than two decision variables

▪ Developed by George Dantzig in 1946

▪ It provides us with a systematic way of examining the vertices of


the feasible region to determine the optimal value of the
objective function.

83
Terminologies

▪ Standard Form: a linear program in which all the constraints are


written as equalities.
▪ Slack Variable: a variable added to the LHS of “Less than or
equal to” constraint to convert it into an equality.
▪ Surplus Variable: a variable subtracted from the LHS of
“More than or equal to” constraint to convert it into an equality.

84
Terminologies (contd.)

▪ Basic Solution: for a system of m linear equations in n variables


(n>m), a solution obtained by setting (n-m) variables equal to
zero and solving the system of equations for remaining m
variables.
▪ Basic Feasible Solution (BFS): If all the variables in basic
solution are more than or equal to zero.
▪ Optimum Solution: Any BFS which optimizes (maximizes or
minimizes) the objective function.

85
Terminologies (contd.)

▪ Pivotal Column: the column having largest positive (or negative)


value in the Net Evaluation Row (Cj-Zj ) for a maximization(or
minimization) problem.
▪ Pivotal Row: the row corresponding to variable that will leave
the table in order to make room for another variable.
▪ Pivotal Element: element at the intersection of pivotal row and
pivotal column.

86
The Simplex Method

▪ To better understand the method, we introduce it with an


example:

Max 𝑍 = 4𝑥1 + 6𝑥2

−𝑥1 + 𝑥2 ≤ 11

𝑥1 + 𝑥2 ≤ 27

2𝑥1 + 5𝑥2 ≤ 90

𝑥1 ≥ 0, 𝑥2 ≥ 0

87
The Simplex Method
Step 1: Convert the LP problem into a system of linear equations

► Rewriting the constraint inequalities as equations by adding new


"slack variables" and assigning them zero coefficients (profits) in
the objective

Max 𝑍 = 4𝑥1 + 6𝑥2 + 𝟎𝑺𝟏 + 𝟎𝑺𝟐 + 𝟎𝑺𝟑

Standard form of a LP

Slack variables

88
The Simplex Method
Step 2: Obtain a Basic Solution to the problem

► A basic solution of a LPP in standard form is a solution


(x1, . . . , xn, s1, . . . , sm) of the constraint equations in
which at most m variables are nonzero. The variables that
are nonzero are called basic variables:
▪ Put the decision variables: x1=0, x2=0
▪ Basic variables: s1=11 , s2=27, s3=90
The Simplex Method
Step 3: Form the Initial Simplex Tableau

+0 s1 + 0s2 + 0s3

Non-basic variables

Cj 4 6 0 0 0 Min.
Ratio
Basic var. x1 x2 s1 s2 s3 Basic solution

s1 -1 1 1 0 0 11
s2 1 1 0 1 0 27
s3 2 5 0 0 1 90
Zj 0 0 0 0 0 Z=0
Cj - Zj 4 6 0 0 0
90
The Simplex Method
Step 4: Find the Pivot (1/2)

► Find (Cj-Zj) having highest positive value


► The column corresponding to this value, is called the
Pivotal Column and enters the table.

Cj 4 6 0 0 0 Min.
Ratio
Basic var. x1 x2 s1 s2 s3
XB
s1 -1 1 1 0 0 11
s2 1 1 0 1 0 27
s3 2 5 0 0 1 90
Zj 0 0 0 0 0

Cj - Zj 4 6 0 0 0

entering
91
The Simplex Method
Step 4: Find the Pivot (2/2)
► Find the Minimum Positive Ratio
► Divide XB values by the corresponding values of Pivotal Column.
► The row corresponding to the minimum positive value is the Pivotal Row and leaves the
table.

Pivot
Cj 4 6 0 0 0 Min.
Ratio XB
Basic var. x1 x2 s1 s2 s3
s1 -1 1 1 0 0 11/1=11 departing
s2 1 1 0 1 0 27/1=27
s3 2 5 0 0 1 90/5= 18
Zj 0 0 0 0 0

Cj - Zj 4 6 0 0 0

entering
92
The Simplex Method
Step 5: Pivoting (1/2)

► First iteration:
▪ In the new table, we shall place the incoming variable (X2)
instead of the outgoing variable (S1).
▪ Accordingly, new values of this row have to be obtained in
the following way
✓ R1(New)=R1(Old)/Pivotal Element = R1(Old)/1

✓ R2(New)=R2(Old) - (Intersecting value of R2(Old) & Pivotal Col) * R1(New)


=R2(Old) - 1*R1(New)

✓ R3(New)=R3(Old) - (Intersecting value of R3(Old) & Pivotal Col) * R1(New)


=R3(Old) - 5*R1(New)
93
The Simplex Method
Step 5: Pivoting (2/2)

► First iteration:
▪ In the new table, we shall place the incoming variable (X2)
instead of the outgoing variable (S1).
▪ Accordingly, new values of this row have to be obtained in
the following way

Cj 4 6 0 0 0 Min.
Ratio
Basic var. x1 x2 s1 s2 s3
x2 -1 1 1 0 0 11
s2 2 0 -1 1 0 16
s3 7 0 -5 0 1 35
Zj -6 6 6 0 0 Z=66
Cj - Zj 10 0 -6 0 0

94
The Simplex Method
Step 6: Check for optimality (1/2)

► If all the (Cj-Zj) values are zero or negative, an optimum point is reached,
otherwise repeat the process as given in Steps 4,5 & 6.

Cj 4 6 0 0 0 Min. Cj 4 6 0 0 0 Min.
Basic var. x1 x2 s1 s2 s3 Ratio Basic var. x1 x2 s1 s2 s3 Ratio

?
x2 -1 1 1 0 0 - x2 0 1 2/7 0 1/7 16
s2 2 0 -1 1 0 16/2=8 s2 0 0 3/7 1 -2/7 6
s3 7 0 -5 0 1 35/7=5 x1 1 0 -5/7 0 1/7 5
Zj -6 6 6 0 0 Z=66 Zj 4 6 -8/7 0 10/7 Z=116
Cj - Zj 10 0 -6 0 0 Cj - Zj 0 0 8/7 0 -10/7

95
The Simplex Method
Step 6: Check for optimality (2/2)

► If all the (Cj-Zj) values are zero or negative, an optimum point is reached
otherwise repeat the process as given in Step 4,5 & 6.

Cj 4 6 0 0 0 Min. Cj 4 6 0 0 0 Min.
Basic var. x1 x2 s1 s2 s3 Ratio Basic var. x1 x2 s1 s2 s3 Ratio

x2 0 1 2/7 0 1/7 16 x2 0 1 0 -2/3 1/3 12


s2 0 0 3/7 1 -2/7 6 s2 0 0 1 7/3 -2/3 14
x1 1 0 -5/7 0 1/7 5 x1 1 0 0 5/3 1-1/3 15
Zj 4 6 -8/7 0 10/7 Z=116 Zj 4 6 0 8/3 2/3 Z=132
Cj - Zj 0 0 8/7 0 -10/7 Cj - Zj 0 0 0 -8/3 -2/3

Optimal
solution
96
The Simplex Method Summarized

We summarize the steps involved in the simplex method as follows:


1. Convert each inequality in the set of constraints to an equation by adding
slack variables.
2. Create the initial simplex tableau.
3. Locate the highest positive entry in the bottom row. The column for this
entry is called the entering column. (If ties occur, any of the tied entries can
be used to determine the entering column.)
4. Form the ratios of the entries in the “b-column” with their corresponding
positive entries in the entering column. The departing row corresponds to the
smallest nonnegative ratio (If all entries in the entering column are 0 or
negative, then there is no maximum solution. For ties, choose either entry.)
The entry in the departing row and the entering column is called the pivot.

97
The Simplex Method Summarized

5. Use elementary row operations so that the pivot is 1, and all other entries in
the entering column are 0. This process is called pivoting.
6. If all entries in the bottom row are zero or negative, this is the final tableau.
If not, go back to Step 3.
7. If you obtain a final tableau, then the linear programming problem has a
maximum solution, which is given by the entry in the lower-right corner of the
tableau.

98
The Simplex Method
Case of a Minimization Problem

Two approaches to solve a minimization problem with the simplex


method:
► Convert it to a maximization problem in standard form, and
then apply the simplex method
► Apply the same steps of the simplex method as in the
maximization problem, except that the optimality test and
the pivot column selection are changed as follows:
▫ If all variables of the last row ≥ 0, then stop: the tableau
is optimal
▫ Else, select the pivot column as the one with the most
negative coefficient in the last row
99
The Simplex Method
Special Cases

▪ Degeneracy
A solution of the problem is said degenerate solution if the value of at
least one basic variable becomes zero. It can cause the solution to cycle
indefinitely.

100
The Simplex Method
Special Cases

▪ Unbounded LP
The pivot column has only negative or zero entries: the ratio
test fails and hence the relevant entering variable can improve
the objective function with no stop.

101
The Simplex Method
Special Cases
▪ Multiple solutions
Optimal tableau has zero entries for non-basic solutions in the Cj–Zj row. Hence, by
pivoting on those rows we obtain new solutions with the same (optimal) value of Z.

102

You might also like