You are on page 1of 109

Linear Programming Models

1
Linear Programming: An Overview

 Objectives of business decisions frequently involve


maximizing profit or minimizing costs.
 Linear programming uses linear algebraic relationships
to represent a firm’s decisions, given a business
objective, and resource constraints.
 Steps in application:
1. Identify problem as solvable by linear
programming.
2. Formulate a mathematical model of the
unstructured problem.
3. Solve the model.
4. Implementation
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Model Components

• Decision variables - mathematical symbols representing


levels of activity of a firm.
• Objective function - a linear mathematical relationship
describing an objective of the firm, in terms of decision
variables - this function is to be maximized or minimized.
• Constraints – requirements or restrictions placed on the firm
by the operating environment, stated in linear relationships
of the decision variables.
• Parameters - numerical coefficients and constants used in
the objective function and constraints.

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Summary of Model Formulation Steps

Step 1 : Clearly define the decision variables

Step 2 : Construct the objective function

Step 3 : Formulate the constraints

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
LP Model Formulation
A Maximization Example

• Product mix problem - Beaver Creek Pottery Company


• How many bowls and mugs should be produced to maximize
profits given labor and materials constraints?
• Product resource requirements and unit profit:

Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)

Bowl 1 4 40
Mug 2 3 50

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
LP Model Formulation
A Maximization Example (2 of 4)

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
LP Model Formulation
A Maximization Example (3 of 4)

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Function: Where Z = profit per day
Resource 1x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
Non-Negativity x1  0; x2  0
Constraints:
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
LP Model Formulation
A Maximization Example (4 of 4)

Complete Linear Programming Model:

Maximize Z = $40x1 + $50x2

subject to: 1x1 + 2x2  40


4x1 + 3x2  120
x1, x2  0

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Feasible Solutions

A feasible solution does not violate any of the constraints:

Example: x1 = 5 bowls
x2 = 10 mugs
Z = $40x1 + $50x2 = $700

Labor constraint check: 1(5) + 2(10) = 25 < 40 hours


Clay constraint check: 4(5) + 3(10) = 50 < 120 pounds

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Infeasible Solutions

An infeasible solution violates at least one of the


constraints:

Example: x1 = 10 bowls
x2 = 20 mugs
Z = $40x1 + $50x2 = $1400

Labor constraint check: 1(10) + 2(20) = 50 > 40 hours

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Graphical Solution of LP Models

• Graphical solution is limited to linear programming models


containing only two decision variables (can be used with three
variables but only with great difficulty).

• Graphical methods provide visualization of how a solution for a


linear programming problem is obtained.

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Coordinate Axes
Graphical Solution of Maximization Model (1 of
12)

X2 is mugs

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

X1 is bowls
Figure 2.2 Coordinates for Graphical Analysis
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Labor Constraint
Graphical Solution of Maximization Model (2 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.3 Graph of Labor Constraint


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Labor Constraint Area
Graphical Solution of Maximization Model (3 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.4 Labor Constraint Area


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Clay Constraint Area
Graphical Solution of Maximization Model (4 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.5 Clay Constraint Area


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Both Constraints
Graphical Solution of Maximization Model (5 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.6 Graph of Both Model Constraints


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Feasible Solution Area
Graphical Solution of Maximization Model (6 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.7 Feasible Solution Area


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Objective Function Solution = $800
Graphical Solution of Maximization Model (7 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.8 Objection Function Line for Z = $800


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Alternative Objective Function Solution Lines
Graphical Solution of Maximization Model (8 of 12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.9 Alternative Objective Function Lines


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Optimal Solution
Graphical Solution of Maximization Model (9 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.10 Identification of Optimal Solution Point


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Optimal Solution Coordinates
Graphical Solution of Maximization Model (10 of 12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.11 Optimal Solution Coordinates


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Extreme (Corner) Point Solutions
Graphical Solution of Maximization Model (11 of 12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.12 Solutions at All Corner Points


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Optimal Solution for New Objective Function
Graphical Solution of Maximization Model (12 of 12)

Maximize Z = $70x1 + $20x2


subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0

Figure 2.13 Optimal Solution with Z = 70x1 + 20x2


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Slack Variables

 Standard form requires that all constraints be in the


form of equations (equalities).
 A slack variable is added to a  constraint (weak
inequality) to convert it to an equation (=).
 A slack variable typically represents an unused
resource.
 A slack variable contributes nothing to the objective
function value.

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Linear Programming Model: Standard Form

Max Z = 40x1 + 50x2 + s1 + s2


subject to:1x1 + 2x2 + s1 = 40
4x2 + 3x2 + s2 = 120
x 1 , x 2 , s1 , s2  0
Where:
x1 = number of bowls
x2 = number of mugs
s1, s2 are slack variables

Figure 2.14 Solution Points A, B, and C with Slack


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
LP Model Formulation – Minimization (1 of 8)

 Two brands of fertilizer available - Super-gro, Crop-quick.


 Field requires at least 16 pounds of nitrogen and 24 pounds of
phosphate.
 Super-gro costs $6 per bag, Crop-quick $3 per bag.
 Problem: How much of each brand to purchase to minimize total
cost of fertilizer given following data ?
Chemical Contribution

Nitrogen Phosphate
Brand
(lb/ bag) (lb/ bag)
Super-gro 2 4
Crop-quick 4 3
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
LP Model Formulation – Minimization (2 of 8)

Figure 2.15 Fertilizing


farmer’s field

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
LP Model Formulation – Minimization (3 of 8)

Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick

The Objective Function:


Minimize Z = $6x1 + 3x2
Where: $6x1 = cost of bags of Super-Gro
$3x2 = cost of bags of Crop-Quick

Model Constraints:
2x1 + 4x2  16 lb (nitrogen constraint)
4x1 + 3x2  24 lb (phosphate constraint)
x1, x2  0 (non-negativity constraint)
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Constraint Graph – Minimization (4 of 8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2  16
4x2 + 3x2  24
x1 , x 2  0

Figure 2.16 Graph of Both Model Constraints


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Feasible Region– Minimization (5 of 8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2  16
4x2 + 3x2  24
x1 , x 2  0

Figure 2.17 Feasible Solution Area


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Optimal Solution Point – Minimization (6 of 8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2  16
4x2 + 3x2  24
x1 , x 2  0

Figure 2.18 Optimum Solution Point


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Surplus Variables – Minimization (7 of 8)

 A surplus variable is subtracted from a  constraint to


convert it to an equation (=).
 A surplus variable represents an excess above a
constraint requirement level.
 A surplus variable contributes nothing to the calculated
value of the objective function.
 Subtracting surplus variables in the farmer problem
constraints:
2x1 + 4x2 - s1 = 16 (nitrogen)
4x1 + 3x2 - s2 = 24 (phosphate)
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Graphical Solutions – Minimization (8 of 8)

Minimize Z = $6x1 + $3x2 + 0s1 + 0s2


subject to: 2x1 + 4x2 – s1 = 16
4x2 + 3x2 – s2 = 24
x1, x2, s1, s2  0

Figure 2.19 Graph of Fertilizer Example


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Irregular Types of Linear Programming Problems

For some linear programming models, the general


rules do not apply.

• Special types of problems include those with:


Multiple optimal solutions
Infeasible solutions
Unbounded solutions

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Multiple Optimal Solutions Beaver Creek
Pottery

The objective function is


parallel to a constraint line.
Maximize Z=$40x1 + 30x2
subject to: 1x1 + 2x2  40
4x2 + 3x2  120
x1 , x 2  0
Where:
x1 = number of bowls
x2 = number of mugs

Figure 2.20 Example with Multiple Optimal Solutions


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
An Infeasible Problem

Every possible solution


violates at least one constraint:
Maximize Z = 5x1 + 3x2
subject to: 4x1 + 2x2  8
x1  4
x2  6
x1 , x 2  0

Figure 2.21 Graph of an Infeasible Problem


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
An Unbounded Problem

Value of the objective


function increases indefinitely:
Maximize Z = 4x1 + 2x2
subject to: x1  4
x2  2
x1 , x 2  0

Figure 2.22 Graph of an Unbounded Problem


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Characteristics of Linear Programming Problems

• A decision amongst alternative courses of action is required.


• The decision is represented in the model by decision
variables.
• The problem encompasses a goal, expressed as an objective
function, that the decision maker wants to achieve.
• Restrictions (represented by constraints) exist that limit the
extent of achievement of the objective.
• The objective and constraints must be definable by linear
mathematical functional relationships.

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Properties of Linear Programming Models

• Proportionality - The rate of change (slope) of the objective


function and constraint equations is constant.
• Additivity - Terms in the objective function and constraint
equations must be additive.
• Divisibility -Decision variables can take on any fractional
value and are therefore continuous as opposed to integer in
nature.
• Certainty - Values of all the model parameters are assumed
to be known with certainty (non-probabilistic).

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Problem Statement
Example Problem No. 1 (1 of 3)

■ Hot dog mixture in 1000-pound batches.


■ Two ingredients, chicken ($3/lb) and beef ($5/lb).
■ Recipe requirements:
at least 500 pounds of “chicken”
at least 200 pounds of “beef”
■ Ratio of chicken to beef must be at least 2 to 1.
■ Determine optimal mixture of ingredients that will
minimize costs.

Copyright © 2010 Pearson Education, Inc. Publishing as


Prentice Hall
Solution
Example Problem No. 1 (2 of 3)
Step 1:
Identify decision variables.
x1 = lb of chicken in mixture
x2 = lb of beef in mixture
Step 2:
Formulate the objective function.
Minimize Z = $3x1 + $5x2
where Z = cost per 1,000-lb batch
$3x1 = cost of chicken
$5x2 = cost of beef
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Solution
Example Problem No. 1 (3 of 3)

Step 3:
Establish Model Constraints
x1 + x2 = 1,000 lb
x1  500 lb of chicken
x2  200 lb of beef
x1/x2  2/1 or x1 - 2x2  0
x1 , x 2  0
The Model: Minimize Z = $3x1 + 5x2
subject to: x1 + x2 = 1,000 lb
x1  500
x2  200
x1 - 2x2  0
Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Example Problem No. 2 (1 of 3)

Solve the following model


graphically:
Maximize Z = 4x1 + 5x2
subject to: x1 + 2x2  10
6x1 + 6x2  36
x1  4
x1 , x 2  0

Step 1: Plot the constraints


as equations

Figure 2.23 Constraint Equations


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Example Problem No. 2 (2 of 3)

Maximize Z = 4x1 + 5x2


subject to: x1 + 2x2  10
6x1 + 6x2  36
x1  4
x1 , x 2  0
Step 2: Determine the feasible
solution space

Figure 2.24 Feasible Solution Space and Extreme Points


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Example Problem No. 2 (3 of 3)

Maximize Z = 4x1 + 5x2


subject to: x1 + 2x2  10
6x1 + 6x2  36
x1  4
x1 , x 2  0
Step 3 and 4: Determine the
solution points and optimal
solution

Figure 2.25 Optimal Solution Point


Copyright © 2010 Pearson Education, Inc. Publishing as
Prentice Hall
Simplex Method

• Used for solving LP problems of any nature regardless of the


type of objective and number of decision variables.
• Put into the form of a table, and then a number of
mathematical steps are performed on the table
• Moves from one extreme point on the solution boundary to
another until the best one is found, and then it stops
• A lengthy and tedious process but computer software
programs are now used easily instead
• Programs do not provide an in-depth understanding of how
those solutions are derived
• Can greatly enhance one's understanding of LP
Simplex algorithm steps
• Write the equation in mathematical equation
• Converting the equations into standard form by adding slack variables,
or artificial variables or artificial variables and slack variables
• Construct the initial table
• Identify the entering variable-pivot column
• Identify the leaving variable- pivot row
• Conduct further iteration to that the value at the pivot cell is 1 and all
other numbers in the column are zero.
• Check for optimality ( for maximization models all values in the C-Z row
must be less than or equal to zero for the solution to be optimal. If
there is any positive value in the C-z row of the table that is an
indication that the solution is not optimal. Hence, there is a need to
iterate further by identifying the leaving variable and entering variable
using the techniques discussed above.

47
Example

Maximize Z = f(x,y) = 3x + 2y
Max Z=3x+2y+0S1+0S2+0S3
subject to: 2x + y ≤ 18
Subject to:
2x + 3y ≤ 42
2X+y+S1=18

3x + y ≤ 24 2X+3Y+S2=42

x≥0,y≥0 3X+Y+S3=24

X,Y,S1,S2,S3≥0

Solution
x = 3 and y = 12

48
Initial table

X Y S1 S2 S3 Quantity
C 3 2 0 0 0
S1 0 2 1 1 0 0 18
S2 0 2 3 0 1 0 42
S3 0 3 1 0 0 1 24
Z 0 0 0 0 0
C-Z 3 2 0 0 0 0
49
Table Two
Quanti
X Y S1 S2 S3 ty
C 3 2 0 0 0
R3(-
S1 0 0 0.33 1 0 -0.67 2 2)+R1
R3(-
S2 0 0 2.3 0 1 -0.67 26 2)+R2

X 3 1 0.33 0 0 0.33 8
Z 3 1 0 0 1
C-Z 0 1 0 0 -1 24

50
Table Three

x Y S1 S2 S3

3 2 0 0 0 Quantity

y 2 0 1 3 0 -2 6

S2 0 0 0 -7 1 4 12

X 3 1 0 -1 0 1 6

Z 3 2 3 0 -1

C-Z 0 0 -3 0 1 30

51
Table Four

X Y S1 S2 S3 Quantity

C
3 2 0 0 0

y 2 0 1 -0.5 0.5 0 12

S3 0 0 0 -1.75 0.25 1 3

x 3 1 0 0.75 -0.25 0 3

Z 3 2 1.25 0.25 0
33
C-Z 0 0 -1.25 -0.25 0
52
Maximization with mixed constraints

The simplex method requires that all the


constraints be in standard form.
Constraints that are ≤ can be put in to standard
form by adding a slack variable in the constraint.
Constraints with ≥or = sign are handled a bit
differently.
To change equality constraints to standard form add
artificial variables
To covert greater than or equal to inequality to
standard form subtract surplus variable first and add
artificial variable
53
Solve using simplex method

Max! 6X + 8Y
Subject to: Y≤4
X+Y=9
6X+ 2Y ≥ 24
X, Y ≥ 0

54
In standard form

Max! 6X + 8Y + 0S1 + 0S3 - MA1 – MA3


Subject to: Y+ S1 = 4
X+Y + A1 = 9
6X+ 2Y –S3 + A3 = 24
All variables ≥ 0

55
Initial table

BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M

S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24

Z -7M -3M 0 M -M -M -33M


C-Z 6+ 7M 8+3M 0 -M 0 0

56
Second table

BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M

S1 0 0 1 1 0 0 0 4
A2 -M 0 2/3 0 1/6 1 0 5
X 6 1 1/3 0 -1/6 0 1 4

Z 6 2-2M/3 0 -1M/6 -1 -M -M 24 - 5M
C-Z 0 6+2M/3 0 1+ M/6 0 0

57
Third table

BV CBV X Y S1 S3 A2 Quantity

6 8 0 0 -M

Y 8 0 1 1 0 0 4
A2 -M 7/3
X 6 0 0 -2/3 1/6 1 8/3

1 0 -1/3 -1/6 0

Z 6 8 6 + 2M/3 -M/6 -1 -M 48 -7M/3


58

C-Z 0 0 -6-2M/3 1+ M/6 0


Fourth table

BV CBV X Y S1 S3 Quantity

6 8 0 0

Y 8 0 1 1 0 4
S3 0 14
X 6 0 0 -4 1 5

1 0 -1 0 59
Minimization problems

• Manual solution of minimization problems using simplex method are


handled in the same fashion as maximization problem with mixed
constraints.
• The two key exceptions are:
• M coefficients in the objective function must be assigned a large positive
number.
• Selection of variables to enter the solution is based on the largest negative
value in row C-Z

60
Example

Minimize Z= 7X + 9Y
Subject to: 3X + 6Y ≥ 36
8X + 4Y ≥ 64
X, Y ≥ 0

61
In standard form

Minimize Z= 7X + 9Y + 0S1 + 0S2+MA1+MA2


Subject to: 3X + 6Y –S1 +A1 = 36
8X + 4Y –S2 + A2 = 64
All variables ≥ 0

62
Initial table

BV CBV X Y S1 S2 A1 A2
7 9 0 0 M M

A1 M 3 6 -1 0 1 0 36
A2 M 8 4 0 -1 0 1 64

Z 11M 10M -M -M M M 100M


C-Z 7-11M 9-10M M M 0 0

63
2nd table

BV CBV X Y S1 S2 A1 A2
7 9 0 0 M M

A1 M 0 9/2 -1 3/8 1 0 12
X 7 1 1/2 0 -1/8 0 1/8 8

Z 7 7/2+9M/2 - M 3M/8 -7/8 M 7/8 56 + 12M


C-Z 0 11/2- 9M/2 M -3M/8 + 7/8 0 M-7/8

64
3rd Table

BV CBV X Y S1 S2

7 9 0 0

Y 9 0 1 -2/9 1/12 8/3


X 7 1 0 1/9 -1/6 20/3

Z 7 9 -11/9 -5/12 212/3


C-Z 0 0 11/9 5/12

65
Shadow price

• Shadow prices are values in the Z row of the final (optimal) simplex
table.
• It is a marginal value.
• It shows the impact that a one unit change in the amount of
constraint would have on the value of the objective function

66
60 50 0 0 0 RHS
Basis c X1 X2 S1 S2 S3
S1 0 0 0 1 6 -5.3333 24
X1 60 1 0 0 1 -0.3333 9
X2 50 0 1 0 -1 002/3 4
z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 -13.333

Shadow prices
Negative of Shadow
prices 67
• From the above table one can clearly see that:
• If resource one is increased by one unit, there would be no effect on the
profit.
• If the second resource is increased by one unit, profit will increase by ten
birr and
• If the third resource is increased by one unit, profit will increase by 40/3
birr.
• shadow prices do not tell us by how much the level of scarce
resources can be increased and still have the same impact per unit

68
• resources with positive shadow prices as scarce goods (binding
constraints) and resources with zero shadow prices are free goods
(surplus resource).
• At some point, the ability to use additional resources will disappear
because of the fixed amounts of the other constraints.
• We need to determine the range over which we can change the
right hand side quantities and still have the same shadow prices.
• This is called range of feasibility/ right hand range

69
The Role of Sensitivity Analysis of the
Optimal Solution
• Is the optimal solution sensitive to changes in input parameters?

• Possible reasons for asking this question:


• Parameter values used were only best estimates.
• Dynamic environment may cause changes.
• “What-if” analysis may provide economical and operational information.

70
Sensitivity Analysis of
Objective Function Coefficients.

• Range of Optimality
• The range of optimality for each objective function coefficient
provides the range of values over which the current solution will
remain optimal.
• The optimal solution will remain unchanged as long as
• An objective function coefficient lies within its range of optimality
• There are no changes in any other input parameters.

71
Cont’d

• Managerial attention should be focused on those objective function


coefficients that have a narrow range of optimality and coefficients
near the end points of the range.
• With these coefficients, a small change can necessitate modifying the
optimal solution

72
Example

Consider:
Max! X1+ 2X2
Subject to: 2X1 + 3X2≤ 12
5X1 + 2X2 ≤ 15
X1, X2 ≥ 0
Solve using simplex method.

73
Optimal solution

1 2 0 0
BV CB X1 X2 S1 S2 RHS
V

X2 2 2/3 1 1/3 0 4
S2 0 11/3 0 -2/3 1 7
Z 4/3 2 2/3 0 8
C-Z -1/3 0 -2/3 0

74
Cont’d

• For all non-basic variables range of insignificance will be given by -∞≤


Cj ≤ Z.
• The non-basic variable will remain non-basic so long as Cj ≤ Zj.
• Hence, the range of insignicance for X1 is -∞≤ Cj ≤ 4/3

75
For basic variable

• For variables which are in the solution, the


determination of range of optimality requires
different approach.
• The value in C-Z row must be divided by the
corresponding row values of the variable in
question.
• The smallest positive ratio will indicate the
allowable increase and the smallest negative ratio
(absolute value) indicates the allowable decrease.
• If there is no positive ratio there is no upper limit in
variables objective function coefficient
76
Cont’d

• Therefore ratios calculated for the row are:


-1/2
0
-2 Allowable decrease
0/0
No positive ratio; hence there is no
upper limit

77
Cont’d

• As you can see, the smallest negative ration (in terms of absolute
value) is -1/2 and there is no positive ratio.
• Hence, the coefficient of X2 can be reduced by 0.5 and increased
indefinitely without making it non basic.

78
Cont’d

Therefore, the range of optimality for X2 is:


(2-0.5) ≤ C2 ≤∞ = 1.5 ≤ C2 ≤ ∞

79
Sensitivity Analysis of
Right-Hand Side Values
• a change in the right-hand side for a constraint may
affect the feasible region and perhaps cause a change
in the optimal solution to the problem
• In sensitivity analysis of right-hand sides of constraints
we are interested in the following questions:
• Keeping all other factors the same, how much would the
optimal value of the objective function (for example, the
profit) change if the right-hand side of a constraint changed
by one unit?
• For how many additional or fewer units will this per unit
change be valid?
80
Sensitivity Analysis of
Right-Hand Side Values
• Any change to the right hand side of a binding constraint will change
the optimal solution.

• Any change to the right-hand side of a non-binding constraint that is


less than its slack or surplus, will cause no change in the optimal
solution.

81
Cont’d

• To find range of feasibility for the right hand side, divide the entries in
associated the quantity column by slack column by the values.
• The smallest positive ratio indicates the allowable decrease and
negative ratio closest to zero indicates allowable increase

82
Cont’d

• For the previous example:


For the first variable
4/ (1/3) = 12 Allowable decrease
7/ (-2/3) = -21/2
• There are only two ratios one positive and the other negative.
• Hence, the first resource can be reduced by 12 and increased by
Allowable Increase
21/2.

83
Cont’d

• Hence, range of feasibility for resource one is:


0 ≤ b1≤ 45/2
Construct the range of feasibility for resource two.

84
For second constraint

4/0=undefined
7/1=7
Hence, 15-7≤b2≤∞
8 ≤b2≤∞ Allowable decrease

85
Models Without Unique Optimal
Solutions

• Infeasibility: Occurs when a model has no feasible point.


• Unboundness: Occurs when the objective can become
infinitely large (max), or infinitely small (min).
• Alternate solution: Occurs when more than one point
optimizes the objective function

86
Infeasible Model

No point, simultaneously,
lies both above line 1 and
below lines 2 and 3
2
.

3 1
87
Solve the following using simplex method

• Maximize z=X1+2X2+X3
s.t. X1+(1/2)X2+(1/2)X3≤1
(3/2)X1+2X2+X3≥8
X1,X2,X3 ≥0
You arrive at an optimal solution while an artificial variable is still in the
basis.
Unbounded solution
the Ma
xim

Ob
jec ize
Th t ive
ef Fu
ea nct
s
reg ib ion
ion le

89
Solve the following

• Maximize 2x1 +x2


Subject to:
x1 −x2 ≤ 10
2x1 −x2 ≤ 40
x1, x2 ≥ 0 .
There is exists a table which is not optimal, but identification of leaving
variable is impossible (because all rations are negative)
Duality

• Economic theory indicates that scarce (limited)


resources have value. In LP models, limited
resources are allocated, so they should be, valued.
• Whenever we solve an LP problem, we implicitly
solve two problems: the primal resource allocation
problem, and the dual resource valuation problem.
• Here we cover the resource valuation, or as it is
commonly called, the Dual LP
Duality
• Every linear programming model can have two forms.
• The original formulation of the problem is referred to primal form.
• The other form is called the dual.
• The dual is the mirror image of the primal.
• Solution of the primal problem contains solution of the dual and
vice versa

92
Primal
Max c Xj
j j

s.t. a Xj
ij j  bi for all i
Xj  0 for all j

Dual
Min U b
i
i i

s.t. U a
i
i ij  c j for all j
Ui  0 for all i
Primal Dual Pair and Their Units
Primal
Max c X
j
j j

s.t. a X
j
ij j  bi for all i

X j  0 for all j
where x is the variable and equals units sold

max sum (per unit profits) * (units sold)


s.t. sum (per unit res. use)*(units sold) < res on hand
Primal Dual Pair and Their Units

Dual
Min U b
i
i i

s.t. U a
i
i ij  c j for all j
Ui  0 for all i
U is the variable and equals per unit resource value

min sum (per unit res value) * (res on hand)


s.t. sum (per unit res value) * (per unit res use)
> per unit profits
Formulating the Dual
• The dual of maximization problem is minimization and vice versa
• If the constraints of the primal are greater than or equal to that of
dual will be less than or equal to or vice versa
• Right hand side of the primal becomes the objective function of the
dual and vice versa
• Number of decision variables become number of constraints and
vice versa

96
Primal and dual

Primal Dual
• •

97
In matrix notation

Primal Dual
Max Z= CX Min Z= yb
S.t: AX≤ b S.t: Ay≥C
x≥ 0 y≥0

98
• Formulate a dual of:
Minimize 40X1 + 44X2 + 48X3
Subject to
X1+ 2X2+ 3X3 ≥ 20
4X1+4X2+4X3 ≥ 30
X1, X2, X3 ≥ 0

99
Maximize 20y1+30y2
Subject to:
1Y1+4Y2 ≤ 40
2y1+ 4Y2 ≤ 44
3Y1+ 4Y2 ≤ 48
Y1, Y2 ≥ 0

100
• Formulate the dual of:
Maximize 50X1 + 80X2
Subject to
3X1+ 5X2≤ 45
4X1+ 2X2≥ 16
6X1+ 6X2=30

6X1+6x2<=30
6X1+6X2>=30

101
Minimize 45y1-16y2+30y3-30y4
Subject to
3y1-4y2+6y3-6y4≥ 50
5y1-2y2+6y3-6y4≥ 80
y1, y2, y3, y4 ≥ 0

102
Primal and dual relationships
Comparing primal and dual simplex solution

• The solution quantities of the dual are equal to shadow prices of the
primal
• The values of the solution quantities of the primal can be found in
the bottom row of the dual.

104
Solve one of the models and read the solution
of the other form that.
• A firm, that assembles computers and
computer equipment, is about to start
production of two new micro computers. Each
type of microcomputer will require assembly
time inspection time and storage space. The
amount of each of these resources that can be
devoted to the production of the micro
computers is limited. The manager of the firm
would like to determine the quantity of each of
the microcomputers to produce in order to
maximize the profit generated by sales of these
microcomputers. The following additional
information is provided.
106
Type 1 Type 2
• Profit per unit 60 50
• Assembly time/unit 4hrs 10hrs
• Inspection time/unit 2hrs 1hrs
• Storage space/ unit 3 cubic feet 3 cubic feet
• Resources available
• Assembly time 100hrs
• Inspection time 22 hrs
• Storage space 39 cubic feet

107
Required
• Formulate the problem as Linear Programming model
• Solve using graphical method
• Solve using simplex method
• Find duality of the problem
• Compare the primal and dual
• Construct the range of optimality and feasibility for the objective
function coefficient and right hand side values.
• Interpret the shadow prices.

108
Cont’d

• Assume that the profit of type one product is 100 birr and that of
type two product is 50 birr per unit. Will the optimal solution
change?
• What if the profit contribution of type one and type are 50 and 50
birr each.

109

You might also like