Professional Documents
Culture Documents
Chapter 4
Wyndor Glass
Maximize Z = 3X1 + 5X2
Subject to:
X1
2X2
3X1 + 2X2
4
12
18
Figure 4.1
Corners: (0,0) (4,0) (4.3)
(2,6) and (0,6)
2, 6
0, 6
4,3
4,0
Figure 4.1
(0,0) and (0,6) adjacent
(0,6) and (2,6) adjacent
(2,6) and (4,3) adjacent
(4,3) and (4,0) adjacent
(4,0) and (0,0) adjacent
2, 6
0, 6
0,0
4,0
Optimality test
If a CPF solution has no adjacent CPF
solution that is better (in terms of the value
of the objective function) then it must be
an optimal solution.
Simplex Iteration
Consider the two edges that emanate from (0,0).
Move up the X2 axis because X2 contributes
more to the objective function of Z = 3X1 + 5X2.
Stop at the next constraint boundary, 2X2 = 12
(or X2 = 6). This is point (0,6). You cant move
further in this direction without leaving the
feasible region.
Find the other adjacent CPF solution for this
point (2,6) from the intersection of constraints.
Optimality test: (0,6) is not optimal because
(2,6) is better.
Repeat steps. (2,6) is optimal solution.
Solution Concepts
Simplex focuses only on CPF solutions, a finite
set.
It is an iterative procedure, meaning a fixed
series of steps is repeated (an iteration) until a
desired result is found.
When possible, the initial CPF solution is the
origin because it is convenient. (Possible when
all variables are non-negative.) If origin is
infeasible, special procedures are needed,
described in section 4.6 of this chapter.
+ X3
= 4
+X4
= 12
+X5 = 18
Augmented Solution
The augmented solution contains values for
the decision variables AND values for the
slacks. So if we augment the solution (3, 2)
in this example by the values of the slacks we
get (3, 2, 1, 8, 5).
A basic solution is an augmented corner-point
solution.
Example: BF Solution
X1
2X2
3X1 + 2X2
+ X3
= 4
+X4
= 12
+X5 = 18
+ X3
=4
2X2(0)
+ X4
=12
3X1(0) + 2X2(0)
+ X5
= 18
Notice that the BFS can be read immediately
from RHS. The simplex used a procedure
(Gaussian elimination) to convert the equations
to the same convenient form with each iteration.
Geometric
Choose (0,0) as initial
CPF solution.
Optimality test: not
optimal because moving
along either edge
increases Z.
Iteration 1, step 1: Move
up the edge lying on the
X2 axis.
Algebraic
Choose X1and X2 to be
non-basic for initial BFS
(0,0,4,12,18)
Not optimal because
increasing either nonbasic variable increases
Z.
Iteration 1, step 1:
Increase X2 while
adjusting other variable
values to satisfy the
system of equations.
Geometric
Algebraic
Iteration 1, step 2;
Iteration 1, step 2:
Stop when the first
Stop when the first
new constraint
basic variable (X3,
boundary (X2=6) is
X4, or X5) drops to
reached.
zero.
Iteration 1, step 3:
Iteration 1, step 3.
Find the intersection
With X2 now basic
of the new pair of
and X4 non-basic,
constraint boundaries:
solve the system of
(0,6) is the new CPF
equations to find the
solution.
new BFS (0,6,4,0,6)
Geometric
Optimality test: Not
optimal because moving
along the edge from (0,6)
to the right increases Z.
Iteration 2: Move along
the edge to the right and
stop when the new
constraint boundary is
reached.
Optimality test : (optimal)
Algebraic
Optimality test: Not
optimal because
increasing one non-basic
variable (X1) increases Z.
Iteration 2: Increase X1,
while adjusting other
variables and stop when
the first basic variable
reaches 0.
Optimality test: (optimal)
Direction of Movement
Z = 3X1 + 5X2
Where to stop
Increasing X2 increases Z. We want to go as
far as possible without leaving the feasible
region.
Check the constraints.
X3 = 4 0 No upper bound on X2
X4 = 12 2X2 0 X2 6 to keep X4 non-neg
X5 = 18 2X2 0 X2 9 to keep X5 non-neg
Thus, X2 can be increased to 6, at which point
X4 drops to zero (non-basic). This is the
minimum ratio test.
=0
=4
= 12
= 18
Transformed Equations
Z - 3X1
X1
+ 5/2X4
+X3
X2
3X1
+ X4
- X4
+ X5
= 30
=4
=6
=6
Tabular form
We have done the tabular form already
It provides a summary of important
information
The simplex tableau is a compact display
of the system of equations
Simplex Tableau
obj
r1
r2
r3
Z
1
0
0
0
X1
-3
1
0
3
X2
-5
0
2
2
X3
0
1
0
0
X4
0
0
1
0
X5
0
0
0
1
RHS
0
4
12
18
Pivots
obj
r1
r2
r3
Z
1
0
0
0
X1
-3
1
0
3
X2
-5
0
2
2
X3
0
1
0
0
X4
0
0
1
0
X5
0
0
0
1
RHS
0
4
12
18
obj
r1
r2
r3
Z
1
0
0
0
X1
-3
1
0
3
X2
0
0
1
0
X3
0
1
0
0
X4
2.5
0
0.5
-1
X5
0
0
0
1
RHS
30
4
6
6
obj
r1
r2
r3
Z
1
0
0
0
X1
0
0
0
1
X2
0
0
1
0
X3
0
1
0
0
X4
1.5
1/3
0.5
-1/3
X5
1
-1/3
0
1/3
RHS
36
4
6
6
ratio
**
6
9
4
**
2
Degeneracy
If one of the degenerate basic variables (basic
variables with a value of zero) retains its zero
value until it is chosen at a subsequent iteration
to be the leaving basic variable, the
corresponding entering variable will be stuck
at zero since it cant be increased without making
the degenerate leaving variable negative, so
the value of Z wont change. Simplex may
go around in a loop, repeating the same sequence
without advancing.
Degeneracy, continued
Perpetual loops are rare. When they do
occur, you can get out of it by picking a
different leaving basic variable from the tie.
Special rules have been developed for tie
breaking so that the loops are avoided.
See: R. Bland New Finite Pivoting Rules for
the Simplex Method. Mathematics of
Operations Research, 2: 103-107, 1977.
Unbounded Z
If Z is unbounded, there will be no candidate
for the leaving basic variable.
In these cases, the constraints dont keep the
value of the objective function from increasing
indefinitely.
Z
1
0
0
0
X1
-3
1
0
3
X2
-2
0
2
2
X3
0
1
0
0
X4
0
0
1
0
X5
0
0
0
1
RHS
0
4
12
18
ratio
obj
r1
r2
r3
Z
1
0
0
0
X1
0
1
0
0
X2
-2
0
2
2
X3
3
1
0
-3
X4
0
0
1
0
X5
0
0
0
1
RHS
12
4
12
6
4
**
2
obj
r1
r2
r3
Z
1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
0
1
3
-1.5
X4
0
0
1
0
X5
1
0
-1
0.5
RHS
18
4
6
3
4
2
**
obj
r1
r2
r3
Z
1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
0
0
1
0
X4
0
-1/3
1/3
1/2
X5
1
1/3
-1/3
0
RHS
18
2
2
6
4
**
6
An Equality Constraint
As we saw in McCarl and Spreen an equality
constraint is equivalent to two inequality
constraints. Hillier and Lieberman provide
another way to handle these constraints, with
an artificial variable.
Modified Problem
Change the last constraint so that
3X1 + 2X2 = 18
Z - 3X1 5X2
X1
+ X3
2X2
3X1 + 2X2
+ X4
=0
=4
= 12
= 18
Figure 4.3
The BFS is now a
line between the two
points.
2, 6
4,3
+MX5
+ X4
+ X5
=0
=4
= 12
= 18
Negative RHS
To eliminate the negative value in the
RHS, multiply through by -1. This operation
reverses the sign of the equality.
In doing simplex by hand, all RHS variables
must be positive. Not required for computer
algorithms.
Functional Constraints as
We introduce both a surplus variable and
an artificial variable so that we can have
a BFS. (We used this technique in solving
our minimization problems earlier.)
Here we will look at an alternative method to
solving minimization problems, the two phase
method.
Minimization
Minimize Z = jcjXj
Same as
Maximize -Z= j (-cj)Xj
Radiation Example
Minimize Z = 0.4X1 + 0.5X2 where X1
and X2 represent doses of two beams
0.3X1 + 0.1X2 2.7
0.5X1 + 0.5X2 = 6
0.6X1 + 0.4X2 6
2nd and 3rd constraint will require artificial
variables.
1st constraint takes a slack and third takes
a surplus
Problem
-Z + 0.4X1 + 0.5X2
+MX4 + MX6
0.3X1 + 0.1X2 +X3
= 27
0.5X1 + 0.5X2
+X4
=6
0.6X1 + 0.4X2
-X5 + X6 = 6
X3 is a slack variable
X4 and X6 are artificial variables
X5 is a surplus variable
Two-Phase Method
Initialization: Add artificial variables to get
an obvious initial solution for the artificial
problem.
The objective of this phase is to find a
BFS to the real problem.
We minimize the artificial problem.
-X5
= 27
=6
=6
becomes Max -Z = X4 X6
becomes Max -Z = X4 X6
Phase 1
Z
-1
0
0
0
X1
-1.1
0.3
0.5
0.6
X2
-0.9
0.1
0.5
0.4
X3
0
1
0
0
X4
0
0
1
0
X5
1
0
0
-1
X6
0
0
0
1
-12
2.7
6
6
Z
-1
0
0
0
X1
0
1
0
0
X2
-16/30
1/3
1/3
1/5
X3
11/3
10/3
-5/3
-2
X4
0
0
1
0
X5
1
0
0
-1
X6
0
0
0
1
-2.1
9
1.5
0.6
Z
-1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
-5/3
20/3
5/3
-10
X4
0
0
1
0
X5
-5/3
5/3
5/3
5
X6
8/3
-5/3
-5/3
5
-0.5
8
0.5
3
Z
-1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
0
0
1
0
X4
1
-4
3/5
6
X5
0
-5
1
5
X6
1
5
-1
-5
0
6
0.3
6
Phase 2
Phase 2
Z
-1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
0
0
1
0
X5
-0.5
-5
1
5
RHS
-5.4
6
0.3
6
Z
-1
0
0
0
X1
0
1
0
0
X2
0
0
0
1
X3
0.5
5
1
-5
X5
0
0
1
0
-5.25
7.5
0.3
4.5
No Feasible Solutions
Artificial variable method can construct a BFS
when an obvious one is not available.
Using either the big M method or the two phase
method allows simplex to work.
Possible pitfall: There may be no feasible
solutions to the real problem, but by constructing
artificial variables we may allow the simplex to
proceed and report an optimal solution
When this happens, one of the artificial variables
will have a positive value in the final solution.
Re-optimization
If we have found an optimal solution for one
version of an LP and then want to run a
slightly different version, it is inefficient to
start from scratch. Re-optimization involves
deducing how changes in the original model
get carried into the final solution (our original
optimal solution). The final tableau is then
revised in light of the new information and the
iterations start from there. (If the tableau that
emerges is not feasible, a dual method can
be applied. )
Sensitivity Analysis
Sensitivity parameters are those that cant be
changed without changing the optimal solution.
If a shadow price on a constraint is positive, then
an increase in the RHS of that constraint will
change the optimal solution. If it is zero, there
is a range over which it can be changed with
no change in the optimal solution.
Also, if a reduced cost is non-zero, there will
be a range over which the related Cj can be
changed without affecting the solution.
Parametric Programming
Related to sensitivity analysis
Involves the systematic study of how the
optimal solution changes as many
parameters change simultaneously over
some range
Trade-offs in parameter values can be
studied, e.g. some resources (bi) can be
increased if others are reduced