Professional Documents
Culture Documents
Simplex-1
The Essence
Simplex method is an algebraic procedure However, its underlying concepts are geometric Understanding these geometric concepts helps before going into their algebraic equivalents
Simplex-2
(2,6) (4,6)
(0,6)
Constraint boundaries Feasible region Corner-point solutions Corner-point feasible (CPF) solutions Adjacent CPF solutions Edges of the feasible region Optimality test in the Simplex Method: If a CPF solution has no adjacent solutions that are better, then it must be an optimal solution
Simplex-3
(4,3)
(0,0)
(4,0)
(6,0)
X1
Yes
Stop
Simplex-4
(0,6)
Z=30
(2,6)
Z=36
Initial CPF Optimality test If not optimal, then move to a better adjacent CPF solution:
(4,3)
Z=27
(0,0)
Z=0
(4,0)
Z=12 X1
Consider the edges that emanate from current CPF Move along the edge that increases Z at a faster rate Stop at the first constraint boundary Solve for the intersection of the new boundaries Back to optimality test
Simplex-5
Key Concepts
Focus only on CPF solutions An iterative algorithm If possible, use the origin as the initial CPF solution Move always to adjacent CPF solutions Dont calculate the Z value at adjacent solutions, instead move directly to the one that looks better (on the edge with the higher rate of improvement) Optimality test also looks at the rate of improvement (If all negative, then optimal)
Simplex-6
Simplex-7
Initial Assumptions
All constraints are of the form All right-hand-side values (bj, j=1, ,m) are positive
Simplex-8
subject to
x1
subject to
x1
+s1
=4
2x2
3x1+ 2x2 0
= 12
= 18
x1,x2
Simplex-9
subject to
x1
2x2 3x1+ 2x2
+s1
+s2 +s3
=4 = 12 = 18
(0,6,4,0,6)
(2,6,2,0,0)
(4,6,0,0,-6)
Augmented solution
(2,3,2,6,6) (4,3,0,6,0)
X1
Simplex-10
Can set some variables (# = d.f.) to an arbitrary value (simplex uses 0) These variables (set to 0) are called nonbasic variables The rest can be found by solving the remaining system The basis: the set of basic variables If all basic variables are 0, we have a BFS Between two basic solutions, if their bases are the same except for one variable, then they are adjacent
Simplex-11
+s2
(s1,s2,s3)
Which ones are BFS? Which pairs are adjacent?
Simplex-12
+s2
Find an initial basic feasible solution Remember from key concepts: If possible, use the origin as the initial CPF solution 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))
Simplex-13
+s2
Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: Corresponding Z:
Optimal?
Simplex-14
+s2
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 = x2: Rate of improvement in Z =
Simplex-15
+s2
How far can we go? Determine where to stop by selecting the leaving variable (variable leaving the basis) Increasing the value of x2 decreases the value of basic variables The minimum ratio test
Constraint (1): Constraint (2): Constraint (3):
x1
2x2 3x1+ 2x2
+s1
+s2
=4 = 12 +s3 = 18
Convert the system of equations to a more proper form for the new BF solution Elementary algebraic operations: Gaussian elimination
Eliminate the entering basic variable (x2) from all but its equation
Simplex-17
Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: Corresponding Z:
Optimal?
Simplex-18
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 = s2: Rate of improvement in Z =
Simplex-19
How far can we go? Determine where to stop by selecting the leaving variable (variable leaving the basis) Increasing the value of x1 decreases the value of basic variables The minimum ratio test
Constraint (1): Constraint (2): Constraint (3):
Convert the system of equations to a more proper form for the new BF solution Elementary algebraic operations: Gaussian elimination
Eliminate the entering basic variable (x1) from all but its equation
Simplex-21
Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: Corresponding Z:
Optimal?
Simplex-22
Simplex-23
Wyndor Glass
Z3x1 - 5x2 x1 +s1 =0 =4 = 12 +s3 = 18 (0) (1) (2) (3)
+s2
x1
x2
s1
s2
s3
r.h.s.
Simplex-24
Z
1 0 0 0
x1
-3 1 0 3
x2
-5 0 2 2
s1
0 1 0 0
s2
0 0 1 0
s3
0 0 0 1
r.h.s. 0 4 12 18
Optimality test Entering variable (steepest ascent) pivot column Leaving variable (minimum ratio test) pivot row Gaussian elimination
Basic variable
Z
1
0 0 0
x1
x2
s1
s2
s3
r.h.s.
Simplex-25
Z
1 0 0 0
x1
-3 1 0 3
x2
0 0 1 0
s1
0 1 0 0
s2
5/2 0 1/2 -1
s3
0 0 0 1
r.h.s. 30 4 6 6
Optimality test Entering variable (steepest ascent) pivot column Leaving variable (minimum ratio test) pivot row Gaussian elimination
Basic variable
Z
1
0 0 0
x1
x2
s1
s2
s3
r.h.s.
Simplex-26
Z
1 0 0 0
x1
0 0 0 1
x2
0 0 1 0
s1
0 1 0 0
s2
3/2 1/3 1/2 -1/3
s3
1 -1/3 0 1/3
r.h.s. 36 2 6 2
Optimality test Entering variable (steepest ascent) pivot column Leaving variable (minimum ratio test) pivot row Gaussian elimination
Basic variable
Z
1
0 0 0
x1
x2
s1
s2
s3
r.h.s.
Simplex-27
x1
x2
s1
r.h.s.
Basic variable
x1
x2
s1
r.h.s.
Simplex-28
+s2
x1
x2
s1
s2
s3
r.h.s.
Basic variable
x1
x2
s1
s2
s3
r.h.s.
Simplex-29
x1
x2
s1
s2
s3
r.h.s.
Basic variable
x1
x2
s1
s2
s3
r.h.s.
Simplex-30
+s2
x1
x2
s1
s2
s3
r.h.s.
Simplex-31
+s2
x1
x2
s1
s2
s3
r.h.s.
Simplex-32
If there is a tie for the leaving variable, theoretically the way in which the tie is broken is important
The method can get trapped in an infinite loop (cycling under degeneracy) Beyond the scope of this class
Simplex-33
We relaxed the maximization assumption earlier: min cx = Time to relax the other assumptions
Simplex-34
Equality Constraints
Consider the Wyndor Glass problem, where Plant 3 constraint is changed as follows:
Maximize
subject to
Z = 3x1+ 5x2
x1 2x2 3x1+ 2x2 4 12 = 18
x1,x2 0
Simplex-36
x1
x2
r.h.s.
Basic variable
x1
x2
r.h.s.
Simplex-37
x1
x2
r.h.s.
Basic variable
x1
x2
r.h.s.
Simplex-38
x1
Simplex-39
(0,0)
(4,0)
Simplex-40
Easy fix:
Tough consequences
Simplex-41
Constraints
Consider the Wyndor Glass problem, where Plant 3 constraint is changed as follows:
Maximize
subject to
Z = 3x1+ 5x2
x1 2x2 3x1+ 2x2 4 12 18
x1,x2 0
x1 -10, x2 0
Simplex-43
x1 unrestricted in sign, x2 0
Simplex-44
A linear estimate for the average delay per car per lane is given as 120 - 2 (E-W GT) - 3 (N-S GT) Find the green time allocation to minimize average delay
Simplex-45