You are on page 1of 34

Lecture Day 5

Solving Linear Programming Problems


Using the Simplex Method (cont.)
Special Cases in Using the Simplex Method
Sensitivity/Post-Optimality Analysis

Handling Other Types of Constraints


1. To standardize the equation:

Add a Slack Variable:


2. To standardize the equation:

X1 < X2

X1 + S1 = X2
X1 > X2

Subtract a Slack Variable:

X1 - S1 = X2

Add an Artificial Variable:

X1 - S1 + A1= X2

3. To standardize the equation:


Add an Artificial Variable:

X 1 = X2
X1 + A1= X2

Solving Minimization Problems


1. Formulate the minimization problem, then change the signs of all
coefficients in the objective function and solve the problem as a
maximization problem. The resulting values of the decision
variables will be correct, and multiplying the final objective
function by 1 yields the correct minimum value.
2. In the selection for the entering variable, instead of picking the
variable with the most positive Cj Zj to enter the solution, pick
the variable with the most negative Cj Zj. Such a selection
decreases rather than increases the value of the objective
function.
The optimality criterion for a minimization problem is
achieved when all Cj Zj > 0.
The minimum ratio, determination of the leaving variable,
and the pivoting process remain the same as the
maximization case.

Minimization Problem Using the Simplex Method


Consider an oil company that produces a petroleum product
requiring the input of crude oil A and crude oil B. Each barrel of
the final product must contain at least 50 gallons. In this final mix,
at least 20 gallons must be crude oil A and, at most, 30 gallons can
be crude oil B. Crude oil B costs P0.75 per gallon, and crude oil A
costs P1.00 per gallon. How many gallons of crude A and B should
be in each barrel of the petroleum product in order to meet
specifications and minimize costs?
Let : X1 = number of gallons of crude oil B
X2 = number of gallons of crude oil A
Min. Z = 0.75X1 + 1.00X2
Subject to:
X1 + X2 > 50

X1 + X2 - S1 + A1 = 50

X1

X1 + S2 = 30

< 30
X2 > 20

X1, X2 > 0

X2 S3 + A2 = 20

Tableau 1
Cj

0.75 1

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

A2 Solution

A1

-1

50

S2

30

A2

-1

20

Values

Min. Z = 0.75X1 + 1.00X2


Subject to:
X1 + X2 > 50

X1 + X2 - S1 + A1 = 50

X1

X1 + S2 = 30

< 30
X2 > 20

X1, X2 > 0

X2 S3 + A2 = 20

Tableau 1
Cj

0.75 1

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

A2 Solution

A1

-1

50

50

S2

30

A2

-1

20

20

Zj

2M -M

-M

M M

70M

Cj - Zj 0.75 - M
1 - 2M

Values

Ratio

Tableau 2
Cj
CB

Basic
Variables

A1

S2

X2

0.75 1
X1

X2

S1

S2

S3

A1

A2 Solution
Values

Ratio

Tableau 1
Cj

0.75 1

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

A2 Solution

A1

-1

50

50

S2

30

A2

-1

20

20

Zj

2M -M

-M

M M

70M

Cj - Zj 0.75 - M
1 - 2M

Values

Ratio

Tableau 2
Cj
CB

Basic
Variables

A1

S2

X2

0.75 1

X1

X2

S1

S2

S3

A1

A2 Solution

Ratio

-1

NPR

Values

20

Tableau 1
Cj

0.75 1

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

A2 Solution

A1

-1

50

50

S2

30

A2

-1

20

20

Zj

x NPR)
M NR
2M= OR
-M (PIN
0 -M
M M

70M

Cj - Zj 0.751- M 1
1 - 2M

-1M

00

M
0

10

Values

50

Ratio

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

S2

X2

-1

Values

1 -1

30

20

0
1

50
20)

NR = OR (PIN x NPR)
1
(0

1
1

-1
0

0
0

0
-1

1
0

-1

1 -1

30

Ratio

NPR

Tableau 1
Cj

0.75 1

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

A2 Solution

A1

-1

50

50

S2

30

A2

-1

20

20

Zj

2M -M

-M

M M

70M

Cj - Zj 0.75 - M
1 - 2M

Values

Ratio

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

-M

M-1

M -M+1 30M+20

Cj - Zj 0.75 - M 0

1-M

0 2M-1

Values

Ratio

Tableau 3
Cj
CB

Basic
Variables

0.75

X1

S2

X2

0.75 1
X1

X2

S1

S2

S3

A1

A2 Solution
Values

Ratio

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

-M

M-1

M -M+1 30M+20

Cj - Zj 0.75 - M 0

1-M

0 2M-1

Values

Ratio

Tableau 3
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

0.75

X1

-1

S2

X2

1 -1

Values

30

Ratio

NPR

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

x NPR)
M NR1 = OR
-M (PIN
0 M-1
M -M+1 30M+20

Cj - Zj 0.751- M 00

0M

10

1-M
0

Values

00 2M-1
0

30

Ratio

Tableau 3
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

0.75

X1

-1

S2

X2

Values

1 -1

-1 -1

30
0

NR = OR (PIN x NPR)
1
(1

0
0

0
-1

1
0

0
1

0 0
1 -1

-1 -1

30
30)
0

Ratio

NPR

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

-M

M-1

M -M+1 30M+20

Cj - Zj 0.75 - M 0

1-M

0 2M-1

Values

Ratio

Tableau 3
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

0.75

X1

-1

S2

-1 -1

X2

-1

20

Zj
Cj - Zj

Values

1 -1

30

0.75 1 -0.75 0 -0.25 0.75 0.25 42.5


0

0 0.75

0 0.25
M0.25
M0.75

Ratio

Special Cases in the Simplex Method to


Solving Linear Programming Problems
Alternative Optima

If a non-basic variable has a Cj Zj value of zero


at optimality, an alternative optimal solution exists
and can be obtained by bringing this non-basic
variable into the solution.

Tableau 3
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

0.75

X1

-1

S2

-1 -1

X2

-1

20

Zj
Cj - Zj

Values

1 -1

30

0.75 1 -0.75 0 -0.25 0.75 0.25 42.5


0

0 0.75

0 0.25
M0.25
M0.75

Tableau 3
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

0.75

X1

-1

S2

-1 -1

X2

-1

20

Zj
Cj - Zj

Values

1 -1

30

0.75 1 -0.75 0 -0.25 0.75 0.25 42.5


0

0 0.75

0 0.25
M0.25
M0.75

Special Cases in the Simplex Method to


Solving Linear Programming Problems
Unbounded Solution

An unbounded problem exists when all the


substitution coefficients of an entering variable are
non-positive (< 0).
That is, in calculating the minimum ratio in
determining the leaving variable, if no entries in the
pivot column are positive, no positive ratio can be
formed and the problem is identified as unbounded.

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

-M

M-1

M -M+1 30M+20

Cj - Zj 0.75 - M 0

1-M

0 2M-1

Values

Ratio

Special Cases in the Simplex Method to


Solving Linear Programming Problems
No Feasible Solution

The condition of no feasible solution is indicated


whenever the final solution contains an artificial
variable whose value is greater than zero.

Tableau 2
Cj

0.75 1

A1

A2 Solution

CB

Basic
Variables

X1

X2

S1

S2

S3

A1

-1

1 -1

30

30

S2

30

30

X2

-1

20

Zj

-M

M-1

M -M+1 30M+20

Cj - Zj 0.75 - M 0

1-M

0 2M-1

Values

Ratio

Special Cases in the Simplex Method to


Solving Linear Programming Problems
Degeneracy

Degeneracy results whenever there is a tie in the


minimum ratio to determine the leaving variable.
This can be prevented by selecting the uppermost row
in the tableau as the pivot row.

Sensitivity/Postoptimality
Analysis

Sensitivity analysis involves the exploration of changes


in model output in response to changes in input
parameters. In this way, the analyst is exploring how
sensitive the model is to certain parameters that
affect model output.
The parameters (the cj, aij, and bi) used in real-world
LP models are often only estimates. These parameters
are often approximated by means of subjective
estimates, limited sampling, or observations subject to
human error. This is in consideration of the fact that
businesses operate in a dynamic environment, and
data pertaining to demand, prices, or resource
availability may change significantly in short periods of
time.

A problems optimal solution is only as accurate


as the original data from which it is derived.
Sensitivity analysis can aid in generating alternatives
and in planning for responses to unpredictable
changes. In this way, sensitivity analysis is a direct
tool to aid in flexibility planning.

Types of Sensitivity Analysis


Used in Linear Programming
Changes in objective function coefficients
Changes in right-hand side (RHS) values

Adding a new variable


Adding a new constraint
Changes in the constraint coefficients

Computation of Shadow Prices


The shadow price associated with a constraint
shows the amount of improvement in the optimal
objective function value as the value of the
right-hand side of that constraint is increased by
one unit, with all other model parameters
unchanged.

Let : X1 = number of
power amplifiers
X2 = number of
preamplifiers
Max. Z = 200X1 + 500X2
Subject to:
X2 < 40
1.2X1 + 4X2 < 240

0.5X1 + X2 < 81
X1 ,

X2 > 0

End of Lecture Day 5

You might also like