Download Simplex Method for Linear Programming: Solving an Example using the Simplex Algorithm and more Study notes Production and Operations Management in PDF only on Docsity! OPIM 913 Optimization Lecture 2 1 Simplex Method for Linear Programming An Example. maximize −x1 + 3x2 − 3x3 subject to 3x1 − x2 − 2x3 ≤ 7 −2x1 − 4x2 + 4x3 ≤ 3 x1 − 2x3 ≤ 4 −2x1 + 2x2 + x3 ≤ 8 3x1 ≤ 5 x1, x2, x3 ≥ 0. Rewrite with slack variables: maximize ζ = −x1 + 3x2 − 3x3 subject to w1 = 7 − 3x1 + x2 + 2x3 w2 = 3 + 2x1 + 4x2 − 4x3 w3 = 4 − x1 + 2x3 w4 = 8 + 2x1 − 2x2 − x3 w5 = 5 − 3x1 x1, x2, x3, w1, w2, w3 ≥ 0. Notes: • This layout is called a dictionary. • Setting x1, x2, and x3 to 0, we can read off the values for the other variables: w1 = 7, w2 = 3, etc. This specific solution is called a dictionary solution. • 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. • Dependent variables, on the left, are called basic variables. • Independent variables, on the right, are called nonbasic variables. Agenda • Discuss unboundedness; (today) • Discuss initialization/infeasibility; i.e., what if initial dictionary is not fea- sible. (today) • Discuss degeneracy. (next lecture) Unboundedness Consider the following dictionary: Could increase either x1 or x3 to increase obj. Consider increasing x1. Which basic variable decreases to zero first? Answer: none of them, x1 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 −3x1 + 4x2 subject to −4x1 − 2x2 ≤ −8 −2x1 ≤ −2 3x1 + 2x2 ≤ 10 −x1 + 3x2 ≤ 1 −3x2 ≤ −2 x1, x2 ≥ 0. Phase-I Problem Modify problem by (a) subtracting a new variable, x0, from each constraint and (b) replacing objective function with −x0: maximize −x0 subject to −x0 − 4x1 − 2x2 ≤ −8 −x0 − 2x1 ≤ −2 −x0 + 3x1 + 2x2 ≤ 10 −x0 − x1 + 3x2 ≤ 1 −x0 −3x2 ≤ −2 x0, x1, x2 ≥ 0. Clearly feasible: pick x0 large, x1 = 0 and x2 = 0. If optimal solution has obj= 0, then original problem is feasible and final phase-I basis can be used as initial phase-II basis (ignoring x0 there- after). If optimal solution has obj< 0, then original problem is infeasible. Initialization—Third Pivot Going into third pivot: x2 must enter. x0 must leave. After third pivot: Optimal for Phase-I (no yellow highlights). obj= 0, therefore original problem is feasible. Phase-II Recall last dictionary: For Phase-II: (a) Ignore column with x0 in Phase-II. (b) Ignore Phase-I objective row. w5 must enter. w4 must leave. After pivot: Optimal!