300 likes | 843 Views
SIMPLEX METHOD FOR LP. MINIMIZATION CASE Two Phase & Big M Methods. Alternate Cases. What happens when the constraints are of the type ? What happens when the some of the right side constraints are negative ?
E N D
SIMPLEX METHOD FOR LP MINIMIZATION CASE Two Phase & Big M Methods
Alternate Cases • What happens when the constraints are of the type ? • What happens when the some of the right side constraints are negative ? • In the first case we have to add surplus variable on the LHS to convert this into equality. • The initial basic solution then either becomes si=-bi or –si = bi. • Both of the above cannot allow us to proceed further. • Hence we adopt method of Two Phase or Big M. SIMPLEX METHOD
Minimization Case • We add Artificial variables to get an initial basic feasible solution. • Hence an equation of type • sigma (aij xj) bi, where j=1,2,..n & i=1,2,..m • Becomes as follows with addition of surplus variable • sigma (aij xj) – Si = bi where j=1,2,..n & i=1,2,..m • Addition of Artificial variables leads to • sigma (aij xj) – Si + Ai = bi where j=1,2,..n & i=1,2,..m • The above has n +m+m equations, ‘n’ decision variables, m surplus variables and m artificial variables. SIMPLEX METHOD
Minimization Case • As seen earlier, the solution can be obtained by equating (n+2m-m) variables to zero. • The solution will be for Ai = bj (i= 1,2,..m). • This is not the solution we are looking for. • Hence we have to drop the Artificial variables from the solution. • Artificial variables are used only for generating initial solution. SIMPLEX METHOD
Two Phase Method • In the first phase the sum of the artificial variables is minimised. • The second phase minimises the original objective function starting with the basic feasible solution obtained at end of phase I. • Example • Minimise z = 4x1 + x2 • Subject to • 3x1 + x2 = 3, 4x1 + 3x2 6, x1 + 2x2 4, x1,x2>0. SIMPLEX METHOD
Two Phase Method • While solving for Artificial variables we may come across following cases • If Min Za = 0 and at least one positive artificial variable is present in the basis then no feasible solution exists for the original LP. • If Min Za=0 and no artificial variable is present in the basis then basis consists of (xj, sj), hence we may proceed to Phase II. SIMPLEX METHOD
Two Phase Method • Minimise z = 4 x1 + x2 • Subject to • 3x1 + x2 = 3 • 4x1 + 3x2 >6 • x1 + 2x2 < 4 • x1, x2 >0 • Step 1 • Convert in LP with artificial variable • z = 4x1 + x2 + A1 + A2 • 3x1 + x2 + A1 = 3 • 4x1 + 3x2 - s3 + A2 = 6 • x1 + 2x2 + s4 = 4 • x1, x2, s3, A1, A2 > 0 SIMPLEX METHOD
Phase I • Step 1 • Convert in LP with artificial variable • z = 4x1 + x2 + A1 + A2 • 3x1 + x2 + A1 = 3 • 4x1 + 3x2 - s3 + A2 = 6 • x1 + 2x2 + s4 = 4 • x1, x2, s3, A1, A2 > 0 • Step 2 - • Solve the LP with artificial variables • Minimise • R = A1 + A2 • Subject to • 3x1 + x2 + A1 = 3 • 4x1 + 3x2 - s3 + A2 = 6 • x1 + 2x2 + s4 = 4 • x1, x2, s3, A1, A2 > 0 SIMPLEX METHOD
Solving Phase I SIMPLEX METHOD
Solving Phase I SIMPLEX METHOD
Solving Phase I SIMPLEX METHOD
End of Phase I Above LP has to be solved in Phase II - Assignment SIMPLEX METHOD
The Big M Method • Another method of eliminating artificial variables from LP. • Assign a large coefficient for artificial variable (positive or negative) in the objective function (based on max or min). • Penalty will be –M for max problems and + M for min problems. • Refer next Problem SIMPLEX METHOD
Steps in BIG M • Step1 • Express in standard LP form. Add slack, surplus and artificial variables. • Add penalty variables and assign values of +M or –M based on min or max problem • Step 2 • Set up initial basic feasible solution (LP canonical form) SIMPLEX METHOD
Steps in Big M • Step 3 • Calculate all cj – zj and examine values • If all cj-zj >0 (minimization case) or all cj-zj < 0 (maximization case), the current BFS is optimal. • If for a column k, ck-zk is most negative (positive) and all entries in the column are negative then the LP has unbounded optimal solution. • If one or more cj –zj <0 (min case) and cj – zj>0 (max case) then select the variable to enter into the basis with the largest negative (min) or positive (max) cj-zj value. • The leaving variable is with min (ck-zk) for key column. SIMPLEX METHOD
Big M Problem SIMPLEX METHOD
Initial Table SIMPLEX METHOD
Iteration 1 SIMPLEX METHOD
Iteration 2 SIMPLEX METHOD
Iteration 2 SIMPLEX METHOD
Comparison SIMPLEX METHOD
ALTERNATE OPTIMA • Alternate Optima can be obtained by considering all cj-zj row of simplex table • For Max problem, optimum is reached when all cj-zj0. • If for some non-basic variable cj-zj =0 then it can enter the solution. • However the objective function value does not change. • refer excel sheet example SIMPLEX METHOD
UNBOUNDED SOLUTION • In a max problem, if cj-zj>0(cj-zj<0 for Min) for a column not in basis and all entries in this column are negative then the solution is unbounded. • The entering variable could be increased indefinitely with any of the current basis variables removed. • In general unbounded solution happens because of wrong formulation. • Refer excel sheet example SIMPLEX METHOD
INFEASIBLE SOLUTION • In the final simplex table if one of the artificial variables is with positive value then no feasible solution exists. • Refer excel sheet example SIMPLEX METHOD
INFEASIBLE SOLUTION Initial Tableau SIMPLEX METHOD
INFEASIBLE SOLUTION Final Tableau SIMPLEX METHOD