Simplex method-2
Simplex method-2
· The procedure for starting LPs with (=) and/or (³) · The M-method starts with the LP in equation form.
constraints is to use artificial variables that play the · If equation ݅ does not have a slack, an artificial variable, ܴ݅, is
role of slacks at the first iteration to get initial basic added to form a starting solution similar to the all-slack basic
solution.
solution.
· The artificial variables are not part of the original problem.
· The artificial variables are then disposed of at a later
· A modeling “trick” is needed to force them to zero value by the
iteration. time the optimum iteration is reached.
· There are two methods: · The desired goal is achieved by assigning a penalty defined as:
1. Big-M-method
2. Two-phase method.
49 50
Big M Method Big M Method
Example: Using ݔ3 as a surplus in the second Step 1: standard form
constraint and ݔ4 as a slack in the
third constraint, the equation form · Add the artificial variables ܴ1 and ܴ2 in the first two
of the problem is given as equations and penalize them in the objective function
· Minimize z = 4 ݔ1 + ݔ2 + M ܴ1 + M ܴ2 , s.t.
3ݔ1 + ݔ2 + ܴ1 =3
4ݔ1 + 3ݔ2 – ݔ3 + ܴ2 =6
ݔ1 + 2ݔ2 + ݔ4 = 4
ݔ1, ݔ2 , ݔ3, ݔ4, ܴ1, ܴ2 ³ 0
Where: M is a very large number
The starting basic solution is (ܴ1, ܴ2, ݔ4) = (3, 6, 4)
52
51
Basic
ݔ1 ݔ2 ݔ3 R1 R2 ݔ4 RHS
variable
ݔ4 0 0 1 1 -1 1 1
· Since there is a positive value in z-row, this solution is not optimal
· The entering variable is x2 (it has the most positive value in the last
· Since there is a positive value in z-row, this solution is not optimal
row)
· The leaving variable is R2 (it has the smallest ratio) · The entering variable is ݔ3 and leaving variable is ݔ4
55 56
z 0 0 0 -98.6 -100 -1/5 17/5 · Phase I: Attempts to find a starting basic feasible
solution, and, if one is found,
ݔ1 1 0 0 2/5 2/5 -1/5 2/5
· Phase II: is invoked to solve the original problem
ݔ2 0 1 0 -1/5 0 -3/5 9/5
Summary of the two-Phase method
ݔ3 0 0 1 1 -1 1 1 Phase I:
1. Put the problem in equation form, and add the
· Since there is no positive value in z-row, this solution is optimal
necessary artificial variables to the constraints (exactly
· Optimal solution is x1 =2/5, x2 = 9/5, and z = 17/5 as in the M-method) to secure a starting basic solution.
· If one or more artificial variables still basic and has a nonzero
value, then the problem has an infeasible solution. 57 58
Two-Phase Method Two-Phase Method
2. Find a basic solution of the resulting equations that Phase II:
always minimizes the sum of the artificial variables, · Use the feasible solution from Phase I as a starting basic
regardless of whether the LP is maximization or feasible solution for the original problem.
minimization. · In this case, we drop all columns in the optimal Phase I
3. For now, ignore the original LP’s objective function. tableau that correspond to the artificial variables.
Instead solve an LP whose objective function is Min the · We now combine the original objective function with the
sum of all the artificial variables, regardless of whether constraints from the optimal Phase I tableau.
the LP is maximization or minimization.
· This yields the Phase II LP.
4. If the minimum value of the sum is positive, the LP
· The optimal solution to the Phase II LP is the optimal
problem has no feasible solution. Otherwise, proceed to
solution to the original LP
Phase II.
59 60
63 64
· Again, because the basic variables ݔ1 and ݔ2 have nonzero
coefficients in the z-row, they must be substituted out, using the
following operations
· New z-row = old z-row + (4 × ݔ1 -row + 1 × ݔ2 -row)
65 66
Two-Phase Method Two-Phase Method
· The initial tableau of Phase II is thus given as · Application of the simplex method will produce the optimal
solution in one iteration
Basic
ݔ1 ݔ2 ݔ3 ݔ4 RHS
variable
z 0 0 0 -1/5 17/5
67 68
· Unbounded solution
69 70
Degeneracy Degeneracy
· If you find more than one leaving variable (i.e.; we have · Example
two or more variables having the same ratio in the · Maximize = ݖ3ݔ1 + 9ݔ2
R.H.S) so one or more of the basic variable(s)will be
equal zero in the next iteration. · Subject to:
71 72
Degeneracy Degeneracy
· Looking at the graphical solution, three lines pass through the
optimum point (ݔ1 = 0, ݔ2 = 2). Because this is a two- dimensional
problem, the point is overdetermined, and one of the constraints is
redundant.
· Redundancy means that an associated constraint can be removed
· In iteration 0, ݔ3 and ݔ4 tie for the leaving variable, leading to
degeneracy in iteration 1 because the basic variable ݔ4 assumes a
zero value.
· The optimum is reached in one additional iteration.
73 74
Alternative Optima Alternative Optima
When the objective function is parallel to a binding constraint. So The iterations of the model are given by the following tableaus.
the objective function (Z) will have the same optimal value at more
than one solution point.
Iteration 1 gives the optimum solution at B (ݔ1 = 0, ݔ2 = 5/2, and = ݖ10).
The zero coefficient of non-basic ݔ1 indicates that ݔ1 can be made basic,
Any point on the line segment BC represents an alternative optimum altering the values of the basic variables without changing the value of ݖ.
The new solution point occurs at C (ݔ1 = 3, ݔ2 = 1, z = 10)
with the same objective value z = 10.
75 76
77 78
Unbounded Solution Non-Existing or Infeasible Solution
· If the constraints are not satisfied simultaneously, the
model has no feasible solution.
· This situation can never occur if all the constraints are of
the type <= (assuming nonnegative R.H.S constraints)
because the slacks provide a feasible solution.
· For other types of constraints, penalized artificial
variables are used to start the solution.
· If at least one artificial variable is positive in the
optimum iteration, then the LP has no feasible solution.
79 80