CH 03 Simplex Method and Sensitivity Analysis
CH 03 Simplex Method and Sensitivity Analysis
Z = 5x1 + 4x2
ITERATIVE NATURE
𝑛 𝑛!
𝐶 =𝑚
𝑚 ! ( 𝑛 −𝑚 ) !
3.2 THE STEPS OF THE SIMPLEX METHOD ARE
1. System Description
2. System Modeling
3. Converting Inequalities into Equations, with
Nonnegative Right-Hand Side
4. Make simplex tableau from the equations coeficient
COMPUTATION
SYSTEM DESCRIPTION
REDDY MIKKS PROBLEM
SYSTEM MODELING
CONVERTING INEQUALITIES INTO EQUATIONS
WITH NONNEGATIVE RIGHT-HAND SIDE
MAKE SIMPLEX TABLEAU FROM THE
EQUATIONS COEFICIENT
In this manner, the starting simplex tableau can be represented as
follows:
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 −5 −4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24 s1-row
s2 0 1 2 0 1 0 0 6 s2-row
s3 0 −1 1 0 0 1 0 1 s3-row
s4-row
s4 0 0 1 0 0 0 1 2
DETERMINE THE ENTERING VARIABLE
Select ENTERING VARIABLE, by selecting the most negative coeficient
in the z-row, in this example is -5, and X1 as a ENTERING VARIABLE
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 −5 −4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24 s1-row
s2 0 1 2 0 1 0 0 6 s2-row
s3 0 −1 1 0 0 1 0 1 s3-row
s4-row
s4 0 0 1 0 0 0 1 2
DETERMINE THE LEAVING VARIABLE
Select LEAVING VARIABLE, by selecting the MINIMUM NON-
NEGATIVE RATIO. Ratio compute by Solution Column devided by
Entering Column.
S1 LEAVE X1 ENTER PIVOT ROW
z 1 −5 −4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24 24/6 = 4
s2 0 1 2 0 1 0 0 6 6/1 = 6
s3 0 −1 1 0 0 1 0 1 1/-1= -1
s4 0 0 1 0 0 0 1 2 2/0 =
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 −5 −4 0 0 0 0 0 z-row
s1 0 6 4 1 0 0 0 24 s1-row
s2 0 1 2 0 1 0 0 6 s2-row
s3 0 −1 1 0 0 1 0 1 s3-row
s4-row
s4 0 0 1 0 0 0 1 2
PIVOT COLUMN
PRODUCE NEW BASIC SOLUTION
TILE GAUSS-JORDAN COMPUTATIONS NEEDED TO
PRODUCE THE NEW BASIC SOLUTION INCLUDE TWO TYPES
• Pivot row:
• Replace the leaving variable in the Basic column with the entering variable.
• New pivot row = Current pivot row ÷ Pivot element
• All other rows, including z
• New Row = (Current row) - (Its pivot column coefficient) X (New pivot row)
OR:
• If the pivot element is amn, then the new element aij’ is aij’ = aij -
34
New Tableau become
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 0 0 0 20
x1 0 1 0 0 0 4
s2 0 0 1 0 0 2
s3 0 0 0 1 0 5
s4 0 0 1 0 0 0 1 2
New Tableau become
z 1 0 − 0 0 0 20
x1 0 1 0 0 0 4 6
s2 0 0 - 1 0 0 2 1.5
s3 0 0 0 1 0 5 3
s4 0 0 1 0 0 0 1 2 2
New Tableau become
PIVOT ROW
z 1 0 0 0 0 20
x1 0 1 0 0 0 4 6
s2 0 0 1 0 0 2 1.5
s3 0 0 0 1 0 5 3
s4 2
0 0 1 0 0 0 1 2
PIVOT COLUMN
40
New Tableau become
z 1 0 0 0 21
x1 0 1 0 0 3
x2 0 0 0 0
s3 0 0 1 0
s4 0 0 0 0 1
Based on the optimality condition, none of the z-row coefficients associated with the nonbasic
variables, sl and s2, are negative. Hence, the last tableau is optimal.
INTERPRETE THE OPTIMAL SOLUINTION
The optimum solution can be read from the simplex tableau in the following
manner. The optimal values of the variables in the Basic column are given in the
right-hand-side Solution column and can be interpreted as
You can verify that the values s1 = s2 = 0, s3 = , s4 = are consistent with the given
values of xl and x2 by substituting out the values of xl I and x2 in the constraints.
43
The solution also gives the status of the resources. A resource is designated as scarce if the activities (variables)
of the model use the resource completely. Otherwise, the resource is abundant. This information is secured
from the optimum tableau by checking the value of the slack variable associated with the constraint representing
the resource. If the slack value is zero, the resource is used completely and, hence, is classified as scarce.
Otherwise, a positive slack indicates that the resource is abundant. The following table classifies the constraints
of the model:
44
The simplex tableau offers a wealth of additional
information that includes:
1. Sensitivity analysis, which deals with determining the
conditions that will keep the current solution unchanged.
2. Post-optimal analysis, which deals with finding a new optimal
solution when the data of the model are changed.
45
SETTING MICROSOFT EXCEL SOLVER
ADD-IN
46
USE MICROSOFT EXCEL SOLVER ADD-IN
• Prepair Worksheet
• Input data Objective Function and Constraint
• Click menu: Data
• Select: ? Solver
47
48
49
50
51
52
53
TORA OPERATION RESEARCH
SOFTWARE
http://download2263.mediafire.com/wfdcm5456jyg/1ifg23anbpmfc35/tora+operations+research+software.rar
54
56
57
Sensitivity Analysis
58
SENSITIVITY ANALYSIS
59
SENSITIVITY ANALYSIS
60
SENSITIVITY ANALYSIS
61
EXAMPLE
64
65
66
THE DUAL PRICES ALLOW MAKING ECONOMIC DECISIONS
ABOUT THE LP PROBLEM, AS THE FOLLOWING QUESTIONS
DEMONSTRATE:
67
THE DUAL PRICES ALLOW MAKING ECONOMIC DECISIONS
ABOUT THE LP PROBLEM, AS THE FOLLOWING QUESTIONS
DEMONSTRATE:
68
THE DUAL PRICES ALLOW MAKING ECONOMIC DECISIONS
ABOUT THE LP PROBLEM, AS THE FOLLOWING QUESTIONS
DEMONSTRATE:
69
MINIMIZATION
75
76
77
78
GRAPHICAL SOLUTION
Figure 2.3 provides the graphical solution of the model. Because the
second and third constraints pass through the origin, then to plot the
associated straight lines, we need one additional point, which can be
obtained by assigning a value to one of the variables and then solving for
the other variable. For example, in the second constraint, x1 = 200 will
yield .21 × 200 − .3x2 = 0, or x2 = 140. This means that the straight
line .21xl − .3x2 = 0 passes through (0,0) and (200, 140). Note also that
(0,0) cannot be used as a reference point for constraints 2 and 3, because
both lines pass through the origin. Instead, any other point [e.g., (100, 0)
or (0,100)] can be used for that purpose.
79
−
80
Solution:
Because the present model seeks the minimization of the objective
function, we need to reduce the value of z as much as possible in the
direction shown in Figure 2.3. The optimum solution is the
intersection of the two lines x1 + x2 = 800 and .21xl - .3x2 = 0, which
yields xl = 470.59 lb and x2 = 329.41 lb. The associated minimum cost
of the feed mix is z = .3 × 470.59 + .9 × 329.42 = $437.65 per day.
81
SIMPLEX SOLUTION: ARTIFICIAL
VARIABLES
LPs in which all the constraints are (≤) with nonnegative right-hand
sides offer a convenient all-slack starting basic feasible solution.
Models involving ( =) and/or (≥) constraints do not.
The procedure for starting "ill-behaved" LPs with (=) and (≥)
constraints is to use artificial variables that play the role of slacks at the
first iteration, and then dispose of them legitimately at a later iteration.
Two closely related methods are introduced here: the M-method and the
two-phase method.
82
M-Method
83
PENALTY RULE FOR ARTIFICIAL
VARIABLES.
− M, in maximization problems
Artificial variable objective coefficient =
+ M, in minimization problems
84
85
Standardized Model
Min z = .3x1 + .9x2 + MR1 + MR2
ST
x1 + x2 – s1 + R1 = 800
.21x1 – .3x2 +s2 =0
.03x1 – .01x2 – s3 + R2 =0
Modify z-row by
x1 + x2 – s1 + R1 = 800
Or
R1 = 800 – x1 – x2 + s1
And
.03x1 – .01x2 – s3 + R2 =0
Or
R2 = -.03x1 + .01x2 + s3
Then we have
Min z = .3x1 + .9x2 + M(800 – x1 – x2 + s1) + M(-.03x1 + .01x2 + s3)
If for instance, M = 1000, then
Min z = .3x1 + .9x2 + 1000(800 – x1 – x2 + s1) + 1000(-.03x1 + .01x2 + s3)
Min z = .3x1 + .9x2 + 1000(800 – x1 – x2 + s1) + 1000(-.03x1 + .01x2 + s3) 86
Min z = .3x1 + .9x2 + 1000(800 – x1 – x2 + s1) + 1000(-.03x1 + .01x2 + s3)
Min z = .3x1 + .9x2 + 800000 –1000 x1 –1000 x2 + 1000s1 - 30x1 + 10x2 + 1000s3)
Min z = – 1029.70x1 – 989.10x2 + 800000 + 1000s1 + 1000s3
Basic x1 x2 s1 s3 R1 s2 R2 Solution
z 1029.70 989.10 –1000 –1000 0 0 0 800000
R1 1 1 –1 0 1 0 0 800
s2 .21 –.3 0 0 0 1 0 0
R2 .03 –.01 0 –1 0 0 1 0
87
TABLEAU 1
Basic x1 x2 s1 s3 R1 s2 R2 Solution Ratio
z 1029.70 989.10 –1000 –1000 0 0 0 800000
R1 1 1 –1 0 1 0 0 800 800/1
s2 .21 –.3 0 0 0 1 0 0 0/.21
R2 .03 –.01 0 –1 0 0 1 0 0/.03
TABLEAU 2
The optimum solution is which yields xl = 470.59 lb and x2 = 329.41 lb. The associated minimum cost of
the feed mix is z = .3 × 470.59 + .9 × 329.42 = $437.65 per day.
89
TORA SOFTWARE
SOLUTION
90
91
TWO-PHASE METHOD
92
TWO-PHASE METHOD
93
TWO-PHASE METHOD
PHASE I: Put the problem in equation form, and add the necessary artificial variables to
the constraints (exactly as in the M-method) to secure a starting basic solution.
Next, find a basic solution of the resulting equations that, regardless of
whether the LP is maximization or minimization, always minimizes the sum of
the artificial variables. If the minimum value of the sum is positive, the LP
problem has no feasible solution, which ends the process (recall that a positive
artificial variable signifies that an original constraint is not satisfied).
Otherwise, proceed to Phase II.
PHASE II: Use the feasible solution from Phase I as a starting basic feasible solution for
the original problem.
94
95
Standardized Model
Min r = R1 + R2
ST
x1 + x2 – s1 + R1 = 800
.21x1 – .3x2 +s2 =0
.03x1 – .01x2 – s3 + R2 =0
ST
x1 + x2 – s1 + R1 = 800
.21x1 – .3x2 +s2 =0
.03x1 – .01x2 – s3 + R2 =0
Basic x1 x2 s1 s3 R1 s2 R2 Solution
z 1.03 .99 –1 –1 0 0 0 800
R1 1 1 –1 0 1 0 0 800
s2 .21 –.30 0 0 0 1 0 0
R2 .03 –.01 0 –1 0 0 1 0
97
PHASE 1: ITER 1
Basic x1 x2 s1 s3 R1 s2 R2 Solution Ratio
z 1.03 .99 –1 –1 0 0 0 800
R1 1 1 –1 0 1 0 0 800 800/1
s2 .21 –.30 0 0 0 1 0 0 0/.21
R2 .03 –.01 0 –1 0 0 1 0 0/.03
PHASE 1: ITER 3 PHASE 1: ITER 2
100
TORA SOFTWARE SOLUTION
101
102
SPECIAL CASES IN THE
SIMPLEX METHOD
103
SPECIAL CASES IN THE SIMPLEX METHOD
• It is consider four special cases that arise in the use of the simplex method:
1. Degeneracy
2. Alternative optima
3. Unbounded solutions
4. Nonexisting (or infeasible) solutions.
• Our interes in studying these special cases is twofold: (1) to present a theoretical
explanation of these situations and (2) to provide a practical interpretation of what these
special results could mean in a real-life problem.
104
1. DEGENERACY
In the application of the feasibility condition of the simplex method, a tie for the
minimum ratio may occur and can be broken arbitrarily. When this happens, at least
one basic variable will be zero in the next iteration and the new solution is said to be
degenerate.
There is nothing alarming about a degenerate solution, with the exception of a
small theoretical inconvenience, called cycling or circling, which we shall discuss
shortly. From the practical standpoint, the condition reveals that the model has at
least one redundant constraint. To provide more insight into the practical and
theoretical impacts of degeneracy, a numeric example is used.
1. DEGENERACY
Ratio
8/4 = 2
4/2 = 2
2. ALTERNATIVE OPTIMA
109
3. UNBOUNDED OBJECTIVE VALUE
113
4. INFEASIBLE SOLUTION
LP models with inconsistent constraints have no feasible solution. This situation can
never occur if all the constraints are of the type ≤ with nonnegative right-hand sides
because the slacks provide a feasible solution. For other types of constraints, we use
artificial variables. Although the artificial variables are penalized in the objective
function to force them to zero at the optimum, this can occur only if the model has a
feasible space. Otherwise, at least one artificial variable will be positive in the
optimum iteration. From the practical standpoint, an infeasible space points to the
possibility that the model is not formulated correctly.
117
121
THANK YOU
122