The Revised Simplex Method: Javier Larrosa Albert Oliveras Enric Rodr Iguez-Carbonell
The Revised Simplex Method: Javier Larrosa Albert Oliveras Enric Rodr Iguez-Carbonell
Session 3 p.1/34
Session 3 p.2/34
Idea: do not keep representation of full tableau, only B 1 Advantages over the tableau version: Time and space are saved Errors due to oating-point are easier to control We will develop revised algorithm for LPs of the form
min z = cT x Ax = b x0
Session 3 p.3/34
Basic Solution
For any basis B , the values of basic variables can be expressed in terms of non-basic variables:
BxB + RxR = b BxB = b RxR xB = B 1 b B 1 RxR
By denition, basic solution corresponds to assigning null values to all non-basic variables Basic solution: := B 1 b
Session 3 p.4/34
Session 3 p.5/34
Let aj be the column in A corresponding to variable xj . Let us dene reduced cost of xj as dj := cj cT B 1 aj B Note that dT = cT cT B 1 R, so cT x = cT B 1 b + dT xR B R R R B Thus this notion of reduced cost matches with that used in the tableau version of the simplex method
Session 3 p.6/34
Value z of cost function at current basic solution: make xR = 0 in above equation, i.e., z := cT B 1 b B To avoid repeating computations: Let us dene the simplex multiplier as := (B T )1 cB , or equivalently, T := cT B 1 B Then dj = cj T aj and z = T b (note z = cT holds too) B Optimality condition: dj 0 for all j R
Session 3 p.7/34
where = B 1 b and q = B 1 aq
Session 3 p.8/34
Session 3 p.9/34
We say the p-th basic variable is blocking when = p Then q is the pivot
p . p q
Session 3 p.10/34
Value of objective function can be decreased innitely. LP is unbounded. 2. If < + and the p-th basic variable is blocking: When setting xq = sign of basic variables is respected
p In particular, the p-th component of xB (t) is p q = 0
We can make a basis change: xq enters the basis and xkp leaves, where B = (k1 , ..., km )
Session 3 p.11/34
Update
New basic indices: B = B {kp } {q}
i New basic solution: p = , i = i q if i = p
Session 3 p.12/34
Algorithmic Description
1. Initialization: Find an initial feasible basis B Compute B 1 , = B 1 b, z = cT B 2. Pricing: Compute = cT B 1 and dj = cj T aj . B If for all j R, dj 0 then return OPTIMAL Else let q be such that dq < 0. Compute q = B 1 aq
i 3. Ratio test: Compute I = {i | 1 i m, q > 0}. If I = then return UNBOUNDED Else compute = miniI ( ii ) and p such that = p p q q
4. Update:
B = B {kp } {q} i p = , i = i q if i = p B = B + (aq akp )eT p z = z + dq
Go to 2.
Session 3 p.13/34
Session 3 p.14/34
bp = ,
1 vp
1 vp
a+
vp+1 vp
i=p
vi vp vm vp
bi
T
Let T =
,...,
vp1 vp
,...,
Session 3 p.15/34
When list is long, matrix is recomputed (reinversion) Other ways of representing B 1 : LU factoritzation
Session 3 p.16/34
Bounded Variables
We want to solve with revised simplex LPs of the form
min cT x Ax = b xu ( k uk +)
In practice internally variables translated so that = or = 0 to save arithmetic operations Variable xk is lower bounded if k > Variable xk is upper bounded if uk < + Variable xk is range if k > and uk < + Variable xk is xed if range and k = uk Variable xk is free if k = and uk = +
Session 3 p.17/34
Basic Solution
For any basis B , the values of basic variables can be expressed in terms of non-basic variables:
xB = B 1 b B 1 RxR
Values a non-basic variable xj can be assigned to: If lower bounded: k (it is at lower bound; xj L) If upper bounded: uk (it is at upper bound; xj U ) 0 (it is at zero level; xj Z ) If free: Basic solution:
:= B 1 b
jL
B 1 aj j
jU
B 1 aj uj
Session 3 p.18/34
Optimality Conditions
Cost function in terms of non-basic variables:
cT x = cT B 1 b + dR xR B
where dj = cj cT B 1 aj for all variable xj B If xj L: cannot improve if dj 0 If xj U : cannot improve if dj 0 If xj Z : cannot improve if dj = 0 Optimality condition: no improving non-basic variable
Session 3 p.19/34
Objective Function
Cost function in terms of non-basic variables:
cT x = cT B 1 b + dR xR B
where dj = cj cT B 1 aj for all variable xj B Value z of cost function at current basic solution:
z = cT B 1 b + B
jL
dj j +
jU
dj uj
Session 3 p.20/34
where = B 1 b and q = B 1 aq
Session 3 p.21/34
c j j +
jU
cj uj =
cT B 1 b + B cT B 1 b + B
(cj cT B 1 aj )j + B
jL jU
dj j +
jL jU
dj uj + tcq tcT B 1 aq = B
Session 3 p.22/34
i i i q i i i q
t t
Session 3 p.23/34
Session 3 p.24/34
Since decreasing xq can improve objective value: dq > 0 Let t 0 be difference of new value xq wrt old value Again xB (t) = tq , where = B 1 b and q = B 1 aq Again the improvement in cost is z = z(t) z = tdq
Session 3 p.25/34
i i i q i i i q
t t
Session 3 p.26/34
Session 3 p.27/34
Update
New objective value: z = z + dq If bound ip Flip status of xq (i.e., xq L xq U ) New basic solution: = q Else
New basic indices: B = B {kp } {q} i New basic solution: p = xq + , i = i q if i = p New basis inverse: B 1 = EB 1 If entering variable comes from lower bound L = L {xq } else U = U {xq } If leaving variable leaves to lower bound L = L {xkp } else U = U {xkp }
Session 3 p.28/34
Session 3 p.29/34
Session 3 p.30/34
Sensitivity Analysis
Data may be inaccurate (observations, estimations): small changes mean completely different solutions? Sensitivity analysis = study of the stability of optimal solution with respect to small changes in problem data Let B be a basis for
min cT x Ax = b x0 B gives an optimal feasible solution iff
Feasibility: B 1 b 0 Optimality: dT = cT cT B 1 R 0 B R R
Session 3 p.31/34
k
j
dj p j
p if j > 0,
k
j
dj p j
p if j < 0
Session 3 p.32/34
Session 3 p.33/34
Can be used to determine price/benet of changing a resource, capacity, limit, etc. If xk is slack of i-th row, then dk is called shadow price. Note that dk = 0 cT B 1 ei = T ei = i . B
Session 3 p.34/34