0% found this document useful (0 votes)
41 views

Simplex method-2

The document discusses methods for finding an artificial starting solution in linear programming, particularly when constraints include equality or greater-than-or-equal-to conditions. It outlines two primary methods: the Big M method and the Two-Phase method, detailing their procedures and examples. Additionally, it addresses special cases such as degeneracy, alternative optima, unbounded solutions, and infeasible solutions.

Uploaded by

Hassan Dader
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Simplex method-2

The document discusses methods for finding an artificial starting solution in linear programming, particularly when constraints include equality or greater-than-or-equal-to conditions. It outlines two primary methods: the Big M method and the Two-Phase method, detailing their procedures and examples. Additionally, it addresses special cases such as degeneracy, alternative optima, unbounded solutions, and infeasible solutions.

Uploaded by

Hassan Dader
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Artificial Starting Solution Artificial Starting Solution

· The simplex method algorithm requires a starting BFS · Maximize


· LPs in which all the constraints are (≤) with nonnegative
z = 3‫ݔ‬1+ 2‫ݔ‬2
right-hand sides offer a starting BFS by using the slack
· Subject to
variables as basic variables
· Does not work if an LP have = and/or ³ constraints. 2‫ݔ‬1 + ‫ݔ‬2 ≤ 9
· Example: ‫ݔ‬1 + 2‫ݔ‬2 ≥ 9
· Maximize ‫ݔ‬1, ‫ݔ‬2 ≥ 0
z = 3‫ݔ‬1+ 2‫ݔ‬2
· Subject to
2‫ݔ‬1 + ‫ݔ‬2 ≤ 9
‫ݔ‬1 + 2‫ݔ‬2 ≥ 9
‫ݔ‬1, ‫ݔ‬2 ≥ 0
47 48

Artificial Starting Solution Big M Method

· 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

Big M Method Big M Method


· Step 2: Initial tableau · To correct this violation before starting the simplex algorithm,
· Using M = 100, the starting simplex tableau is shown the elementary row operations are used as follows:
· New (z row) = old (z row) + (100 × R1-row + 100 × R2-row)
· The modified tableau thus becomes

· Note that one of the simplex rules is violated, which is the


basic variables R1, and R2 have a non zero coefficients · There is a positive value in the top row, this solution is not optimal
in the z row; therefore, this violation must be corrected before · The entering variable is x1 (has the most positive value in z-row)
proceeding in the simplex algorithm as follows: · The leaving variable is R1 (it has the smallest ratio)
53 54
Big M Method Big M Method
· Second iteration
· First iteration

Basic
‫ݔ‬1 ‫ݔ‬2 ‫ݔ‬3 R1 R2 ‫ݔ‬4 RHS
variable

z 0 0 1/5 -98.4 -100.2 0 18/5

‫ݔ‬1 1 0 1/5 3/5 1/5 0 3/5

‫ݔ‬2 0 1 -3/5 -4/5 3/5 0 6/5

‫ݔ‬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

Big M Method Two-Phase Method


· Third iteration
· The two-phase method eliminates the use of the
constant M.
Basic
‫ݔ‬1 ‫ݔ‬2 ‫ݔ‬3 R1 R2 ‫ݔ‬4 RHS
variable · The method solves the LP in two phases:

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

Two-Phase Method Two-Phase Method


· Example · Phase I Iteration 0
· Minimize z = 4‫ݔ‬1 + ‫ݔ‬2
· Subject to: 3‫ݔ‬1 + ‫ݔ‬2 = 3
4‫ݔ‬1 + 3‫ݔ‬2 ³ 6
‫ݔ‬1 + 2‫ݔ‬2 ≤ 4
‫ݔ‬1, ‫ݔ‬2 ³ 0
· Phase I
· Minimize ‫ܴ = ݎ‬1+ ܴ2 ,
· Initial basic solution (R1, R2, x4) = (3, 6, 4)
· Subject to: 3‫ݔ‬1 + ‫ݔ‬2 + ܴ1 =3
· r = 0 is not match to basic solution value. (r should = 9)
4‫ݔ‬1 + 3‫ݔ‬2 – ‫ݔ‬3 + ܴ2 =6
· As basic variables, coefficients of R1 and R2 in r row should = 0
‫ݔ‬1 + 2‫ݔ‬2 + ‫ݔ‬4 =4
· New r-row = old r-row + (1 × R1-row+ 1 × R2-row)
‫ݔ‬1, x2 , ‫ݔ‬3, ‫ݔ‬4, ܴ1, ܴ2 ³ 0
61 62
Two-Phase Method Two-Phase Method
· The modified tableau becomes

· Because minimum r = 0, Phase I produces the basic feasible


The new r-row is used to solve Phase I of the problem, which yields solution (‫ݔ‬1, ‫ݔ‬2, ‫ݔ‬4) = (3/5, 6/5, 1)
the following optimum tableau · We can eliminate the artificial variables columns from the tableau
and move on to Phase II

63 64

Two-Phase Method Two-Phase Method


· Phase II
· After deleting the artificial columns and putting the
original objective function coefficients, we get the
following tableau

· 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

‫ݔ‬1 1 0 0 -1/5 2/5

‫ݔ‬2 0 1 0 -3/5 9/5


· Because we are minimizing, ‫ݔ‬3 must enter the solution and
‫ݔ‬4 leaves. ‫ݔ‬3 0 0 1 1 1

67 68

Two-Phase Method Special cases of linear programming


· N.B. The removal of the artificial variables and their columns at · Degeneracy (Degenerated solution)
the end of Phase I can take place only when they are all nonbasic
· If one or more artificial variables are basic (at zero level) at the
end of Phase I, then their removal requires the following
additional steps. · Multiple solution (infinitely many solution)

· Unbounded solution

· Non-existing or Infeasible 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:

· The new solution is said to be degenerate. ‫ݔ‬1 + 4‫ݔ‬2 ≤ 8


· This condition indicates that the model has at least one ‫ݔ‬1 + 2‫ݔ‬2 ≤ 4
redundant constraint. ‫ݔ‬1 , ‫ݔ‬2 ³ 0
· Degeneracy may lead to cycling · Using the slack variables ‫ݔ‬3 and ‫ݔ‬4, the solution tableaus
are:

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

Unbounded Solution Unbounded Solution (No Leaving Variable)


· The objective function (z) can be increased indefinitely without Both ‫ݔ‬1 and ‫ݔ‬2 are candidates for entering the solution. But all the
violating any of the constraints i.e.; the solution space is constraint coefficient under ‫ݔ‬2 are negative or zero, meaning that ‫ݔ‬2
unbounded in at least one direction. can be increased indefinitely without violating any of the
constraints. Any increase in ‫ݔ‬2 will increase z so it can be increased
∞ as ‫ݔ‬2 → ∞. Thus the problem has no bounded solution.
· Example

· Maximize ‫ = ݖ‬2‫ݔ‬1+ ‫ݔ‬2


· S.T
‫ݔ‬1− ‫ݔ‬2 <= 10
2 ‫ݔ‬1 <= 40
‫ݔ‬1, ‫ݔ‬2 >=0

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

Non-Existing or Infeasible Solution Non-Existing or Infeasible Solution


· Example Using the penalty M = 100 for the artificial variable R, the following
tableau provide the simplex iterations of the model.
· Maximize
z = 3‫ݔ‬1 +2 ‫ݔ‬2
· S.T
2‫ݔ‬1 + ‫ݔ‬2 <= 2
3‫ݔ‬1 + 4‫ݔ‬2 >= 12
‫ݔ‬1, ‫ݔ‬2 >= 0.

Optimum iteration 1 shows that the artificial variable R is positive


(=4) meaning that the LP is infeasible.
81 82

You might also like