302. Sensitivity Analysis

302.0.1. Dual Simplex Method

Example

A company is selling 2 products

  • Producing 1 unit of product 1 requires 1 unit of resource 1 and 1 unit of resource 2, which can be sold for $2
  • Producing 1 unit of product 2 requires 1 unit of resource 1 and 2 unit of resource 2, which can be sold for $3
  • Total amount of resources 1 is 4 units
  • Total amount of resources 2 is 6 units
max2𝑥1+3𝑥2𝑠.𝑡.𝑥1+𝑥24𝑥1+2𝑥26


−2−3000
11104
12016
0−1208
11104
01−112
001110
102−12
01−112
  • An optimal solution (𝑥1,𝑥2)=(2,2)
  • The objective is 𝑧=10

Additional activity

The company now produces a 3rd product.

  • 1 unit of product 3 requires 1 unit of resource 2 and is sold for $8


max3𝑥1+2𝑥2+8𝑥3𝑠.𝑡.𝑥1+2𝑥242𝑥1+4𝑥2+𝑥36


We don’t need to solve a new linear program

The decision variable set changes from (𝑥1,𝑥2) to (𝑥1,𝑥2,𝑥3), the solution (𝑥1,𝑥2,0) is feasible

All we need to do is to check whether we should produce some product 3

  • If no, the current solution (𝑥1,𝑥2,0) is optimal
  • If yes, we increase the nonbasic variable 𝑥3 until one basic variable becomes 0

All we need is the (vector of) reduced costs:

𝑐𝐵𝑇𝐵1𝑁𝑐𝑁

Where:

  • 𝐵: basis matrix
  • 𝑁: non-basis matrix
  • 𝑐𝐵: vector of objective coefficients corresponding to the basic variables
  • 𝑐𝑁: vector of objective coefficients corresponding to the non-basic variables

For a single nonbasic variable (𝑥3), it simplifies to:

𝑐𝐵𝑇𝐵1𝐴𝑗𝑐𝑗

After we solve the original problem, we have 𝐵=(𝑥1,𝑥2) and 𝑁=(𝑠1,𝑠2)

  • The optimal basis is 𝐵

When we add a new decision variable 𝑥3, it is 0 (nonbasic) at the beginning

Therefore, to solve the new problem, we may start from the basis 𝐵=(𝑥1,𝑥2) and the set of nonbasic variables 𝑁=(𝑥3,𝑠1,𝑠2)

We start with the optimal tableau

001110
102−12
01−112


00?1110
10?2−12
01?−112

The vecots of constraint coefficients for nonbasic variables is:

𝐵1𝑁

for column 𝑗:

𝐵1𝐴𝑗

Where 𝐴𝑗 is the coefficient column for 𝑥3:

[2111][01]=[11]

And the vector if reduced costs for nonbasic variables is

𝑐𝐵𝑇𝐵1𝑁𝑐𝑁𝑇

For column 𝑗, that value is

𝑐𝐵𝑇𝐵1𝐴𝑗𝑐𝑗[23][11]8=7
00−71110
10−12−12
011−112

From this new tableau keep iterating

00−71110
10−12−12
011−112
070−6824
110104
011−112
61300828
110104
121016

(𝑥1,𝑥2,𝑥3)=(0,0,6) with 𝑧=48

Allows asking what if questions:

  • What if it is $5 instead of $8
  • What if it takes 2 of resource on instead of 1?
  • What if it takes 1 of resource 2 instead of 0?

Additional Constraints

Primal

max2𝑥1+3𝑥2𝑠.𝑡.𝑥1+𝑥24𝑥1+2𝑥26


We add a new constraint:

Dual

max2𝑥1+3𝑥2𝑠.𝑡.𝑥1+𝑥24𝑥1+2𝑥26𝑥11


We may plug in in the original optimal solution (𝑥1,𝑥2)=(2,2) into the new constraint

  • If it is feasible, it is optimal for the new problem
  • In our example, it is not feasible because 2>1

The original optimal tableau

001110
102−12
01−112

The new constraint 𝑥11 introduces a new slack variable (𝑠3)

Include 𝑠3 to be a basic variable

Let 𝐵=(𝑥1,𝑥2,𝑠3) and 𝑁=(𝑠1,𝑠2)

We have

𝑐𝐵=[230],𝑐𝑁=[00],𝐵=[110120101],𝑁=[100100],𝑏=[461]

We then have

𝐵1=[210110211],𝐵1𝑁=[211121],𝑐𝐵𝑇𝐵1𝑁𝑐𝑁𝑇=[11],𝑐𝐵𝑇𝐵1𝑏=10
0011010
102−102
01−1102
00−211−1

This is an invalid simplex tableau (RHS column column contains a negative value)

  • This means 𝐵=(𝑥1,𝑥2,𝑠3) is infeasible (as we already know)

Linear Programming Duality

We know a primal constraint is a dual variable

If a primal LP has one new constraint, it’s dual LP will have one new variable


We add a new constraint: