Transcript L19 LP Two_Phase Simplex
L19 LP part 5 • • • • Review Two-Phase Simplex Algotithm Summary Test 3 results 1
Single Phase Simplex Method • • • • Finds global solutions, if they exist Identifies multiple solutions Identifies unbounded problems Identifies degenerate problems • And, as we shall see in two-phase Simplex Method, it also… identifies infeasible problems 2
Multiple Solutions Non-basic c i ’=0 Non-unique global solutions, ∆ f = 0 3
Unbounded problem 2
x
1 1
x
2
x
2 1
x
3
x
3 0 0 2
x
1 Non-basic pivot column coefficients
a ij
< 0 4
Degenerate basic solution First Tableau row e f g h basic x1 x4 x5 c' x1 1 0 0 0 x2 2 3 4 -2 x3 1 2 -1 -4 x4 0 1 0 0 x5 0 0 1 0 b 3 0 0 2.25
f=-2.25
b/a_pivot 3/1 0/2 neg One or more basic variable(s) = 0 min n/a Simplex method will move to a solution, slowly In rare cases it can “cycle” forever.
5
What’s next?
Single-Phase Simplex Method handles “ ≤” inequality constraints But, LP problems have “=” and “ ≥ ” constraints!
Such a tableau would not be feasible!
6
Simplex Method requires an
Max F
initial basic feasible solution 1 4
x
2
x
1 2
x
1
x
1 2 1 , 2
x x
2 2
x
2 0 5 4 1 “=” and or “ ≥” constraints or bj<0 (neg resource limits) cause infeasibility problems!
i.e. need canonic form to start Simplex 7
Can we transform to canonic form?
Max F
1 4
x
2
x
1 2
x
1
x
1 2 1 , 2
x x
2 2 5 4
x
2 0 1
Min f
1 4
x
2
x
1 2
x
1
x
1 2
x
2
x x
1 , 2
x
2
x
2 0
x
4
x
3 4 1 5 8
Basic Feasible Solution?
Initial tableau requires 3 identity columns for 3 basic variables (m=3)!
Min f
4
x
2 2 1
x
1
x
1 1
x
1 2
x
2
x
2 , 2
x
2 0 0 0
x
1
x
3 3
x
3 0 0
x
4
x
4 1
x
4 4 1 5 Missing third basic variable! Bad!
Need “+1”, Bad!
9
Need two phases • • Phase I - finds a feasible basic solution Phase II- finds an optimal solution, if it exists.
Two-phase Simplex Method using artificial variables!
10
What is so darn infeasible?
Recall, in LaGrange technique, how we insured that an equation is not “violated”, i.e. feasible…
Min f
We set h j =0 and g j +s j =0 1 4
x
2
x
1 2
x
1
x
1 2
x
2
x x
1 , 2
x
2
x
2 0
x
4
x
3 4 1 5
h g
1 2
x
1
x
1
x
2
x
2 )
x
4 ) 0 0 11
Use Artificial Variables x5, x6 to Obtaining feasibility!
x
5
x
6
x
1
x
1
x
2
x
2 0 0
x
3
x
3 0
x
4
x
4 ) 0 0 Use the simplex method to minimize an artificial cost function w (i.e. w=0).
Minimize w
x
5
x
6
Min w
Min w x
1
x
1 0
x
2
x
2 0
x
3
x
1 1
x
4
x
2
x
4 ) 12
Tableau w/Artificial Variables x5,x6
Min f
1 4
x
2 1 2 1
x x x
1 1 1
x x
1 2 1
x
2 1
x
2
x
0 2 2 1 0 0
x x x
3 3 3 0 0
x x
4 4 1
x
4 0
x
5 1
x
5 0
x
5 0 0
x x
6 6 1
x
6 4 5 1 Canonic form,
Phase I Min w
5 3
x
1 0
x
2 0
x
3 1
x
4 i.e. feasible basic solution!
Simplex Tableau row a b basic x3 x5 c d e x6 cost art cost x1 1 2 1 -1 -3 x2 2 1 -1 -4 0 x3 1 0 0 0 0 x4 0 0 -1 0 1 x5 0 1 0 0 0 x6 0 0 1 0 0 b 5 4 1 0 -5 b/a_pivot 13
Transforming Process 1. Convert Max to Min, i.e. Min f(x) = Min -F(x) 2. Convert negative bj to positive, mult by(-1) 3. Add slack variables 4. Add surplus variables 5. Add artificial var’s for “=” and or “ ≥” constraints 6. Create artificial cost function, (
x art
1
x art
2
x artw
) 14
Table 8.17
x x x
3 1 2 5 / 3 2 / 3 2
x x x
4 , 5 , 6
f
13 / 3 0 after w=0, ignore art. var’s reduced cost Feasible when w=0 15
Two-Phase Simplex method Phase I Transform infeasible LP to feasible using artificial variables.
Use Simplex Meth. To minimize artificial cost function (i.e. art. cost row). If w ≠ 0, problem is infeasible!
Phase II Use Simplex meth to min. reduced cost function (i.e.row) Ignore art. Var’s when choosing pivot columns!
16
Transformation example Ex8.65
take out a sheet of paper…
Max F
10
x
1 6
x
2 2 4
x
2 5 1
x
1
x
1
x
1 , 2 3 2 15
x
2
x
2
x
2 0 90 80 25
Min f
10
x
1 6
x
2 2
x
1 5
x i x
1 4
x
2
x
1 0 3
x
2 2
x
5
x
2
x
2 15
x
3
x
25 4 90 80 17
Phase I canonical form
Min f
10
x
1 6
x
2 2
x
1 5
x i x
1 4
x
2
x
1 0 3
x
2 2
x
5
x
2
x
2 15
x
3
x
25 4 90 80
Min f
10
x
1 6
x
2 2 4
x
2
x
1
x
1 5
x i x
1 0 3 2
x
5
x
2
x
2
x
2
x
3
x
6
x
7
x
4 15 90 80 25 18
• • • • Summary Need for initial basic feasible solution (i.e. canonic form) Phase I – solve for min “artificial cost” use artifical var’s for “=” and or “ ≥” constraints Phase II –solve for min “cost” Simplex method determines: Multiple solutions (think c’) Unbounded problems (think pivot a ij <0) Degenerate Solutions (think b j =0) Infeasible problems (think w≠0) 19