2Simplex AlgorithmConsider the following LP, solve using Simplex:
3Step 1: Preparing the LP LP Model Is the LP model in normal form? LP in a standard formAll constraints are “=“All RHS >0All variables>0If there are = or >Add an artificial variables to these constraintsWrite Row 0Move all variables in the objective function equation to LHS. Keep all constants in the RHSA min problem can be treated as a –MAX problemObtain an initial BFSIf the original LP is not in normal form apply the Big M method to obtain the initial BFS.
4Step 2: Express the LP in a tableau form ZX1X2S1S2S3RHSRatioRow 01-3-2--Row 1-2100Row 280Row 340
5Step 3: Obtain the initial basic feasible solution (if available) a) Set n-m variables equal to 0These n-m variables the NBVb) Check if the remaining m variables satisfy the condition of BV= If yes, the initial feasible basic solution (bfs) is readily a available= else, carry on some ERO to obtain the initial bfsZX1X2S1S2S3RHSRatioRow 01-3-2--Row 1-2100Row 280Row 340
6Step 4: Apply the Simplex Algorithm a) Is the initial bfs optimal? (Will bringing a NBV improve the value of Z?)b) If yes, which variable from the set of NBV to bring into the set of BV?- The entering NBV defines the pivot columnc) Which variable from the set of BV has to become NBV?- The exiting BV defines the pivot rowExitsPivot cellEntersZX1X2S1S2S3RHSRatioRow 01-3-2--Row 1-2100100/2Row 28080/1Row 34040/1
7Summary of Simplex Algorithm for Papa Louis Set: n-m=0m≠0BFS (intial)BFS (1)BFS (2)BFS (3)1The optimal solution is x1=20, x2=60The optimal value is Z=180The BFS at optimality x1=20, x2=60, s3=20
14Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -3/2 1/2 Make this coefficient equal 1 and pivot all other rows relative to itEntersZx1x2s1s2s3s4RHS1-3100-----426-3/21/2-1-7.53/21033/2.5*2.51-1/233.51-1/255/3.5---5/0.51/215
20The Problem of Finding an Initial Feasible BV An LP ModelStandard FormCannot find an initial basic variable that is feasible.
21Example: Solve Using the Big M Method Write in standard form
22Example: Solve Using the Big M Method Adding artificial variables
23Example: Solve Using the Big M Method Put in tableau form
24Example: Solve Using the Big M Method Eliminating a2 from row 0 by operations: new Row 0 = old Row 0 -M*old Row 2
25Example: Solve Using the Big M Method Eliminating a3 from the new row 0 by operations: new Row=old Row-M*old Row 3
26Example: Solve Using the Big M Method The initial basic variables are s1=25, a2=12, and a3=0. Now ready to proceed for the simplex algorithm.The initial Tableau
27Example: Solve Using the Big M Method Using EROs change the column of x1 into a unity vector.Iteration 1
28Example: Solve Using the Big M Method Using EROs change the column of z into a unity vector.Iteration 2Students to try more iterations. The solution is infeasible. See the attached solution.
29Special case 1: Alternative Optima .Observation: At optimality, all nonbasic variables have nonnegative (≥0) coefficients in row 0, hence the bfs is optimal.At optimality, the non-basic variable x2 has a zero coefficient in row 0.If variable x2 enters into the basis, the basis and bfs changes but the objective function value remains the same. Hence we have multiple optima.Conclusions:If there is no nonbasic variable with a zero coefficient in row 0 of the optimal tableau, then the LP has a unique optimal solution.Even if there is a nonbasic variable with a zero coefficient in row 0 of the optimal tableau, it is possible that the LP may not have an alternative optimal solutions.See Notes on this slide (below) for more information
30Special case 1: Alternative Optima Observation: At optimality, all nonbasic variables have nonnegative (≥0) coefficients in row 0, hence the bfs is optimal.
31Special case 2: Unbounded LPs 1s1x1Notice after the first iteration: At this stage, x2 is the entering variable (because it has the most negative reduced cost, but there is no ratio to compute, since there is no positive entry in the column of x2. As we start increasing x2, the value of z increases (from Row 0) and the values of the basic variables increase as well (from Rows 1 and 2). There is nothing to stop them going off to infinity. So the problem is unbounded.Conclusions:An unbounded LP for a maximization problem occurs when a nonbasic variable with a negative coefficient in row 0 has a nonpositive coefficient in each constraint. The objective function value improves with each iterationSee Notes on this slide (below) for more information
32Special Case 3: Degeneracy Definition: An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero.Notice S1=0However notice that degeneracy is detected when the ratio tests for row 1 and 2 are equal. This means as X2 enters, both S1 and S2 will reach zero at the same time. Hence we have a choice of selecting S1 or S2 as the exiting BV.
33Special Case 5: Degeneracy Iteration 0Iteration 1Definition: An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero.Iteration 2
34Special Case 5: Degeneracy Degeneracy reveals from practical standpoint that the model has at least one redundant constraint.