Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

m in P  c T x

Summary su b jec t to A x  b ,
x, b  0.
 Initialization: Select a basic feasible solution
xB  bˆ  B 1b  0, with B the basis matrix.

 Optimality Test: The current basis is optimal, if

cˆTN  cTN  (cBT B 1 )T N  0.


Reduced costs

Otherwise, select a variable

xt that satisfies cˆt  0 as the entering variable.


@2020 New York University Tandon
2/11/2020 85
School of Engineering
 Recursive Step: Compute Aˆt  B 1 At .
Find an index s (determining the leaving variable,
s‐th. basic variable in B) such that:

bˆs  bˆ 
 m in  i aˆ i , t  0
aˆ s , t 1 i  m  aˆ i , t 

 The Pivot: From the “pivot entry” aˆs ,t , update the


basis matrix B and the vector of basis variables xB .
GO BACK TO STEP 2.

@2020 New York University Tandon


2/11/2020 86
School of Engineering
An Exercise
min P   x1  2 x2
subject to  2 x1  x2  x3 2
 x1  2 x2  x4 7
x1  x5  3
x1 , x2 , x3 , x4 , x5  0.

In compact notation:
min P  cT x, subject to: Ax  b, x  0, b  0.
@2020 New York University Tandon
2/11/2020 87
School of Engineering
Check the sign of reduced cost at each step
Answer cˆTN  cTN  (cBT B1 )T N . If all  0, then STOP.

Step 1:
xB   x3 , x4 , x5  , xN   x1 , x2 
T T

c B   0, 0, 0  , c N   1,  2 
T T

Step 2:
xB   x2 , x4 , x5  , xN   x1 , x3 
T T

c B   2, 0, 0  , c N   1, 0 
T T

@2020 New York University Tandon


2/11/2020 88
School of Engineering
Step 3: xB   x2 , x1 , x5  , xN   x3 , x4 
T T

c B   2,  1, 0  , c N   0, 0 
T T

Step 4: xB   x2 , x1 , x3  , xN   x4 , x5 
T T

c B   2,  1, 0  , c N   0, 0 
T T

Optimal, because

 
T
1
cˆ  c N  c B B
T
N
T T
N  (1, 2)  0.
@2020 New York University Tandon
2/11/2020 89
School of Engineering
The Simplex Tableau
Initial tableau:

Basic xB xN rhs
T T
-P c B c N
0
xB B N b Next,
Basic xB xN rhs
1 1
-P 0 c  c B N c B b
T
N
T
B
T
B
xB I B N 1
B b 1

@2020 New York University Tandon


2/11/2020 90
School of Engineering
The Simplex Tableau
For illustration purpose, study the same example.

Basic x1 x2 x4 x5 rhs
x3
-P -1 -2 0 0 0 0

x3 -2 1 1 0 0 2
x4 -1 2 0 1 0 7
x5 1 0 0 0 1 3

@2020 New York University Tandon


2/11/2020 91
School of Engineering
Use the rule to select bˆs  bˆi 
 min  aˆi ,t  0 
the pivot entry aˆ s ,t 1i  m  aˆi ,t 
s=3, t=2:

Basic x1 x2 x4 x5 rhs
x3
-P -1 -2 0 0 0 0

x3 -2 1 1 0 0 2
x4 -1 2 0 1 0 7
x5 1 0 0 0 1 3

@2020 New York University Tandon


2/11/2020 92
School of Engineering
Add 2 times the x3 row to the –P row and subtract
2 times the x3 row from the x4 row:

Basic x1 x2 x4 x5 rhs
x3
-P -5 0 2 0 0 4

x2 -2 1 1 0 0 2
x4 3 0 -2 1 0 3
x5 1 0 0 0 1 3

@2020 New York University Tandon


2/11/2020 93
School of Engineering
Basic x1 x2 x4 x5 rhs
x3
-P 0 0 -4/3 5/3 0 9

x2 0 1 -1/3 2/3 0 4
x1 1 0 -2/3 1/3 0 1
x5 0 0 2/3 -1/3 1 2

@2020 New York University Tandon


2/11/2020 94
School of Engineering
Final Step (Optimal solution):

Basic rhs
x1 x2 x3 x4 x5
-P 0 0 0 1 2 13

x2 0 1 0 1/2 1/2 5
x1 1 0 0 0 1 3
x3 0 0 1 -1/2 3/2 3

@2020 New York University Tandon


2/11/2020 95
School of Engineering
Final Step (Optimal solution):

Basic rhs
x1 x2 x3 x4 x5
-P 0 0 0 1 2 13

x2 0 1 0 1/2 1/2 5
x1 1 0 0 0 1 3
x3 0 0 1 -1/2 3/2 3

   
P   13, at x  x  3, x  5.
1 3 2
@2020 New York University Tandon
2/11/2020 96
School of Engineering
An Exercise
Solve the minimization problem:

min P   3 x1  x2  3 x3
subject to 2 x1  x2  x3  2
x1  2 x2  3x3  5
2 x1  2 x2  x3  6
x1  0, x2  0, x3  0.
@2020 New York University Tandon
2/11/2020 97
School of Engineering
Answer
First tableau (pivoting 1 leads to less computation):

x1 x2 x3 x4 x5 x6 rhs

-P -3 -1 -3 0 0 0 0

2 1 1 1 0 0 2

1 2 3 0 1 0 5

2 2 1 0 0 1 6

@2020 New York University Tandon


2/11/2020 98
School of Engineering
Answer (cont’d)
Second tableau:

x1 x2 x3 x4 x5 x6 rhs

-P -1 0 -2 1 0 0 2

2 1 1 1 0 0 2

-3 0 1 -2 1 0 1

-2 0 -1 -2 0 1 2

@2020 New York University Tandon


2/11/2020 99
School of Engineering
Answer (cont’d)
Third tableau:

x1 x2 x3 x4 x5 x6 rhs

-P -7 0 0 -3 2 0 4

5 1 0 3 -1 0 1

-3 0 1 -2 1 0 1

-5 0 0 -4 1 1 3

@2020 New York University Tandon


2/11/2020 100
School of Engineering
Answer (cont’d)
Fourth tableau:

x1 x2 x3 x4 x5 x6 rhs

-P 0 7/5 0 6/5 3/5 0 27/5

1 1/5 0 3/5 -1/5 0 1/5

0 3/5 1 -1/5 2/5 0 8/5

0 1 0 -1 0 1 4

@2020 New York University Tandon


2/11/2020 101
School of Engineering
Answer (cont’d)
Optimal solution, read from the last tableau:

1 * 8 *
x  , x2  0, x3  , x4  0, x5*  0, x6*  4.
*
1
*

5 5
27
P  .
*

@2020 New York University Tandon


2/11/2020 102
School of Engineering
Artificial Variables
Goal: Find an (initial) basic feasible solution for the
standard LP Problem:

min P  c x T

subject to Ax  b,
x  0.
@2020 New York University Tandon
2/11/2020 103
School of Engineering
The Two‐Phase Method
The phase-I problem:
min P   ai
i

subject to Ax  a  b,
x, a  0,
a   a1 , , am  : artificial variables
T

A direct application of the simplex method yields


a basic feasible solution (not optimal)
for the original P !!
@2020 New York University Tandon
2/11/2020 104
School of Engineering
An Example
min P  2 x1  3 x2
subject to 3x1  2 x2  14
2x1  4 x2  2
4x1  3 x2  19
x1 , x2  0.

@2020 New York University Tandon


2/11/2020 105
School of Engineering
An Example (cont’d)
min P  2 x1  3 x2
subject to 3x1  2 x2  14
2x1  4 x2  x3 2
4x1  3 x2  x4  19
x1 , x2 , x3 , x4  0.

No obvious basic feasible solution, due


to less than (three) slack variables.
@2020 New York University Tandon
2/11/2020 106
School of Engineering
Phase‐1 Problem:

min P  a1  a2
subject to 3x1  2 x2  a1  14
2x1  4 x2  x3  a2 2
4x1  3 x2  x4  19
x1 , x2 , x3 , x4 , a1 , a2  0.
Now the (initial) basic feasible variable
xB   a1 , a2 , x4  with values 14, 2, 19  .
T T

@2020 New York University Tandon


2/11/2020 107
School of Engineering
Applying the simplex technique,

Initial tableau:

x1 x2 x3 x4 a1 a2 rhs

 P 0 0 0 0 1 1 0

3 2 0 0 1 0 14

2 -4 -1 0 0 1 2

4 3 0 1 0 0 19

@2020 New York University Tandon


2/11/2020 108
School of Engineering
(Use elimination to the first row to make the
entries for the initial basic variables 0.)
First tableau:

x1 x2 x3 x4 a1 a2 rhs

-5 2 1 0 0 0 -16
 P
3 2 0 0 1 0 14

2 -4 -1 0 0 1 2

4 3 0 1 0 0 19

@2020 New York University Tandon


2/11/2020 109
School of Engineering
(The basic variable a2 leaving, so delete the
irrelevant a2 column:)
Second tableau:

x1 x2 x3 x4 a1 rhs

 P 0 -8 -3/2 0 0 -11

0 8 3/2 0 1 11

1 -2 -1/2 0 0 1

0 11 2 1 0 15

@2020 New York University Tandon


2/11/2020 110
School of Engineering
(The basic variable x4 leaving, but cannot
delete the relevant x4 column:)
Third tableau:

x1 x2 x3 x4 a1 rhs

 P 0 0 -1/22 8/11 0 -1/11

0 0 1/22 -8/11 1 1/11

1 0 -3/22 2/11 0 41/11

0 1 2/11 1/11 0 15/11

@2020 New York University Tandon


2/11/2020 111
School of Engineering
(The basic variable a1 leaving, so delete the
irrelevant a1 column:)
Third tableau:

x1 x2 x3 x4 rhs

 P 0 0 0 0 0

0 0 1 -16 2

1 0 0 -2 4

0 1 0 3 1

@2020 New York University Tandon


2/11/2020 112
School of Engineering
Phase–II Problem: P=2x1 + 3x2

Initial tableau:

x1 x2 x3 x4 rhs

-P 2 3 0 0 0

0 0 1 -16 2

1 0 0 -2 4

0 1 0 3 1

@2020 New York University Tandon


2/11/2020 113
School of Engineering
Phase–II Problem: P=2x1 + 3x2
First tableau (Use elimination to the first row to make
the entries for the initial basic variables 0):

x1 x2 x3 x4 rhs

-P 0 0 0 -5 -11

0 0 1 -16 2

1 0 0 -2 4

0 1 0 3 1

@2020 New York University Tandon


2/11/2020 114
School of Engineering
Phase–II Problem: P=2x1 + 3x2

Second tableau:

x1 x2 x3 x4 rhs

-P 0 5/3 0 0 -28/3

0 16/3 1 0 22/3

1 2/3 0 0 14/3

0 1/3 0 1 1/3

@2020 New York University Tandon


2/11/2020 115
School of Engineering
So, the optimal solution is
28 28
 P   , or P 
* *

3 3
which is attained at the following minimizer:
14 22 1
x  , x2  0, x3  , x4  .
*
1
* * *

3 3 3

@2020 New York University Tandon


2/11/2020 116
School of Engineering
An Exercise

min P  4 x1  x2  x3
subject to 2x1  x2  2 x3  4
3 x1  3 x2  x3  3
xi  0, i  1, 2,3

@2020 New York University Tandon


2/11/2020 117
School of Engineering
Degeneracy
A linear program is degenerate, if a basic
variable equals zero, i.e., the last column b
contains a zero.

@2020 New York University Tandon


2/11/2020 118
School of Engineering
Cycling
In case of degeneracy, it may happen that
 bˆ  bˆ
xt  min  i aˆi ,t  0   s  0
1i  m  ˆ
a i , t 
 ˆ
a s ,t

Then, the performance function does not improve:


P  Pˆ  cˆ x  Pˆ
t t

eventually leading to the cycling problem,


i.e., the (leaving) basic variable xs will be
re-chosen as the entering variable in a few steps.
@2020 New York University Tandon
2/11/2020 119
School of Engineering
A Degenerate LP Problem
For the following LP problem, the simplex method
cycles indefinitely!
3 1
min P   x1  150 x2  x3  6 x4
4 50
1 1
subject to x1  60 x2  x3  9 x4  0
4 25
1 1
x1  90 x2  x3  3 x4  0
2 50
x3 1
xi  0, 1  i  4.
@2020 New York University Tandon
2/11/2020 120
School of Engineering
Bland’s Rule
Goal: to avoid cycling. Make the following changes in
the simplex method,
a) select the lowest‐indexed favorable column to enter
the basis, using the rule:

j  min  j : cˆ j  0 .

b) In case of ties or undecision, select the lowest


indexed column to leave the basis.

@2020 New York University Tandon


2/11/2020 121
School of Engineering
The Perturbation Method
This is another efficient method to avoid cycling or
minimize computation time.

The simplex method will surely terminate if applied to


the LP with perturbed constraints:
Ax  b  
where, for sufficiently small 0  0,

   0 ,  , , 
2
0
m
0 
@2020 New York University Tandon
2/11/2020 122
School of Engineering

You might also like