Vous êtes sur la page 1sur 59

Topic 3: The Simplex Method

• This topic details the Simplex method for solving


the general LP problem.
• The topic is covered in the textbook under
Sections 3.1 to 3.5.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
LP MODEL IN EQUATION FROM

• Th
The Simplex
Si l method th d puts
t ttwo requirements
i t on th the
constraints of the problem:
1. All constraints are equations (equal to) with
nonnegative right-hand side, except the
nonnegativity constraints
2. All tthe
e variables
a ab es a
are
e nonnegative
o egat e
• In (≤) constraints, the right-hand side can be
thought of as representing the limit on the
availability of a resource
resource, in which case the left-
hand side would represent the usage of this
limited resource by the activities (variables) of the
model.
model
• The difference between the right-hand side and
the left-hand side of the (≤) constraint yields the
unused d or slack
l k amountt off th
the resource.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• T
To convertt a (≤)
( ) iinequality
lit tto an equation,
ti a
nonnegative slack variable is added to the left-
hand side of the constraint:

6 x1 + 4 x2 ≤ 24 ⎯converted
⎯ ⎯⎯ to
→ 6 x1 + 4 x2 + s1 = 24, s1 ≥ 0

• A (≥) constraint
t i t sets
t a lower
l limit
li it on th
the activities
ti iti
of the LP model, so that the amount by which the
left-hand side exceeds the minimum limit
represents a surplus.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The conversion
i off a ((≥)) inequality
i lit tto an equation
ti iis
done by subtracting a nonnegative surplus
g
variable from the right-hand side:

x1 + x2 ≥ 800 ⎯converted
⎯ ⎯⎯ to
→ x1 + x2 − S1 = 800, S1 ≥ 0

• The nonnegativity of the right-hand site


requirement can be met by multiplying both sides
of the equation by -1:

− x1 + x2 ≤ −3 ⎯converted
⎯ ⎯⎯ to
→ − x1 + x2 + s1 = −3, s1 ≥ 0
⎯converted
⎯ ⎯⎯ to
→ x1 − x2 − s1 = 3, s1 ≥ 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• A
An unrestricted
t i t d variable
i bl can bbe replaced
l dbby th
the
difference of two positive variables:

x j = x −j − x +j

where xj is unrestricted variable and x-≥0 and x+≥0.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Take
T k this
thi LP model
d l
Maximize z = 2 x1 + 3 x2
subject to
2 x1 + x2 ≤ 4
x1 + 2 x2 ≤ 5
x1 , x2 ≥ 0

• The solution space is represented as


2 x1 + x2 + s1 = 4
x1 + 2 x2 + s2 = 5
x1 , x2 , s1 , s2 ≥ 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Thi
This system
t h m = 2 equations
has ti anddn=4
variables.
• In a set of m×n equations (m<n),
(m n), if n-m
n m variables
are set to zero and then the m equations are
solved for the remaining m variables, the resulting
solution is called a basic solution and must
correspond to a (feasible or infeasible) corner
point of the solution space.
• The corner points can be determined be setting n-
m = 4 – 2 = 2 variables to zero and solving for the
remaining m = 2 variables.
variables

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• S
Sett x1 = x2 = 0,
0 the
th equations
ti provide
id th
the unique
i
basic solution s1 = 4, s2 = 5.
• Set s1 = s2 = 0, the equations provide the unique
basic solution x1 = 1, x2 = 2.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• T
To gett the
th solution,
l ti we have
h tto check
h k allll th
the corner
points of the solution space.
• Simply consider all combinations in which n - m
variables are set to zero and solve the resulting
equations.
• Once
O done,
d the
h optimum
i solution
l i iis the
h ffeasible
ibl
basic solution (corner point) that yields the best
objective
j value.
• The n – m variables that set to zero are known as
nonbasic variables. The remaining m variables
are called basic variables
ariables and their sol
solution
tion
(obtained by solving the m equations) is referred
to as basic solution.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The corner points
i t as defined
d fi d bby th
the b
basic
i and
d
nonbasic variables are
Nonbasic 
N b i Associated 
A i t d
(zero)  Basic Basic  corner  Objective 
variables variables solution point Feasible? function
(x1, xx2) (s1, ss2) (4 5)
(4, 5) A Yes 0
(x1, s1) (x2, s2) (4, ‐3) F No ‐
(x1, s2) (x2, s1) (2.5, 1.5) B Yes 7.5
(x2, s1) (x1, s2) (2, 3) D Yes 4
(x2, s2) (x1, s1) (5, ‐6) E No ‐
(s1, s2) (x1, x2) (1, 2) C Yes 8 (optimum)

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
THE SIMPLEX METHOD

• R
Rather
th th
than enumeratingti allll th
the b
basic
i solutions
l ti
(corner points) of the LP problem, the Simplex
g
method investigates only
y a few of these solutions.
• Consider the LP model
Maximize z = 2 x1 + 3 x2
subject to
2 x1 + x2 + s1 = 4
x1 + 2 x2 + s2 = 5
x1 , x2 , s1 , s2 ≥ 0
• The Simplex method starts at the origin where x1 =
x2 = 0. At this starting point, the value of the
objective function, z, is zero.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The function
f ti shows
h that
th t an increase
i in
i either
ith x1 or
x2 (or both) above their current zero values will
p
improve the value of z.
• The Simplex method increase one variable at a
time, with the selected variable being the one with
the largest rate of improvement in zz.
• In the present example, the value of z will increase
byy 2 for each unit increase in x1 and byy 3 for each
unit increase in x2.
• This means that the rate of improvement in the
value
al e of z is 2 for x1 and 3 for x2.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• W
We thus
th choose
h tto increase
i x2, the
th variable
i bl with
ith
the largest rate of improvement.
• The value of x2 must be increased until corner
point B is reached.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• At point
i tB
B, th
the Si
Simplex
l method
th d will
ill th
then iincrease
the value of x1 to reach the improved comer point
p
C, which is the optimum.
• The path of the Simplex algorithm is thus defined
as A - B - C.
• The
Th Simplex
Si l method h d moves alongside
l id the
h edges
d
of the solution space.

Nonbasic (zero)
Corner point Basic variables
variables
A s1, s2 x1, x2
B s1, x2 x1, s2
C x1, x2 s1, s2

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
COMPUTATIONAL DETAILS OF THE SIMPLEX
ALGORITHM
• Take
T k this
thi LP model
d l expressed
d iin equation
ti fform

Maximize z = 5 x1 + 4 x2 + 0 s1 + 0 s2 + 0 s3 + 0 s4
subject to 6 x1 + 4 x2 + s1 = 24
x1 + 2 x2 + s2 =6
− x1 + x2 + s3 =1
x2 + s4 =2
x1 , x2 , s1 , s2 , s3 , s4 ≥ 0

• We can write the objective equation as


z − 5 x1 − 4 x2 = 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th starting
t ti Simplex
Si l ttableau
bl iis
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 ‐5 ‐4 0 0 0 0 0 z‐row
s1 0 6 4 1 0 0 0 24 s1‐row
s2 0 1 2 0 1 0 0 6 s2‐row
s3 0 ‐1 1 0 0 1 0 1 s3‐row
s4 0 0 1 0 0 0 1 2 s4‐row

• We can easily read the solution from the tableau:


z=0
s1 = 24 s2 = 6
s3 = 1 s4 = 2
The other variables are zero (nonbasic)

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• B
Because the
th Simplex
Si l ttableau
bl expresses th the
objective function as z – 5xl – 4x2 = 0, the entering
p
variable will correspond to the variable with the
most negative coefficient in the objective equation.
• This rule is referred to as the optimality
condition.
condition
• To determine the leaving variable from the Simplex
tableau,, we compute
p the nonnegative
g ratios of the
right-hand side of the equations (Solution column)
to the corresponding constraint coefficients under
the entering variable
variable.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• In
I the
th currentt example,
l the
th entering
t i variable
i bl iis x1:
Entering
Basic x1 Solution Ratio
s1 6 24 x1 = 24/6 = 4  (minimum)
s2 1 6 x1 = 6/1 = 6
s3 ‐1
1 1 x1 = 1/‐1 = ‐1  (ignore)
1/ 1 1 (ignore)
s4 0 2 x1 = 2/0 = ∞ (ignore)

• The minimum nonnegative ratio identifies the


current basic variable s1 as the leaving variable
and assigns the entering variable x1 the new value
of 4.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Take
T k the
th graphic
hi representation
t ti off th
the model:
d l

• The computed ratios are the intercepts of the


constraints with the entering variable x1 axis.
axis

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• W
We can see that
th t the
th value
l off x1 mustt be
b increased
i d
to 4 at corner point B, which is the smallest
g
nonnegative intercept
p with the x1-axis.
• An increase beyond B is infeasible.
• At point B, the current basic variable s1 associated
with
i h constraint
i 1 assumes a zero value l and d
becomes the leaving variable.
• The rule associated with the ratio computations is
referred to as the feasibility condition because it
guarantees the feasibility of the new solution.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The new solution
l ti point
i t B iis d
determined
t i db by
swapping the entering variable x1 and the leaving
variable s1 in the Simplex
p tableau to p produce the
following sets of nonbasic and basic variables:
Nonbasic (zero) variables at B: (s1, x2)
B i variables
Basic i bl at BB: ((x1, s2, s3, s4)

• The swapping process is based on the Gauss


Gauss-
Jordan row operations. It identifies the entering
variable column as the pivot column and the
leaving variable row as the pivot row. The
intersection of the pivot column and the pivot row
is called the p
pivot element.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th tableau
t bl illustrates
ill t t thi this:

enter

Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 ‐5 ‐4 0 0 0 0 0
leave s1 0 6 4 1 0 0 0 24
s2 0 1 2 0 1 0 0 6
s3 0 ‐1 1 0 0 1 0 1
s4 0 0 1 0 0 0 1 2

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th resulting
lti ttableau
bl iis
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 ‐2/3 5/6 0 0 0 20
x1 0 1 2/3 1/6 0 0 0 4
s2 0 0 4/3 ‐1/6 1 0 0 2
s3 0 0 5/3 1/6 0 1 0 5
s4 0 0 1 0 0 0 1 2

• The optimality condition shows that x2 is the


entering variable.
ariable

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th calculations
l l ti iinvolved
l d are
Entering
Basic x2 Solution Ratio
x1 2/3 4 x2 = 6
s2 4/3 2 x2 = 1.5  (minimum)
s3 5/3 5 x2 = 3
3
s4 1 2 x2 = 2

• Thus, s2 should leave the basic solution and new


of x2 is 1.5.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Aft
After carrying
i outt the
th row operations,
ti the
th resulting
lti
tableau is
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 0 ¾ ½ 0 0 21
x1 0 1 0 ¼ ‐1/2 0 0 3
x2 0 0 1 ‐1/8 ¾ 0 0 3/2
s3 0 0 0 3/8 ‐5/4 1 0 5/2
s4 0 0 0 1/8 ‐3/4 0 1 ½

• Based on the optimality condition, none of the z-


row coefficients associated with the nonbasic
variables, s1 and s2, are negative. Hence, the last
tableau is optimal.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• A resource is
i ddesignated
i t d as scarce if th
the activities
ti iti
(variables) of the model use the resource
p y Otherwise, the resource is abundant.
completely.
• This information can be read from the optimum
tableau by checking the value of the slack variable
associated with the constraint representing the
resource. If the slack value is zero , the resource is
used completely and , hence, is classified as
scarce. Otherwise, a positive slack indicates that
the resource is abundant.
Resource Slack value Status
Raw material M1 s1 = 0 Scares
Raw material M2 s2 = 0 Scares
Market limit
Market limit s3 = 5/2
5/2 Abundant
Demand limit s4 = 1/2 Abundant

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• N
Note:
t
In minimization problems, the optimality
condition calls for selecting the entering
variable as the nonbasic variable with the most
positive objective coefficient in the objective
equation the exact opposite rule of the
equation,
maximization case.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
STEPS OF THE SIMPLEX METHOD

• O
Optimality
ti lit condition.
diti Th entering
The t i variable
i bl iin a
maximization (minimization) problem is the
nonbasic variable having g the most negative
g
(positive) coefficient in the z-row, Ties are broken
arbitrarily. The optimum is reached at the iteration
where all the z-row coefficients of the nonbasic
variables are nonnegative (nonpositive).
• Feasibility condition. For both the maximization
and the minimization problems, the leaving
variable is the basic variable associated with the
smallest nonnegative ratio (with strictly positive
denominator). Ties are broken arbitrarily.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The steps
t off the
th Simplex
Si l method th d are:
Step 1. Determine a starting basic feasible
solution.
Step 2. Select an entering variable using the
optimality condition. Stop if there is no
entering
i variable;
i bl the
h llast solution
l i iis
optimal. Else, go to step 3.
Step 3.
3 Select a leaving variable using the
feasibility condition.
Step 4. Determine the new basic solution by
using the appropriate Gauss-Jordan row
operations. Go to step 2.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
ARTIFICIAL STARTING SOLUTION

• LP models
d l iinvolving
l i ((=)) and/or
d/ ((≥)) constraints
t i t
present difficulty in having all-slack starting
solution.
• The procedure for starting LPs with (=) and (≥)
constraints is to use artificial variables that play the
role of slacks at the first iteration (basic variables)
and then remove them (nonbasic variables) at a
later iteration.
• Two closely related methods
– the M-method
– the two-phase method

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
M-METHOD

• Th
The M-method
M th d starts
t t with
ith th
the LP iin equation
ti fform.
• If equation i does not have a slack, an artificial
variable Ri is added.
• The artificial variables are assigned very high
penalty in the objective function, forcing them to
zero in
i the
h optimum
i solution.
l i
• The coefficient of the artificial variable in the
objective function is
ƒ -M if maximizing
ƒ M if minimizing g

M is a very big number.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Take
T k this
thi LP
LP: minimize z = 4 x1 + x2
subject to 3 x1 + x2 = 3
4 x1 + 3 x2 ≥ 6
x1 + 2 x2 ≤ 4
x1 , x2 ≥ 0

• By adding slack and surplus variables, the LP can


be written in an equation form:
minimize z = 4 x1 + x2
subject to 3 x1 + x2 =3
4 x1 + 3 x2 − x3 =6
x1 + 2 x2 + x4 =4
x1 , x2 , x3 , x4 ≥ 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The first
fi t and
d secondd constraints
t i t ddo nott h
have slack
l k
variables.
• Thus, we add artificial variables R1 and R2 to the
constraints and penalize the artificial variables in
the objective function:
minimize z = 4 x1 + x2 + MR1 + MR2
subject to 3 x1 + x2 + R1 = 3
4 x1 + 3 x2 − x3 + R2 = 6
x1 + 2 x2 + x4 =4
x1 , x2 , x3 , x4 , R1 , R2 ≥ 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The starting
t ti basic
b i solution
l ti iis (R1, R2, x4)=(3,6,4).
) (3 6 4)
• The value of M should be larger than all the
coefficient in the objective function, like M = 100.
• The starting Simplex tableau is
Basic x1 x2 x3 R1 R2 x4 solution
z ‐4 ‐1 0 ‐100 ‐100 0 0
R1 3 1 0 1 0 0 3
R2 4 3 ‐1
1 0 1 0 6
x4 1 2 0 0 0 1 4

• Since R1 and R1 are currently


c rrentl basic variables,
ariables their
coefficients in the objective function row have to
be made zero.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Compute:
C t
new z-row = old z-row + (100×R1-row + 100×R2-row)
• The tableau becomes
Basic x1 x2 x3 R1 R2 x4 Solution
z 696 399 ‐100 0 0 0 900
R1 3 1 0 1 0 0 3
R2 4 3 ‐1 0 1 0 6
x4 1 2 0 0 0 1 4

• Now the Simplex method can be started

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The nonbasic
b i variable
i bl x1 has
h th the mostt positive
iti
coefficient in the z-row, it will be the entering
variable.
• The minimum ratio specifies R1 as the leaving
variable.
• The
Th tableau
bl b
becomes:

Basic x1 x2 x3 R1 R2 x4 solution
z 0 167 ‐100 ‐232 0 0 204
x1 1 1/3 0 1/3 0 0 1
R2 0 5/3 ‐1
1 ‐4/3
4/3 1 0 2
x4 0 5/3 0 ‐1/3 0 1 3

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The nonbasic
b i variable
i bl x2 should
h ld enter
t (h
(having
i ththe
most positive coefficient) and R2 is the leaving
variable ((minimum ratio).
)
• The tableau becomes
Basic  x1  x2  x3  R1  R2  x4  solution 

z  0       0         1/5  ‐98  2/5  ‐100  1/5  0       3  3/5 


x1  1       0           1/5    3/5  ‐  1/5  0         3/5 
x2  0
0       1
1         ‐  3/5 
3/5 ‐  4/5 
4/5   3/5 
3/5 0
0       1 1/5
1  1/5 
x4  0       0         1       1       ‐1       1       1      

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Th
The nonbasic
b i variable
i bl x3 should
h ld enter
t bbecause it
has the most positive coefficient.
• After computing the ratios, x4 should be the
leaving variable.
• The tableau becomes
Basic  x1  x2  x3  R1  R2  x4  solution 
z  0       0       0       ‐98  3/5  ‐100       ‐  1/5  3 2/5
x1  1       0         0         2/5  0       ‐  1/5    2/5 
x2  0       1         0       ‐  1/5  0         3/5  1  4/5 
x3 0       0         1       1       ‐1       1       1      

• The optimal tableau has been reached:


x1 = 2/5 x2 = 9/5 z = 17/5

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
Two-Phase Method

• Th
The method
th d solves
l th
the LP iin ttwo phases:
h
– Phase I attempts to find a starting basic
feasible solution,
– If one is found, Phase II is invoked to solve the
original problem.
• Summary of the Two-Phase Method:
1. Put the problem in equation form, and add the
necessary artificial variables to the
constraints Next,
constraints. Next find a basic solution of the
resulting equations that minimizes the sum of
the artificial variables. If the minimum value of
the ssum
m is positi
positive,
e the LP problem has no
feasible solution (terminate the process)
Otherwise. proceed to Phase II.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
2 U
2. Use ththe ffeasible
ibl solution
l ti ffrom Ph
Phase I as a
starting basic feasible solution for the original
p
problem.

• Take this LP
minimize z = 4 x1 + x2
subject to 3 x1 + x2 = 3
4 x1 + 3 x2 ≥ 6
x1 + 2 x2 ≤ 4
x1 , x2 ≥ 0

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• In
I Phase
Ph II, we h
have tto solve
l
minimize r = R1 + R2
subject to 3 x1 + x2 + R1 = 3
4 x1 + 3 x2 − x3 + R2 = 6
x1 + 2 x2 + x4 =4
x1 , x2 , x3 , x4 , R1 , R2 ≥ 0

• The starting tableau is


Basic x1 x2 x3 R1 R2 x4 Solution
r 0 0 0 ‐1 ‐1 0 0
R1 3 1 0 1 0 0 3
R2 4 3 ‐1 0 1 0 6
x4 1 2 0 0 0 1 4

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• M
Make
k the
th coefficient
ffi i t off the
th basic
b i variables
i bl iin th
the r-
row equal to zero:
Basic
Basic  x1  x2  x3  R1  R2  x4  Solution
Solution 
r  7     4     ‐1     0     0     0     9    
R1  3     1     0     1     0     0     3    
R2  4     3     ‐1     0     1     0     6    
x4  1     2     0     0     0     1     4    

• x1 enters and R1 leaves:


Basic  x1  x2  x3  R1  R2  x4  Solution 
r  0     1 2/3
0 1 2/3 ‐1    
1 ‐2 1/3
2 1/3 0    
0 0    
0 2    
2
x1  1      1/3 0      1/3 0     0     1    
R2  0     1 2/3 ‐1     ‐1 1/3 1     0     2    
x4  0     1 2/3 0     ‐ 1/3 0     1     3    

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• x2 enters
t and
d R2 leaves:
l
Basic  x1  x2  x3  R1  R2  x4  Solution 
rr  0    
0 0     0    
0 0 ‐1    
1 ‐1    
1 0    
0 0    
0
x1  1     0      1/5  3/5 ‐ 1/5 0      3/5
x2  0     1     ‐ 3/5 ‐ 4/5  3/5 0     1 1/5
x4  0
0     0
0     1
1     1
1     ‐1    
1 1
1     1
1    

Since r = 0, the optimal solution has been found and


this concludes Phase I.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• IIn Phase
Ph II,
II we start
t t with
ith the
th last
l t tableau
t bl from
f
Phase I, but we remove the artificial columns and
put the z-row:
p
Basic  x1  x2  x3  x4  Solution 

z ‐4
4     ‐1
1     0    
0 0    
0 0    
0
x1  1     0      1/5 0      3/5
x2  0     1     ‐ 3/5 0     1 1/5
x4  0
0     0
0     1
1     1
1     1
1    

• x1 and x2 are basic variables


variables, their coefficients in
the z-row have to be zero.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th tableau
t bl b
becomes:
Basic  x1  x2  x3  x4  Solution 
z 0    
0 0     1/5
0 0    
0 3 3/5
3 3/5
x1  1     0      1/5 0      3/5
x2  0     1     ‐ 3/5 0     1 1/5
x4  0
0     0
0     1
1     1
1     1
1    

• Since we are minimizing, the solution can be


improved if x3 becomes basic (greater than zero).
• Using the ratio, x4 should be the leaving variable.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• The
Th tableau
t bl b
becomes:
Basic  x1  x2  x3  x4  Solution 
z 0    
0 0    
0 0     ‐ 1/5
0 1/5 3 2/5
3 2/5
x1  1     0     0     ‐ 1/5  2/5
x2  0     1     0      3/5 1 4/5
x3  0
0     0
0     1
1     1
1     1
1    

• Since the coefficients in the z-row are ≤ 0, Phase II


is complete and the solution is optimal.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• N
Note:
t
The artificial variables and their columns are
removed at the end of Phase I only when they are
all nonbasic. If one or more artificial variables are
basic (at zero level) at the end of Phase I, then
the following additional steps must be undertaken
to remove them prior to the start of Phase II.
1. Select a zero artificial variable to leave the
basic solution and designate its row as the
pivot row. The entering variable can be any
nonbasic (non artificial) variable with a
nonzero (positive or negative ) coefficient in
the pivot row. Perform the associated Simplex
it ti
iteration.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
2 R
2. Remove th the column
l off th
the jjust-leaving
tl i
artificial variable from the tableau. If all the
zero artificial variables have been removed,
go to Phase II. Otherwise, go back to Step 1.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
SPECIAL CASES IN THE SIMPLEX METHOD

1 D
1. Degeneracy
– Take this LP
maximize z = 3x1 + 9 x2
subject to x1 + 4 x2 ≤ 8
x1 + 2 x2 ≤ 4
x1 , x2 ≥ 0

– After adding the slack variables, the starting


tableau is
Basic  x1  x2  x3  x4  Solution 
z ‐3
3 ‐9
9 0 0 0
x3  1 4 1 0 8
x4  1 2 0 1 4

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
– x2 enters
t and
d either
ith x3 or x4 (tie)
(ti ) lleaves:
Basic  x1  x2  x3  x4  Solution 
z ‐ 3/4
3/4 0
0     2 1/4
2 1/4 0
0     18
18    
x2  1/4 1      1/4 0     2    
x4   1/2 0     ‐ 1/2 1     0    

– x1 enters and x4 leaves:


Same 
Basic  x1 1 x2 2 x3 3 x4 4 Solution  solution
z 0     0     1 1/2 1 1/2 18    
x2 0     1      1/2 ‐ 1/2 2    
x1 1     0     ‐1     2     0    

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
– IIn the
th first
fi t iteration,
it ti x3 and
d x4 tie
ti for
f the
th leaving
l i
variable, leading to degeneracy in the following
iteration ((x4 = 0).
)
– The graph of the feasible solution is shown

– Degeneracy means one of the constraints is


redundant.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• Alt
Alternative
ti O Optima
ti
– Consider the LP
maximize z = 2 x1 + 4 x2
subject to x1 + 2 x2 ≤ 5
x1 + x2 ≤ 4
x1 , x2 ≥ 0

– After adding slack variables, the starting


tableau is
Basic  x1  x2  x3  x4  Solution 
z ‐2 ‐4 0 0 0
x3  1 2 1 0 5
x4  1 1 0 1 4

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
– x2 enters
t and
d x3 leaves:
l

Basic  x1  x2  x3  x4  Solution 


z 0     0     2     0     10    
x2  1/2 1      1/2 0     2 1/2
x4   1/2 0     ‐ 1/2 1     1 1/2

– Make x1 substitute x4:

Basic 
B i x1  x2  x3  x4  S l ti
Solution 
z 0     0     2     0     10    
x2 0     1     1     ‐1     1    
x1 1
1     0
0     ‐1    
1 2
2     3
3    

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
–NNotice
ti ththere was no change
h iin th
the value
l off z
when x1 entered the basic solution.
– The feasible region is illustrated below.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
–BBoth
th corner points
i t B and d C are optimal
ti l (h
(having
i
the same objective value).
– Any point between them is also optimal.
– We call them alternative optima.
– The first constraint is parallel to the objective
function.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• U
Unbounded
b d d solution
l ti
– Take this LP
maximize z = 2 x1 + x2
subject to x1 − x2 ≤ 10
2 x1 ≤ 40
x1 , x2 ≥ 0
– The starting tableau is
Basic  x1  x2  x3  x4  Solution 
z ‐2 ‐1 0 0 0
x3  1 ‐1 1 0 10
x4  2 0 0 1 40

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
–BBoth
th x1 and
d x2 can be
b iincreased,d resulting
lti iin an
improved value for z.
– By choose x2 as the entering variable and
carrying the minimum ratio, we find none of the
basic variables (x3 and x4) will be the leaving
variables since the ratios are -10
variables, 10 and 40/0
(negative and infinity).
– Therefore,, x2 can be increased indefinitelyy
without violating any of the constraints.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
• IInfeasible
f ibl solution
l ti
– Take this LP maximize z = 3x1 + 2 x2
bj to
subject 2 x1 + x2 ≤ 2
3x1 + 4 x2 ≥ 12
x1 , x2 ≥ 0

– Setting M = 100 and using the M method, the


tableau becomes:
Basic  x1  x2  x4  x3  R Solution 
z  ‐303 ‐402 100 0 0 ‐1200
x3  2 1 0 1 0 2
R 3 4 ‐1 0 1 12

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM
– x2 enters
t and
d x3 leaves:
l
Basic  x1  x2  x4  x3  R Solution 
z
z  501 0 100 402 0 ‐396
396
x2 2 1 0 1 0 2
R ‐5 0 ‐1 ‐4 1 4

– The optimality condition says that this tableau is


optimal (all the coefficients in the z-row ≥ 0).
– But R > 0 (artificial variable ≥ 0).
– Hence, there is no
solution for
this problem.

Dr Muhammad Al‐Salamah, Industrial Engineering, KFUPM

Vous aimerez peut-être aussi