Download Linear Programming Simplex Method, Lecture Notes - Mathematics and more Study notes Linear Programming in PDF only on Docsity!
Linear Programming: Chapter 2
The Simplex Method
Robert J. Vanderbei
October 17, 2007
Operations Research and Financial Engineering Princeton University Princeton, NJ 08544 http://www.princeton.edu/∼rvdb
Simplex Method
- maximize −x 1 + 3 x 2 − 3 x An Example.
- subject to 3 x 1 − x 2 − 2 x 3 ≤
- − 2 x 1 − 4 x 2 + 4 x 3 ≤ - x 1 − 2 x 3 ≤
- − 2 x 1 + 2 x 2 + x 3 ≤
- 3 x 1 ≤ - x 1 , x 2 , x 3 ≥
Dictionary Solution is Feasible
maximize ζ = −x 1 + 3 x 2 − 3 x 3 subject to w 1 = 7 − 3 x 1 + x 2 + 2 x 3 w 2 = 3 + 2 x 1 + 4 x 2 − 4 x 3 w 3 = 4 − x 1 + 2 x 3 w 4 = 8 + 2 x 1 − 2 x 2 − x 3 w 5 = 5 − 3 x 1 x 1 , x 2 , x 3 , w 1 , w 2 , w 3 w 4 w 5 ≥ 0.
Notes:
- All the variables in the current dictionary solution are nonnegative.
- Such a solution is called feasible.
- The initial dictionary solution need not be feasible—we were just lucky above.
Simplex Method—First Iteration
- If x 2 increases, obj goes up.
- How much can x 2 increase? Until w 4 decreases to zero.
- Do it. End result: x 2 > 0 whereas w 4 = 0.
- That is, x 2 must become basic and w 4 must become nonbasic.
- Algebraically rearrange equations to, in the words of Jean-Luc Picard, ”Make it so.”
- This is a pivot.
Simplex Method—Second Pivot
Here’s the dictionary after the first pivot:
- Now, let x 1 increase.
- Of the basic variables, w 5 hits zero first.
- So, x 1 enters and w 5 leaves the basis.
- New dictionary is...
Simplex Method—Final Dictionary
- It’s optimal (no pink)!
- Click here to practice the simplex method.
- For instructions, click here.
Unboundedness
Consider the following dictionary:
- Could increase either x 1 or x 3 to increase obj.
- Consider increasing x 1.
- Which basic variable decreases to zero first?
- Answer: none of them, x 1 can grow without bound, and obj along with it.
- This is how we detect unboundedness with the simplex method.
Initialization
Consider the following problem:
maximize − 3 x 1 + 4 x 2 subject to − 4 x 1 − 2 x 2 ≤ − 8 − 2 x 1 ≤ − 2 3 x 1 + 2 x 2 ≤ 10 −x 1 + 3 x 2 ≤ 1 − 3 x 2 ≤ − 2 x 1 , x 2 ≥ 0.
Phase-I Problem
- Modify problem by subtracting a new variable, x 0 , from each constraint and
- replacing objective function with −x 0
Initialization—First Pivot
Applet depiction shows both the Phase-I and the Phase-II objectives:
- Dictionary is infeasible even for Phase-I.
- One pivot needed to get feasible.
- Entering variable is x 0.
- Leaving variable is one whose current value is most negative, i.e. w 1.
- After first pivot...
Initialization—Second Pivot
Going into second pivot:
- Feasible!
- Focus on the yellow highlights.
- Let x 1 enter.
- Then w 5 must leave.
- After second pivot...
End of Phase-I
Current dictionary:
- Optimal for Phase-I (no yellow highlights).
- obj = 0, therefore original problem is feasible.
Phase-II
Current dictionary:
For Phase-II:
- Ignore column with x 0 in Phase-II.
- Ignore Phase-I objective row.
w 5 must enter. w 4 must leave...