Simplex
Simplex
e e rin
in
Solution Techniques Eng
s
y s tem L e ón
S
Dr. M. Angélica Salazar inA. / Dr. VincentuA. evL.o Boyer
ra m e N
r o gProgram a d (PISIS)
P
Graduate
m
in Systems Engineering
u a te Facultad u t ó o de Nuevo
de Ingenierı́anMecánica y Eléctrica
ra d Universidad Autónoma
dA
León
G
rs ida
ive
Un
g
e e rin
n
Engi
t ems ón
1 Simplex Method Sy s L e
in o
uev
g ram e N
Pr o m ad
u a te ut óno
d A
Gra i d ad
rs
n ive
U
Agenda
g
e e rin
n
Engi
t ems ón
1 Simplex Method Sy s L e
in o
uev
g ram e N
Pr o m ad
u a te ut óno
d A
Gra i d ad
rs
n ive
U
g
Step 1. Convert the LP to standard form
e e rin
n
E ngi
ms
Step 2. Build the initial tableau
s t e e ón
S y o L
in feasible solution
Step 3. Determine whether the current uevis optimal
m N
r o gra ad
e
Step 4. Identifyte
P o m
u a the entering and the
u t ónleaving variables
d A
Gra i ad d
ers operation, then go to Step 3.
Step 5. Do the pivoting
iv
Un
Original problem g
e e rin
Max z = 500t + 300c i n
s.t. 2t + c 40g
≤En
t + 2cems≤ 50
st0
t ≥ 0, Scy≥ L eón
in o
m N uev
Standard form
r o gra ad
e
All constraints are P
e equations and the nrhsm
o and all variables are nonnegative.
u a t u t ó
We add ford each constraint d≤ Aa slack variable si .
Gra for each constraint
We subtract
sid
a ≥ a surplus (excess) variable ei .
Max ziv=er 500t + 300c
Un
s.t. 2t + c + s1 = 40
t + 2c + s2 = 50
t ≥ 0, c ≥ 0, s1 ≥ 0, s2 ≥ 0
g
Consider the standard form
e e rin
Max z = 500t + 300c gi n
s.t. 2t + c + s1 s En = 40
t + 2c
y s tem + s2 = L50
e ón
t ≥ 0, c ≥ 0, S
s1 ≥ 0, s2 ≥ 0 o
in uev
m N
gra to the row 0aformat:
Convert the objective function
r o de z − 500t − 300c = 0
P m
Initial tableauate
u ut óno
d A c s s rhs
Gra B.V. atd
sid
1 2
i vse1r 2 1 1 0 40
Un s2 1 2 0 1 50
z −500 −300 0 0 0
The leaving variable is the winner of the ratio test. Hence, it is the gone with
rhs of row e r in
the minimum value of
ne
coefficient of entering variable in irow
g
Choosing the leaving variable s En
m
L eón
Sy ste
B.V. t c
o
s1in s2 rhs
ratio uev
m N
a 1 0 40 d40e → Output
s1 2 ogr1
P r m a 502
s 2 te 1 2 o
0 ó1n 50 1
d u a −500 −300 u t
r a z
d A 0 0
0
G ↑ rsid
a
iv e
UnInput
The denominator in the ratio should be strictly positive (> 0). Otherwise,
you cannot compute it.
Dr. M. Angélica Salazar A. / Dr. Vincent A. L. Boyer (PISIS-FIME)
Solution Techniques 6 / 16
Simplex Method
g
e e rin
n
ngi
5.1 Update the row of the entering variable
m sE
te element of theLerow
Replace basic variable s1 by t and divide seach
y ónby the
n Sby 2).
pivote of the row (in this case, divide
ue vo
i
am N
P r ogr
m a de
B.V. t c s1 s2 rhs
B.V.
s1
t
ec s11 s02 rhs
2uat 1 40 utó
no t 1 1/2 1/2 0 20
s2 rad1 A →
2 0 1d 50 s2
G
z
a
−500 −300 rs0id 0 0 z
n ive
U
d u ate utón
In caserof
G d d Acoefficient in row z is negative, the current
a maximization: Ifaany
i
feasible solution is not soptimal.
iv er
Un
In case of minimization: If any coefficient in row z is positive, the current
feasible solution is not optimal.
The leaving variable is the winner of the ratio test. Hence, it is the g
rhs of row e r i n one with
the minimum value of
ne
coefficient of entering variable in irow
g
Choosing the leaving variable s En
m
L eón
Sy ste
B.V. t c s1 ratio uev
osi2n rhs
t 1 1/2 g1/2
m
ra 0 20 d20/ N
e 12
r o a
P −1/2 1 no30m 30/ 32 → Output
s2 0 e 3/2
a t ó
zdu 0 −50 250 Au0t 10, 000
Gr a d
↑ rsida
n ive
Input
U
The denominator in the ratio should be strictly positive (> 0). Otherwise,
you cannot compute it.
g
e e rin
gi n
5.1 Update the row of the entering variable s En
temelement of theLerow
Replace basic variable s2 by c and divideseach
y ón by the
n Sby 3/2).
pivote of the row (in this case, divide vo
i e
am Nu
B.V. t c s1Pr s2 rhs
ogr m
d e
aB.V.
t e ó n o t c s1 s2 rhs
t 1 u a
d 1/2 1/2 0 d30 20 ut t
s2 ra0 3/2 −1/2 1 A →
−1/3 2/3
G a c 0 1 20
z 0 −50 250 rs0id 10, 000 z
n ive
U
g
e e rin
gin
5.1 Update the remaining rows
s En
temthe remainingLerows.
Use the row of the entering variable to update
y s ón
nS
To update row z we must do the following:
[Old row z] − (pivotmin iOld row z) × [new evorow c]
upivot
N
ra × [0 1 − 13 23de20] = [0 0 700
[0 − 50 250 0 10, 000]o−g(−50) 100
3 11, 000]
e Pr n o ma
3
B.V. t
u act s s
rhs 1
utó B.V.
2 t c s1 s2 rhs
t ad1 1/2 1/2 0 20 A
Grs 0 3/2 −1/2 s1idad30
t 1 0 2/3 −1/3 10
→
2 c 0 1 −1/3 2/3 20
r
ive 0 10, 000 0 0 700 100
z 0 −50 250 z 3 3 11, 000
U n