You are on page 1of 155

ISYE6189 - Deterministic Optimization and

Stochastic Processes

Topic 1-Week 1

Various Types of LP Models


Linear Programming
Various Types of LP Models

Learning Outcome
LO1: Explain objectives and constraints based on
problem descriptions in mathematical optimization
models
VARIOUS TYPES OF LP MODELS
 - Blending
 - Capital budgeting
 - Diet problem
 - Inventory model
 - Multi-period financial model
 - Multi-period work scheduling
 - Production process
 - Graphical method for two variable LP
Linear Programming
Problem

 Linear Programming (LP) is a tool for solving optimization


problems.
 Linear programming problems involve important terms that
are used to describe linear programming.
Example 1 : Giapetto’s
Woodcarving

 Giapetto’s, Inc., manufactures wooden soldiers and trains.


– Each soldier built:
• Sell for $27 and uses $10 worth of raw materials.
• Increase Giapetto’s variable labor/overhead costs by $14.
• Requires 2 hours of finishing labor.
• Requires 1 hour of carpentry labor.

– Each train built:


• Sell for $21 and used $9 worth of raw materials.
• Increases Giapetto’s variable labor/overhead costs by $10.
• Requires 1 hour of finishing labor.
• Requires 1 hour of carpentry labor.
Ex. 1 – continued

 Each week Giapetto can obtain:


– All needed raw material.
– Only 100 finishing hours.
– Only 80 carpentry hours.
 Demand for the trains is unlimited.
 At most 40 soldiers are bought each week.
 Giapetto wants to maximize weekly profit
(revenues – costs).
 Formulate a mathematical model of Giapetto’s
situation that can be used maximize weekly profit.
Example 1: Solution

 The Giapetto solution model incorporates the


characteristics shared by all linear programming
problems.
– Decision variables should completely describe the decisions
to be made.
• x1 = number of soldiers produced each week
• x2 = number of trains produced each week
– The decision maker wants to maximize (usually revenue or
profit) or minimize (usually costs) some function of the
decision variables. This function to maximized or minimized is
called the objective function.
• For the Giapetto problem, fixed costs do not depend upon the the
values of x1 or x2.
Ex. 1 - Solution continued

 Giapetto’s weekly profit can be expressed in terms of the


decision variables x1 and x2:
• Weekly profit =
weekly revenue – weekly raw material costs – the weekly variable
costs = 3x1 + 2x2
 Thus, Giapetto’s objective is to chose x1 and x2 to maximize
weekly profit. The variable z denotes the objective function
value of any LP.
 Giapetto’s objective function is
Maximize z = 3x1 + 2x2
 The coefficient of an objective function variable is called an
objective function coefficient.
Ex. 1 - Solution continued

 As x1 and x2 increase, Giapetto’s objective function


grows larger.
 For Giapetto, the values of x1 and x2 are limited by the
following three restrictions (often called constraints):
– Each week, no more than 100 hours of finishing time
may be used. (2 x1 + x2 ≤ 100)
– Each week, no more than 80 hours of carpentry time
may be used. (x1 + x2 ≤ 80)
– Because of limited demand, at most 40 soldiers should
be produced. (x1 ≤ 40)
Continued

 The coefficients of the decision variables in the constraints


are called the technological coefficients. The number on the
right-hand side of each constraint is called the constraint’s
right-hand side (or rhs).
 To complete the formulation of a linear programming
problem, the following question must be answered for each
decision variable.
– Can the decision variable only assume nonnegative values, or is the
decision variable allowed to assume both positive and negative
values?
• If the decision variable can assume only nonnegative values, the sign
restriction xi ≥ 0 is added.
• If the variable can assume both positive and negative values, the
decision variable xi is unrestricted in sign (often abbreviated urs).
Ex. 1 - Solution
continued
 For the Giapetto problem model, combining the sign
restrictions x1≥0 and x2≥0 with the objective function and
constraints yields the following optimization model:
Max z = 3x1 + 2x2 (objective function)
Subject to (s.t.)
2 x1 + x2 ≤ 100 (finishing constraint)
x1 + x2 ≤ 80 (carpentry constraint)
x1 ≤ 40 (constraint on demand for soldiers)

x1 ≥0 (sign restriction)

x2 ≥0 (sign restriction)
Linear Programming

 A function f(x1, x2, …, xn of x1, x2, …, xn is a linear


function if and only if for some set of constants, c1,
c2, …, cn, f(x1, x2, …, xn) = c1x1 + c2x2 + … + cnxn.
 For any linear function f(x1, x2, …, xn) and any
number b, the inequalities f(x1, x2, …, xn) ≤ b and
f(x1, x2, …, xn) ≥ b are linear inequalities.
Linear Programming

A linear programming problem (LP) is an optimization


problem for which we do the following:
– Attempt to maximize (or minimize) a linear function (called
the objective function) of the decision variables.
– The values of the decision variables must satisfy a set of
constraints. Each constraint must be a linear equation or
inequality.
– A sign restriction is associated with each variable. For any
variable xi, the sign restriction specifies either that xi must
be nonnegative (xi ≥ 0) or that xi may be unrestricted in
sign.
Linear Programming

 The fact that the objective function for an LP must be a


linear function of the decision variables has two
implications:
1. The contribution of the objective function from each decision
variable is proportional to the value of the decision variable.
For example, the contribution to the objective function for 4
soldiers is exactly fours times the contribution of 1 soldier.
2. The contribution to the objective function for any variable is
independent of the other decision variables. For example, no
matter what the value of x2, the manufacture of x1 soldiers
will always contribute 3x1 dollars to the objective function.
Linear Programming

Analogously, the fact that each LP constraint must be a


linear inequality or linear equation has two implications:
1. The contribution of each variable to the left-hand side of
each constraint is proportional to the value of the
variable. For example, it takes exactly 3 times as many
finishing hours to manufacture 3 soldiers as it does 1
soldier.
2. The contribution of a variable to the left-hand side of
each constraint is independent of the values of the
variable. For example, no matter what the value of x1,
the manufacture of x2 trains uses x2 finishing hours and x2
carpentry hours
Linear Programming

 The first item in each list is called the Proportionality


Assumption of Linear Programming.
 The second item in each list is called the Additivity
Assumption of Linear Programming.
 The divisibility assumption requires that each decision
variable be permitted to assume fractional values.
BLENDING PROBLEM
Blending Problems

 Situations in which various inputs must be blended in


some desired proportion to produce goods for sale
are often amenable to linear programming analysis.
 Such problems are called blending problems.
 Some examples of how linear programming has been
used to solve blending problems.
– Blending various types of crude oils to produce different
types of gasoline and other outputs.
– Blending various chemicals to produce other chemicals
– Blending various types of metal alloys to produce various
types of steels
Class Problem
Bullco blends silicon and nitrogen to produce two types
of fertiliser. Fertiliser 1 must be at least 40% nitrogen and sells
for $70/lb. Fertiliser 2 must be at least 70% silicon and sells for
$40/lb. Bullco can purchase up to 80lb of nitrogen at $15/lb
and up to 100lb of silicon at $10/lb. Assuming that all fertiliser
produced can be sold, formulate an LP to help Bullco maximise
profits.
Class Problem

Formulate the Problem:


 Let Xs1 be the amount in pounds of silicon used in
fertilizer 1 and Xs2 be the amount in pounds of silicon
used in fertilizer 2.
 Let Xn1 be the amount in pounds of nitrogen used in
fertilizer 1 and Xn2 be the amount in pounds of
nitrogen used in fertilizer 2
Class Problem

Formulate the Problem:


Objective Function:

Max Z = 70(Xn1 + Xs1) + 40(Xn2+Xs2)


– 15(Xs1 + Xs2) – 10(Xn1+Xn2)
ST : Xs1 + Xs2 <= 100
Xn1 + Xn2 <= 80
Xn1 >= 0.4(Xs1 + Xn1)
Xs2 >= 0.7(Xs2 + Xn2)

All variables >= 0


DIET PROBLEM
Diet Problem

 My diet requires that all the food I get come from one of the
four “basic food groups”.
 At present, the following four foods are available for
consumption: brownies, chocolate ice cream, cola and
pineapple cheesecake.
 Each brownie costs 50¢, each scoop of ice cream costs 20 ¢,
each bottle of cola costs 30 ¢,, and each piece of pineapple
cheesecake costs 80 ¢.
 Each day, I must ingest at least 500 calories, 6 oz of
chocolate, 10 oz of sugar, and 8 oz of fat.
Diet Problem - continued

 The nutritional content per unit of each food is


given.
 Formulate a linear programming model that can be
used to satisfy my daily nutritional requirements at
minimum cost.
Diet Problem: Solution

 As always, begin by determining the decisions that


must be made by the decision maker: how much
of each type of food should be eaten daily.
 Thus we define the decision variables:
 x1 = number of brownies eaten daily
 x2 = number of scoops of chocolate ice cream eaten
daily
 x3 = bottles of cola drunk daily
 x4 = pieces of pineapple cheesecake eaten daily
Diet Problem– Solution
continued

My objective is to minimize the cost of my diet.


The total cost of any diet may be determined from the
following relation:
(total cost of diet) = (cost of brownies) + (cost of ice cream) +(cost of cola)
+ (cost of cheesecake).
 To evaluate the total cost of a diet, note that, for
example,

 Total cost of diet = 50x1 + 20x2 + 30x3 + 80x4


Diet Problem– Solution
continued

 The decision variables must satisfy the following


four constraints:
– Daily calorie intake must be at least 500 calories.
– Daily chocolate intake must be at least oz.
– Daily sugar intake must be at least 10 oz.
– Daily fat intake must be at least 8 oz.
Diet Problem– Solution
continued

 Nutritional Values for Diet


Diet Problem– Solution
continued
To express Constraint 1 in terms of the decision variables,
note that
(daily calorie intake) = (calories in brownies) +(calories in
chocolate ice cream) + (calories in cola) + (calories in
pineapple cheesecake).
Diet Problem– Solution
continued

To express Constraint 2, 3 and 4 in terms of the


decision variables, note that
Diet Problem– Solution
continued

To express Constraint 2, 3 and 4 in terms of the decision


variables, note that

Diet Problem Formulation
Diet Problem Result
Diet Problem– Solution
continued

 Express each constraint in terms of the decision variables.


 The optimal solution to this LP is found by combining the
objective functions, constraints, and the sign restrictions.
 The chocolate and sugar constraints are binding, but the
calories and fat constraints are nonbinding.
 A version of the diet problem with a more realistic list of
foods and nutritional requirements was one of the first LPs
to be solved by computer.
 Diet in Lindo
A WORK-SCHEDULING PROBLEM
Multi-period Work
Scheduling

 Have seen that LP can be used to schedule employees


in a static environment
 LP can also be used to schedule employee training
when a firm faces a demand that changes over time
A Work-Scheduling
Problem
 Many applications of linear programming involve
determining the minimum-cost method for satisfying
workforce requirements.
 The results may be different solved manually versus using
LINDO, LINGO or Excel Solver.
 One type of work scheduling problem is a static scheduling
problem.
 In reality, demands change over time, workers take
vacations in the summer, and so on, so the post office does
not face the same situation each week. This is a dynamic
scheduling problem.
A CAPITAL BUDGETING PROBLEM
A Capital Budgeting
Problem

 Linear programming can be used to determine optimal


financial decisions.
 The concept of net present value (NPV) can be used to
compare the desirability of different investments.
 The total value of the cash flows for any investment is
called by net present value, or NPV, of the investment.
 The NPV of an investment is the amount by which the
investment will increase the form’s value.
A Capital Budgeting
Problem
 The Excel =NPV function makes this computation easy.
Syntax is =NPV(r, range of cash flows).
 Often cash flows occur at irregular intervals. This makes it
difficult to compute the NPV of these cash flows.
 The Excel XNPV function makes computing NPV’s of the
regular times cash flows a snap.
 In many capital budgeting problems, it is unreasonable to
allow the xi to be fractions: Each xi should be restricted to
0 or 1.
 Thus many capital budgeting problems violate the
Divisibility Assumption.
SHORT-TERM FINANCIAL PLANNING
Multi-period Financial
Models
 Linear programming can be used to model multi-period
cash management problems.
 The key is to determine the relations of cash on hand
during different periods.
 One real world example is to use LP to determine a
bond model that maximizes profit from bon purchases
ad sales subject to constraints that minimize the firm’s
risk exposure.
Short-Term Financial
Planning

LP models can often be used to aid a firm in short- or


long-term financial planning.
PRODUCTION PROCESS MODELS
Production Process Models

 An LP model can be formulated to represent a simple


production process.
 The key step is to determine how the outputs from a later
stage of the process are related to the outputs from an
earlier stage.
 A common mistake in these type of LP models is with units
of measurement in constraints.
 If there are doubts about a constraint, then make sure that
all terms in the constraint have the same units
INVENTORY MODEL
Multi-period Decision
Problems:
An Inventory Model

 Up until now all the LP examples have been static, or one-


period, models.
 Linear programming can also be used to determine optimal
decisions in multi-period, or dynamic, models.
 Dynamic models arise when the decision maker makes
decisions at more than one point in time.
 In a dynamic model, decisions made during the current
period influence decisions made during future periods.
Example: Sailco Inventory

 Sailco Corporation must determine how many sailboats


should be produced during each of the next four quarters.
 Demand is known for the next four quarters. Sailco must
meet demands on time.
 At the beginning of the first quarter Sailco has an inventory
of 10 boats.
 Sailco must decide at the beginning of each quarter how
many boats should be produced during each quarter.
 Sailco can produce 40 boats (cost=$400)per quarter with
regular labor hours.
Ex. : continued

 They can produce more if they have workers work


overtime. These boats cost $450 to produce.
 At the end of each quarter a carrying or holding
cost of $20 per boat is incurred.
 Use linear programming to determine a production
schedule to minimize the sum of production and
inventory costs during the next four quarters.
Example: Solution

 For each quarter Sailco must determine the number of


sailboats that should be produced by regular-time and by
overtime labor.
 The decision variables are
– xt = number of sailboats produced by regular time labor during
quarter t
– yt = number of boats produced by overtime labor during quarter t
– it = number of sailboats on hand at the end of quarter t
 Sailco’s objective function is
min z = 400x1 + 400x2 + 400x3 + 400x4 + 450y1 + 450y2
+ 450y3 + 450y4 + 20i1 +20i2 +20i3+20i4
Ex. – Solution continued
• Two observations
– Let dt be the demand during period t,
it = it-1 + (xt+yt) – dt (t = 1,2,3,4)
– Not that quarter t’s demand will be met on time if and only if
(iff) it ≥ 0.
• The sign restriction ensures that each quarter’s demand
will be met on time.
• Sailco’s constraints
– The first four constraints ensures that each periods regular time
production does not exceed 40.
– Inventory constraints for each time period are added.
Ex. – Solution continued
• The optimal solution is reached.
• Some things to consider:
– The Proportionality assumption is violated because production
cost may not be a linear function of quantity produced.
– Future demands may not be known with certainty, thus
violating the Certainty assumption.
– Sailco is required to meet all demands on time. Demands could
possibly be backlogged (demand is met during later period) and
incur penalty costs.
– Ignored the fact that quarter-to-quarter variations in the
quantity produced may result in extra costs (production-
smoothing costs).
Ex. – Solution continued
– In an inventory model with a finite horizon, the
inventory left at the end of the last period should
be assigned a salvage value that is indicative of
the worth of the final period’s inventory.
– Sailco in Lingo
GRAPHICAL METHOD
Graphical Method
• Using a graphical presentation we can
represent all the constraints,
• The objective function, and the three types
of feasible points.
Solving Graphically for an
Optimal Solution
X2

1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint

Total production constraint:


X1+X2<=800

600 Infeasible

Production mix
constraint:
Production Feasible X1-X2<=450
Time
3X1+4X2<=2400
X1
600 800
We now demonstrate the search for
an optimal solution
Start at some arbitrary profit, say profit = $2,000...
X2 Then increase the profit, if possible...
1200
...and continue until it becomes infeasible

ion
eg
Profit
Profit = $=$5040
4, 000
3,
2, le R
800
ea sib
e f
l t h
600
cal
Re

X1

400 600 800


1200 X2
Let’s take a closer look at
the optimal point

800 Infeasible
600

Feasible
Feasible
region
region
X1
400 600 800
X2

1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint

Total production constraint:


X1+X2<=800

600
A (0,600)
Infeasible

Production mix
constraint:
Production Feasible B
(480,240) X1-X2<=450
Time C (550,100)

3X1+4X2<=2400E (0,0)
D (450,0)
X1
600 800
59
Graphical Method

• To determine the value for X1 and X2


at the optimal point, the two
equations of the binding constraint
must be solved.
The plastic constraint:
2X1+X2<=1200

2X1+X2=1200
3X1+4X2=2400 X1= 480
X2= 240

Production mix
Production constraint:
Time X1-X2<=450
3X1+4X2<=2400

2X1+X2=1200
X1-X2=450 X1= 550
X2= 100
Graphical Method
By Compensation on :
Max 8X1 + 5X2
(X1, X2) Objective fn
(0,0) 0
(450,0) 3600
(480,240) 5040
(550,100) 4900
(0,600) 3000

The maximum profit (5040) will be by producing:


Space Rays = 480 dozens, Zappers = 240 dozens
Type of feasible points

• Interior point: satisfies all constraint but


non with equality.
• Boundary points: satisfies all constraints,
at least one with equality
• Extreme point: satisfies all constraints, two
with equality.
X2

1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint

Total production constraint:


X1+X2<=800

600
Production Infeasible
Time
Production mix
3X1+4X2
constraint:
<=2400 (200, 200) (550,100) X1-X2<=450
*
(300,0) *
X1
600 800

Interior point Boundary Extreme point


64
If a linear programming has an optimal
solution , an extreme point is optimal.
Summery of graphical solution procedu

1- graph constraint to find the feasible point


2- set objective function equal to an arbitrary value
so that line passes through the feasible region.
3- move the objective function line parallel to itself
until it touches the last point of the feasible
region .
4- solve for X1 and X2 by solving the two equation
that intersect to determine this point
5- substitute these value into objective function to
determine its optimal solution.
MORE EXAMPLE
(The Reddy Mikks Company)

Reddy Mikks produces both interior and exterior paints


from two raw materials M1 and M2

Tons of raw material per ton of


Exterior paint Interior paint Maximum daily
availability (tons)
Raw material M1 6 4 24
Raw material M2 1 2 6________
Profit per ton ($1000) 5 4

-Daily demand for interior paint cannot exceed that of exterior paint by more
than 1 ton
-Maximum daily demand of interior paint is 2 tons
-Reddy Mikks wants to determine the optimum product mix of interior and
exterior paints that maximizes the total daily profit
Solution

Let x1 = tons produced daily of exterior paint


x2 = tons produced daily of interior paint
Let z represent the total daily profit (in thousands of dollars)

Objective:
Maximize z = 5 x1 + 4 x2
(Usage of a raw material by both paints) < (Maximum raw material
availability)

Usage of raw material M1 per day = 6x1 + 4x2 tons


Usage of raw material M2 per day = 1x1 + 2x2 tons

- daily availability of raw material M1 is 24 tons


- daily availability of raw material M2 is 6 tons
Restriction

6x1 + 4x2 < 24 (raw material M1)


x1 + 2x2 < 6 (raw material M2)

- Difference between daily demand of interior (x2) and


exterior (x1) paints does not exceed 1 ton,
so x2 - x1 < 1

- Maximum daily demand of interior paint is 2 tons,


so x2 < 2

- Variables x1 and x2 cannot assume negative


values,
so x1 > 0 , x2 > 0
Complete Reddy Mikks model

Maximize z = 5 x1 + 4 x2 (total daily profit)

subject to
6x1 + 4x2 < 24 (raw material M1)
x1 + 2x2 < 6 (raw material M2)
x2 - x1 < 1
x2 < 2
x1 > 0
x2 > 0

- Objective and the constraints are all linear functions in this


example.
Properties of the
LP model

Linearity implies that the LP must satisfy three basic properties:

1) Proportionality:
- contribution of each decision variable in both the objective
function and constraints to be directly proportional to the
value of the variable

2) Additivity:
- total contribution of all the variables in the objective function
and in the constraints to be the direct sum of the individual
contributions of each variable
Properties of the LP model:

3) Certainty:
- All the objective and constraint coefficients of the LP model are
deterministic (known constants)
- LP coefficients are average-value approximations of the probabilistic
distributions
- If standard deviations of these distributions are sufficiently small , then the
aproximation is acceptable
- Large standard deviations can be accounted for directly by using stochastic
LP algorithms or indirectly by applying sensitivity analysis to the optimum
solution
(Problem Mix Model)

- Two machines X and Y


- X is designed for 5-ounce bottles
- Y is designed for 10-ounce bottles
- X can also produce 10-ounce bottles with
some loss of efficiency
- Y can also produce 5-ounce bottles with some
loss of efficiency
Machine 5-ounce bottles 10-ounce bottles
X 80/min 30/min
Y 40/min 50/min
- X and Y machines can run 8 hours per day for 5 days
a week
- Profit on 5-ounce bottle is 20 paise
- Profit on 10-ounce bottle is 30 paise
- Weekly production of the drink cannot exceed
500,000 ounces
- Market can utilize 30,000 (5-ounce) bottles and 8000
(10-ounce) bottles per week
- To maximize the profit
Solution

Let x1 = number of 5-ounce bottles to be produced per week


x2 = number of 10-ounce bottles to be produced per week
Objective:
Maximize profit z = Rs (0.20x1 + 0.30x2)
Constraints:
- Time constraint on machine X,
(x1/80) + (x2/30) < 8 X 60 X 5 = 2400 minutes
- Time constraint on machine Y,
(x1/40) + (x2/50) < 8 X 60 X 5 = 2400 minutes
- Weekly production of the drink cannot exceed 500,000 ounces,
5x1 + 10x2 < 500,000 ounces
- Market demand per week,
x1 > 30,000 (5-ounce bottles)
x2 > 8,000 (10-ounce bottles)
(Production Allocation Model)

- Two types of products A and B


- Profit of Rs.4 on type A
- Profit of Rs.5 on type B
- Both A and B are produced by X and Y machines
Machine Machine
Products X Y
A 2 minutes 3 minutes
B 2 minutes 2 minutes

- Machine X is available for maximum 5 hours and 30 minutes during


any working day
- Machine Y is available for maximum 8 hours during any working day
- Formulate the problem as a LP problem.

77
Solution
Let x1 = number of products of type A
x2 = number of products of type B
Objective:
-Profit of Rs.4 on type A , therefore 4x1 will be the profit on selling x1
units of type A
-Profit of Rs.5 on type B, therefore 5x2 will be the profit on selling x2
units of type B

Total profit, z = 4x1 + 5x2


Constraints:

- Time constraint on machine X,


x x
2 1 + 2 2 < 330 minutes
- Time constraint on machine Y,
x x
3 1 + 2 2 < 480 minutes
- Non-negativity restrictions are,
x > 0 and x
1 2 >0
Complete LP model is,
Maximize z = 4x1 + 5x2

subject to
2x1 + 2x2 < 330 minutes
3x1 + 2x2 < 480 minutes
x1 > 0
x2 > 0
GRAPHICAL LP SOLUTION

The graphical procedure includes two steps:


1) Determination of the feasible solution space.
2) Determination of the optimum solution from
among all the feasible points in the solution space.

80
Solution of a Maximization
model (Reddy Mikks
model)
Step 1:
1) Determination of the feasible solution space:
- Find the coordinates for all the 6 equations of the
restrictions (only take the equality sign)
1
6x1 + 4x2 < 24
2
x1 + 2x2 < 6
3
x2 - x1 < 1
4
x2 < 2
5
x1 > 0 6
x2 > 0
81
Change all equations to equality signs
6x1 + 4x2 = 24 1

x1 + 2x2 = 6 2

x2 - x1 1 =
3

x = 2
2
4

x1 = 0 5

x2 = 0 6

82
1. Plot graphs of x1 = 0 and x2 = 0
2. Plot graph of 6x1 + 4x2 = 24 by using the
coordinates of the equation
3. Plot graph of x1 + 2x2 = 6 by using the
coordinates of the equation
4. Plot graph of x2 - x1 = 1 by using the coordinates
of the equation Plot graph of x2 = 2 by using the
coordinates of the equation

83
84
 Now include the inequality of all the 6 equations
 Inequality divides the (x1, x2) plane into two half spaces ,
one on each side of the graphed line
 Only one of these two halves satisfies the inequality
 To determine the correct side , choose (0,0) as a reference
point If (0,0) coordinate satisfies the inequality, then the
side in which (0,0) coordinate lies is the feasible half-space
, otherwise the other side is
 If the graph line happens to pass through the origin (0,0) ,
then any other point can be used to find the feasible half-
space
Step 2:
2) Determination of the optimum solution from
among
all the feasible points in the solution space:
-After finding out all the feasible half-spaces
of all the 6 equations, feasible space is
obtained by the line segments joining all the
corner points A, B, C,D ,E and F
- Any point within or on the boundary of the
solution space ABCDEF is feasible as it
satisfies all the constraints
- Feasible space ABCDEF consists of infinite 86
number of feasible points
- To find optimum solution identify the direction in which the maximum profit
increases , that is z = 5x1 + 4x2
- Assign random increasing values to z , z = 10 and z = 15
5x1 + 4x2 = 10
5x1 + 4x2 = 15
- Plot graphs of above two equations
- Thus in this way the optimum solution occurs at corner point C which is the
point in the solution space
- Any further increase in z that is beyond corner point C will put points
outside the boundaries of ABCDEF feasible space
- Values of x1 and x2 associated with optimum
1 corner2 point C are
determined by solving the equations and
1
6x1 + 4x2 = 24 2
x1 + 2x2 = 6
- x1 = 3 and x2 = 1.5 with z = 5 X 3 + 4 X 1.5 = 21
- So daily product mix of 3 tons of exterior paint and 1.5 tons of interior paint
produces the daily profit of $21,000 . 87
88
- Important characteristic of the optimum LP solution is that it is always
associated with a corner point of the solution space (where two lines
intersect)
- This is even true if the objective function happens to be parallel to a
constraint
- For example if the objective function is,
z = 6x + 4x
1 2 1
- The above equation is parallel to constraint of equation
- So optimum occurs at either corner point B or corner point C when
parallel
- Actually any point on the line segment BC will be an alternative
optimum
- Line segment BC is totally defined by the corner points B and C

89
- Since optimum LP solution is always associated with a corner
point of the solution space, so optimum solution can be found by
enumerating all the corner points as below:-
______Corner point ( x1 , x2 ) z_______
A (0,0) 0
B (4,0) 20
C (3,1.5) 21 (optimum solution)
D (2,2) 18
E (1,2) 13
F (0,1) 4

As number of constraints and variables increase, the number of


corner points also increases
Solution of a Minimization model
- Firm or industry has two bottling plants
- One plant located at Coimbatore and other
plant located at Chennai
- Each plant produces three types of drinks
Coca-cola , Fanta and Thumps-up
Number of bottles produced per day
by plant at
Coimbatore Chennai
Coca-cola 15,000 15,000
Fanta 30,000 10,000
Thumps-up 20,000 50,000
Cost per day 600 400
(in any unit)

- Market survey indicates that during the month of April there will be a
demand of 200,000 bottles of Coca-cola , 400,000 bottles of Fanta ,
and 440,000 bottles of Thumps-up
- For how many days each plant be run in April so as to minimize the
production cost , while still meeting the market demand?

92
Solution:
Let x1 = number of days to produce all the three types of bottles
by
plant at Coimbatore
x2 = number of days to produce all the three types of bottles
by
plant at Chennai
Objective:
Minimize z = 600 x1 + 400 x2
Constraint:
15,000 x1 + 15,000 x2 > 200,000
30,000 x1 + 10,000 x2 > 400,000
20,000 x1 + 50,000 x2 > 440,000
x1 > 0
94
Corner points (x1,x2) z = 600 x1 + 400 x2
A (0, 40) 16000
B (12,4) 8800
C (22,0) 13200

In 12 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are
produced by plant at Coimbatore
In 4 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are
produced by plant at Chennai
So minimum production cost is 8800 units to meet the market demand of all
the three types of bottles (Coca-cola, Fanta, Thumps-up) to be produced in
April

95
The Graphical Solution to a
Two-Variable LP Problem
• Any LP with only two variables can be
solved graphically.
– The variables are always labeled x1 and x2
and the coordinate axes the x1 and x2 axes.
X2

2 Satisfies 2x1 + 3x2 ≥ 6


Satisfies 2x1 + 3x2 ≤ 6
1

X1

-1 1 2 3 4

-1
Giapetto Problem

• Since the Giapetto LP has two variables, it


may be solved graphically.
• The feasible region is the set of all points
satisfying the constraints
2 x1 + x2 ≤ 100 (finishing constraint)
x1 + x2 ≤ 80 (carpentry constraint)
x1 ≤ 40 (demand constraint)
x1 ≥ 0 (sign restriction)
x2 ≥ 0 (sign restriction)
• The set of points satisfying the Giapetto LP
is bounded by the five sided polygon
DGFEH. Any point on or in the interior of
this polygon (the shade area) is in the
feasible region.
X2
B

finishing constraint Feasible Region

demand constraint

z = 100
carpentry constraint

F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
Giapetto Problem
• Having identified the feasible region for the Giapetto
LP, a search can begin for the optimal solution which
will be the point in the feasible region with the largest
z-value.
• To find the optimal solution, graph a line on which the
points have the same z-value. In a max problem, such
a line is called an isoprofit line while in a min problem,
this is called the isocost line. The figure shows the
isoprofit lines for z = 60, z = 100, and z = 180
• Lindo Example
• A constraint is binding if the left-hand and right-hand side
of the constraint are equal when the optimal values of
the decision variables are substituted into the constraint.
– In the Giapetto LP, the finishing and carpentry constraints are
binding.
• A constraint is nonbinding if the left-hand side and the
right-hand side of the constraint are unequal when the
optimal values of the decision variables are substituted
into the constraint.
– In the Giapetto LP, the demand constraint for wooden soldiers
is nonbinding since at the optimal solution (x1 = 20), x1 < 40.
• A set of points S is a convex set if the line segment
jointing any two pairs of points in S is wholly contained
in S.
• For any convex set S, a point p in S is an extreme point
if each line segment that lies completely in S and
contains the point P has P as an endpoint of the line
segment.
• Extreme points are sometimes called corner points,
because if the set S is a polygon, the extreme points
will be the vertices, or corners, of the polygon.
– The feasible region for the Giapetto LP will be a convex set.
• It is possible for an LP’s feasible region to be empty,
resulting in an infeasible LP.
• Because the optimal solution to an LP is the best
point in the feasible region, an infeasible LP has no
optimal solution.
• For a max problem, an unbounded LP occurs if it is
possible to find points in the feasible region with
arbitrarily large z-values, which corresponds to a
decision maker earning arbitrarily large revenues or
profits.
• For a minimization problem, an LP is unbounded if there are
points in the feasible region with arbitrarily small z-values.
• Every LP with two variables must fall into one of the
following four cases.
– The LP has a unique optimal solution.
– The LP has alternative or multiple optimal solutions: Two or more
extreme points are optimal, and the LP will have an infinite number
of optimal solutions.
– The LP is infeasible: The feasible region contains no points.
– The LP unbounded: There are points in the feasible region with
arbitrarily large z-values (max problem) or arbitrarily small z-values
(min problem).
• Class Problem
SENSITIVITY ANALYSIS USING
GRAPHICAL METHOD
A Graphical Introduction to
Sensitivity Analysis
• Sensitivity analysis is concerned with how changes in
an LP’s parameters affect the optimal solution.
• Reconsider the Giapetto problem from Chapter 3.
max z = 3x1 + 2x2
2 x1 + x2 ≤ 100 (finishing constraint)
x1 + x2 ≤ 80 (carpentry constraint)
x1 ≤ 40 (demand constraint)
x1,x2 ≥ 0 (sign restriction)

Where:
• x1 = number of soldiers produced each week
• x2 = number of trains produced each week.
Giapeto Problem
• The optimal solution for this LP was z X2

= 180, x1=20, x2= 60 (point B) and it

100
finishing constraint

has x1, x2, and s3 (the slack variable for


Slope = -2

A Feasible Region

80
the demand constraint) as basic demand constraint

variables. Isoprofit line z = 120

60
B Slope = -3/2
• How would changes in the problem’s
objective function coefficients or D

40
carpentry constraint

right-hand side values change this Slope = -1

optimal solution?

20
C

10 20 40 50 60 80 X1
• Graphical analysis of the effect of a change in an
objective function value for the Giapetto LP shows:
– By inspection, we can see that making the slope of the
isoprofit line more negative than the finishing constraint
(slope = -2) will cause the optimal point to switch from
point B to point C.
– Likewise, making the slope of the isoprofit line less
negative than the carpentry constraint (slope = -1) will
cause the optimal point to switch from point B to point
A.
– Clearly, the slope of the isoprofit line must be between -
2 and -1 for the current basis to remain optimal.
• A graphical analysis can also be used to determine
whether a change in the rhs of a constraint will
make the current basis no longer optimal. For
example, let b1 = number of available finishing
hours.
• The current optimal solution (point B) is where the
carpentry and finishing constraints are binding.
• If the value of b1 is changed, then as long as where
the carpentry and finishing constraints are binding,
the optimal solution will still occur where the
carpentry and finishing constraints intersect.
X2
finishing constraint, b1 = 120

100
• In the Giapetto problem to the finishing constraint, b1 = 100

right, we see that if b1 > 120, x1 A


Isoprofit line z = 120

80
will be greater than 40 and will demand constraint

violate the demand constraint. finishing constraint, b1 = 80

60
Also, if b1 < 80, x1 will be less than B

0 and the nonnegativity constraint D


for x1 will be violated.

40
carpentry constraint

• Therefore: 80 ≤b1≤ 120 Feasible Region

20
C
• The current basis remains optimal
for 80 ≤b1≤ 120, but the decision
variable values and z-value will 20 40 50 60 80 X1

change.
• It is often important to determine how a change in a constraint’s
rhs changes the LP’s optimal z-value.
• The shadow price for the ith constraint of an LP is the amount by
which the optimal z-value is improved if the rhs of the ith
constraint is increased by one.
– This definition applies only if the change in the rhs of constraint i
leaves the current basis optimal.
• For the finishing constraint, 100 +  finishing hours are available.
– The LP’s optimal solution is then
x1 = 20 +  and x2 = 60 –  with z = 3x1 + 2x2 = 3(20 + ) + 2(60 - ) =
180 + .
– Thus, as long as the current basis remains optimal, a one-unit
increase in the number of finishing hours will increase the optimal z-
value by $1. So, the shadow price for the first (finishing hours)
constraint is $1.
Sensitivity analysis is important for several reasons:
– Values of LP parameters might change. If a parameter
changes, sensitivity analysis shows it is unnecessary to
solve the problem again.
• For example in the Giapetto problem, if the profit contribution
of a soldier changes to $3.50, sensitivity analysis shows the
current solution remains optimal.
– Uncertainty about LP parameters.
• In the Giapetto problem for example, if the weekly demand for
soldiers is at least 20, the optimal solution remains 20 soldiers
and 60 trains. Thus, even if demand for soldiers is uncertain,
the company can be fairly confident that it is still optimal to
produce 20 soldiers and 60 trains.
The Computer and
Sensitivity Analysis
• If an LP has more than two decision variables,
the range of values for a rhs (or objective
function coefficient) for which the basis remains
optimal cannot be determined graphically.
• These ranges can be computed by hand but this
is often tedious, so they are usually determined
by a packaged computer program.
• LINDO will be used and the interpretation of its
sensitivity analysis discussed.
Example 1: Winco Products 1
• Winco sells four types of products. The resources
needed to produce one unit of each are known.

Product 1 Product 2 Product 3 Product 4

Raw material 2 3 4 7

Hours of labor 3 4 5 6

Sales price $4 $6 $7 $8

• To meet customer demand, exactly 950 total units


must be produced.
• Customers demand that at least 400 units of product 4
be produced.
Example 1: Solution
• Let xi = number of units of product i
produced by Winco.
• The Winco LP formulation:
max z = 4x + 6x +7x + 8x
1 2 3 4

s.t. x1 + x2 + x3 + x4 = 950
x4 ≥ 400
2x1 + 3x2 + 4x3 + 7x4 ≤ 4600
3x1 + 4x2 + 5x3 + 6x4 ≤ 5000
x1,x2,x3,x4 ≥ 0
Ex. 1 – Solution continued

MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
• The LINDO output. 2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400
• Reduced cost is the amount 4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000

the objective function


END

LP OPTIMUM FOUND AT STEP 4


coefficient for variable i OBJECTIVE FUNCTION VALUE
would have to be increased 1) 6650.000

for there to be an VARIABLE


X1 0.000000
VALUE
1.000000
REDUCED COST

alternative optimal solution. X2


X3
400.000000
150.000000
0.000000
0.000000
X4 400.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000

NO. ITERATIONS= 4
Ex. 1 – Solution
continued
RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


• LINDO sensitivity analysis VARIABLE CURRENT ALLOWABLE ALLOWABLE

output X1
COEF
4.000000
INCREASE
1.000000
DECREASE
INFINITY
• Allowable range (w/o X2 6.000000 0.666667 0.500000

changing basis) for the x2 X3


X4
7.000000
8.000000
1.000000
2.000000
0.500000
INFINITY
coefficient (c2) is: 5.50 £ c2 £
6.667 RIGHTHAND SIDE RANGES
ROW CURRENT ALLOWABLE ALLOWABLE
• Allowable range (w/o RHS INCREASE DECREASE

changing basis) for the rhs 2 950.000000 50.000000 100.000000


3 400.000000 37.500000 125.000000
(b1) of the first constraint is: 4 4600.000000 250.000000 150.000000

850 £ b1 £ 1000 5 5000.000000 INFINITY 250.000000


Ex. 1 – Solution continued
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
• Shadow prices are shown in 2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400

the Dual Prices section of 4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600


5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
END
LINDO output. LP OPTIMUM FOUND AT STEP 4
• Shadow prices are the OBJECTIVE FUNCTION VALUE

amount the optimal z-value


1) 6650.000

VARIABLE VALUE REDUCED COST


improves if the rhs of a X1
X2
0.000000
400.000000
1.000000
0.000000
constraint is increased by X3
X4
150.000000
400.000000
0.000000
0.000000
one unit (assuming no ROW SLACK OR SURPLUS DUAL PRICES

change in basis). 2)
3)
0.000000
0.000000
3.000000
-2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000

NO. ITERATIONS= 4
• Shadow price signs

1. Constraints with ³ symbols will always have


nonpositive shadow prices.
2. Constraints with £ will always have nonnegative
shadow prices.
3. Equality constraints may have a positive, a
negative, or a zero shadow price.
• For any inequality constraint, the product of the
values of the constraint’s slack/excess variable and
the constraint’s shadow price must equal zero.
– This implies that any constraint whose slack or excess
variable > 0 will have a zero shadow price.
– Similarly, any constraint with a nonzero shadow price
must be binding (have slack or excess equaling zero).
– For constraints with nonzero slack or excess,
Type relationships
of Constraint are detailed
Allowable infor
Increase therhstable below:
Allowable Decrease for rhs

≤ ∞ = value of slack

≥ = value of excess ∞
• When the optimal solution is degenerate (a bfs is
degenerate if at least one basic variable in the optimal
solution equals 0), caution must be used when interpreting
the LINDO output.
• For an LP with m constraints, if the optimal LINDO output
indicates less than m variables are positive, then the optimal
solution is degenerate bfs.
MAX 6 X1 + 4 X2 + 3 X3 + 2 X4
SUBJECT TO
2) 2 X1 + 3 X2 + X3 + 2 X4 <= 400
3) X1 + X2 + 2 X3 + X4 <= 150
4) 2 X1 + X2 + X3 + 0.5 X4 <= 200
5) 3 X1 + X2 + X4 <= 250
• Since the LP has four constraints and in the optimal solution only
two variables are positive, the optimal solution is a degenerate bfs.

LP OPTIMUM FOUND AT STEP 3


OBJECTIVE FUNCTION VALUE
1) 700.0000
VARIABLE VALUE REDUCED COST
X1 50.000000 0.000000
X2 100.000000 0.000000
X3 0.000000 0.000000
X4 0.000000 1.500000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 0.500000
3) 0.000000 1.250000
4) 0.000000 0.000000
5) 0.000000 1.250000
RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 6.000000 3.000000 3.000000
X2 4.000000 5.000000 1.000000
X3 3.000000 3.000000 2.142857
X4 2.000000 1.500000 INFINITY

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 400.000000 0.000000 200.000000
3 150.000000 0.000000 0.000000
4 200.000000 INFINITY 0.000000
5 250.000000 0.000000 120.000000
• LINDO TABLEAU command
indicates the optimal basis is
RV = {x1,x2,x3,s4}.

THE TABLEAU
ROW (BASIS) X1 X2 X3 X4 SLK 2
1 ART 0.000 0.000 0.000 1.500 0.500
2 X2 0.000 1.000 0.000 0.500 0.500
3 X3 0.000 0.000 1.000 0.167 -0.167
4 SLK 4 0.000 0.000 0.000 -0.500 0.000
5 X1 1.000 0.000 0.000 0.167 -0.167

ROW SLK 3 SLK 4 SLK 5


1 1.250 0.000 1.250 700.000
2 -0.250 0.000 -0.250 100.000
3 0.583 0.000 -0.083 0.000
4 -0.500 1.000 -0.500 0.000
5 0.083 0.000 0.417 50.000
• Oddities that may occur when the optimal solution found
by LINDO is degenerate are:
– In the RANGE IN WHICH THE BASIS IS UNCHANGED at least one
constraint will have a 0 AI or AD. This means that for at least
one constraint the DUAL PRICE can tell us about the new z-
value for either an increase or decrease in the rhs, but not
both.
– For a nonbasic variable to become positive, a nonbasic
variable’s objective function coefficient may have to be
improved by more than its RECDUCED COST.
– Increasing a variable’s objective function coefficient by more
than its AI or decreasing it by more than its AD may leave the
optimal solution the same.
Managerial Use of
Shadow Prices

• The managerial significance of shadow


prices is that they can often be used to
determine the maximum amount a
manger should be willing to pay for an
additional unit of a resource.
Example 5: Winco
Products 2

• Reconsider the Winco to the right.


• What is the most Winco should be
willing to pay for additional units of raw
material or labor?
Example 5: Solution
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
• The shadow price for raw material SUBJECT TO
2) X1 + X2 + X3 + X4 = 950
constraint (row 4) shows an extra 3) X4 >= 400
4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
unit of raw material would END
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000

increase revenue $1. LP OPTIMUM FOUND AT STEP 4


– Winco could pay up to $1 for an OBJECTIVE FUNCTION VALUE
extra unit of raw material and be 1) 6650.000

as well off as it is now. VARIABLE


X1
VALUE
0.000000
REDUCED COST
1.000000
• Labor constraint’s (row 5) shadow X2
X3
400.000000
150.000000
0.000000
0.000000

price is 0 meaning that an extra X4 400.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


hour of labor will not increase 2) 0.000000 3.000000
3) 0.000000 -2.000000
revenue. 4) 0.000000 1.000000
5) 250.000000 0.000000
– So, Winco should not be willing
NO. ITERATIONS= 4
to pay anything for an extra hour
of labor.
What happens to the Optimal z-Value if the
Current Basis Is No Longer Optimal?

• Shadow prices were used to determine the new


optimal z-value if the rhs of a constraint was
changed but remained within the range where
the current basis remains optimal.
– Changing the rhs of a constraint to values where the
current basis is no longer optimal can be addressed
by the LINDO PARAMETRICS feature.
– This feature can be used to determine how the
shadow price of a constraint and optimal z-value
change.
• The use of the LINDO PARAMETICS feature is
illustrated by varying the amount of raw material in
the Winco example.
– Suppose we want to determine how the optimal z-value
and shadow price change as the amount of raw material
varies between 0 and 10,000 units.
– With 0 raw material, we then obtain from the RANGE
and SENSITIVTY ANALYSIS results that show Row 4 has
an ALLOWABLE INCREASE of -3900. This indicates at
least 3900 units of raw material are required to make
the problem feasible.
• Raw Material rhs = 3900 optimal
solution

OBJECTIVE FUNCTION VALUE RANGES IN WHICH THE BASIS IS UNCHANGED:

1) 5400.000 OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
VARIABLE VALUE REDUCED COST COEF INCREASE DECREASE
X1 550.000000 0.000000 X1 4.000000 1.000000 INFINITY
X2 0.000000 0.000000 X2 6.000000 INFINITY 0.500000
X3 0.000000 1.000000 X3 7.000000 1.000000 INFINITY
X4 400.000000 0.000000 X4 8.000000 6.000000 INFINITY

ROW SLACK OR SURPLUS DUAL PRICES RIGHTHAND SIDE RANGES


2) 0.000000 0.000000 ROW CURRENT ALLOWABLE ALLOWABLE
3) 0.000000 -6.000000 RHS INCREASE DECREASE
4) 0.000000 2.000000 2 950.000000 0.000000 183.333328
5) 950.000000 0.000000 3 400.000000 0.000000 137.500000
4 3900.000000 550.000000 0.000000
THE TABLEAU 5 5000.000000 INFINITY 950.000000

ROW (BASIS) X1 X2 X3 X4 SLK 3 SLK 4 SLK 5


1 ART 0.000 0.000 1.000 0.000 6.000 2.000 0.000 5400.000
2 X1 1.000 0.000 -1.000 0.000 -4.000 -1.000 0.000 550.000
3 X4 0.000 0.000 0.000 1.000 -1.000 0.000 0.000 400.000
4 X2 0.000 1.000 2.000 0.000 5.000 1.000 0.000 0.000
5 SLK 5 0.000 0.000 0.000 0.000 -2.000 -1.000 1.000 950.000
ART ART 0.000 0.000 1.000 0.000 6.000 2.000 0.000 0.000
• Changing Row 4’s rhs to 3900,
resolving the LP, and selecting the
REPORTS PARAMTERICS feature.
– In this feature we choose Row 4, setting
the Value to 10000, and select text
output.

RIGHTHANDSIDE PARAMETRICS REPORT FOR ROW: 4

VAR VAR PIVOT RHS DUAL PRICE OBJ


OUT IN ROW VAL BEFORE PIVOT VAL
3900.00 2.00000 5400.00
X1 X3 2 4450.00 2.00000 6500.00
SLK 5 SLK 3 5 4850.00 1.00000 6900.00
X3 SLK 4 2 5250.00 -0.333067E-15 6900.00
10000.0 -0.555112E-16 6900.00
• LINDO Parametric Feature
Graphical Output (z-value vs.
Raw Material rhs from 3900 to
10000)
• For any LP, the graph of the optimal objective function value as a
function a rhs will be a piecewise linear function. The slope of
each straight line segment is just the constraint’s shadow price.
• For < constraints in a maximization LP, the slope of each segment
must be nonnegative and the slopes of successive line segments
will be nonincreasing.
• For a > constraint, in a maximization problem, the graph of the
optimal function will again be piecewise linear function. The
slope of each line segment will be nonpositive and the slopes of
successive segments will be nonincreasing
• A graph of the optimal objective function
value as a function of a variable’s objective
function coefficient can be created.
• When the slope of the line is portrayed
graphically, the graph is a piecewise linear
function.
• The slope of each line segment is equal to
the value of x1 in the optimal solution.
Optimal z-Value vs c1
440 500

• In a maximization LP, the slope


of the graph of the optimal z-
400
value as a function of an
objective function coefficient
will be nondecreasing. 300

Optimal z-Value
• In a minimization LP, the slope z c 1
of the graph of the optimal z-
200
value as a function of an
objective function coefficient
will be nonincreasing. 100

0
0 2 4 6 8 10
0 c1 10
C1
z-value
Graphical Introduction to Sensitivity
Analysis (Giapetto Problem)

• Sensitivity analysis is concerned with how changes in an


LP’s parameters affect the optimal solution.

• The optimal solution to the Giapetto problem was z =


180, x1 = 20, x2 = 60 (Point B in the figure to the right)
and it has x1, x2, and s3 (the slack variable for the demand
constraint) as basic variables.

• How would changes in the problem’s objective function


coefficients or the constraint’s right-hand sides change
this optimal solution?
X2
Giapetto Problem

100
finishing constraint
• If the isoprofit line is flatter than Slope = -2
the carpentry constraint, Point
Feasible Region
A(0,80) is optimal. A

80
• Point B(20,60) is optimal if the demand constraint
isoprofit line is steeper than the
carpentry constraint but flatter Isoprofit line z = 120

60
than the finishing constraint. B Slope = -3/2
• Finally, Point C(40,20) is optimal if
the slope of the isoprofit line is D
steeper than the slope of the

40
carpentry constraint
finishing constraint. Slope = -1

• Since a typical isoprofit line is c1x1


+ 2x2 = k, we know the slope of 20
C
the isoprofit line is just -c1/2.

20 40 50 60 80 X1
• A graphical analysis can also be used to
determine whether a change in the rhs of a
constraint will make the basis no longer
optimal.

• In a constraint with a positive slack (or positive


excess) in an LPs optimal solution, if we change
the rhs of the constraint to a value in the range
where the basis remains optimal, the optimal
solution to the LP remains the same.
• It is important to determine how a constraint’s rhs
changes the optimal z-value.

• The shadow price for the ith constraint of an LP is


the amount by which the optimal z-value is improved
if the rhs of the ith constraint is increased by one.
This definition applies only if the change in the rhs of
constraint i leaves the current basis optimal.
• Sensitivity analysis is important because
– Values of LP parameters might change.
• If a parameter changes, sensitivity analysis
shows it is unnecessary to solve the problem
again.
– Uncertainty about LP parameters.
• Even if demand is uncertain, the company can
be fairly confident that it can still produce
optimal amounts of products.
Some Important
Formulas

• An LP’s optimal tableau can be expressed in


terms of the LP’s parameters.
• The formulas are used in the study of sensitivity
analysis, duality, and advanced LP topics.
• When solving a max problem that has been
prepared for solution by the Big M method with
the LP having m constraints and n variables.
Although some of the variables may be slack,
excess, or artificial, they are labeled x1, x2, …,xn.
• The LP may then be written as
max z = c1x1 + c2x2 + … + cnxn
s.t. a11x1 + a12x2 + … + a1nxn = b1
a21x1 + a22x2 + … + a2nxn = b2
…. …. … … …
amx1 + am2x2 + … + amnxn = bm
xi ≥ 0 (i = 1, 2, …, n)
• BV = {BV1, BV2, …, BVn} to be the set of basic
variables in the optimal tableau.
• NBV = {NBV1, NBV2, …, NBVn} the set of nonbasic
variables in the optimal tableau.
• cBV is the 1 x m row vector [cBV1 cBV2 ∙∙∙ cBVm].
• cNBV is the 1 x (n-m) row vector whose elements are
the coefficients of the nonbasic variables (in the
order of NBV).
• The m x m matrix B is the matrix whose jth column is
the column for BVj in the initial tableau.
• Aj is the column (in the constraints) for the variable
xj.
• N is the m x (n-m) matrix whose columns are the
columns for the nonbasic variables (in NBV order)
in the initial tableau.
• The m x 1 column vector b is the right-hand side of
the constraints in the initial tableau.
• Matrix algebra can be used to determine how an
LP’s optimal tableau (with the set of basic variables
BV) is related to the original LP.
• The initial LP can now be written as
z = cBVxBV + cNBVxNBV
s.t. BxBV + NxNBV = b
xBV, xNBV ≥ 0

cj
• Let be the ccoefficient
 c Bof1xj,
a then
 c it can be shown
j BV j j
that

and
Right-hand side of optimal tableau’s row 0=cBVB-1b
• Coefficient of slack variable si in optimal row 0
= ith element of cBVB-1
• Coefficient of excess variable ei in optimal row 0
= -(ith element of cBVB-1)
• Coefficient of artificial variable ai in optimal row
0 = (ith element of cBVB-1) + M (max problem)
• Right-hand side of optimal row 0 = cBVB-1b
Sensitivity Analysis

• How do changes in an LP’s parameters (objective


function coefficients, right-hand sides, and
technological coefficients) change the optimal
solution?
– Let BV be the set of basic variables in the optimal tableau.
– Given a change in an LP, determine if the BV remains
optimal.
• we know the simplex tableau (for a max problem) for
a set of basic variables is optimal if and only if each
constraint has a nonnegative rhs and each variable
has a nonnegative coefficient.
• We can use the following procedure to determine if any change in
the LP will cause the BV to no longer be optimal.
– Step 1 Using the formulas of Section 6.2 determine how changes in the
LP’s parameters change the right hand side row 0 of the optimal tableau
(the tableau having BV as the set of basic variables).
– Step 2 If each variable in row 0 has a nonnegative coefficient and each
constraint has a nonnegative rhs, BV is still optimal. Otherwise, BV is no
longer optimal.
• If BV is no longer optimal, find the new optimal solution by using the
formulas to recreate the entire tableau for BV and then continuing
the simplex algorithm with the BV tableau as your starting tableau.
• There can two reasons why a change in an LP’s
parameters cause BV to no longer be optimal.
– A variable (or variables) in row 0 may have a negative
coefficient. In this case, a better (larger z-value) bfs
can be obtained by pivoting in a nonbasic variable
with a negative coefficient in row 0. If this occurs, the
BV is now a suboptimal basis.
– A constraint (or constraints) may now have a negative
rhs. In this case, at least one member of BV will now
be negative and BV will no longer yield a bfs. If this
occurs, we say they BV is now an infeasible basis.
• Six types of changes in an LP’s parameters
change the optimal solution.
– Changing the objective function coefficient of a
nonbasic variable.
– Changing the objective function coefficient of a
basic variable.
– Changing the right-hand side of a constraint.
– Changing the column of a nonbasic variable.
– Adding a new variable or activity.
– Adding a new constraint.
Sensitivity Analysis When More Than One
Parameter Is Changed: The 100% Rule

• LINDO output can be used to determine whether the current basis


remains optimal when more than one objective function coefficient or
right-hand side is changed.
• Depending on whether the objective function coefficient of any
variable with a zero reduced cost in the optimal tableau is changed,
there are two cases to consider:

Case 1 – All variables whose objective function coefficients


are changed have nonzero reduced costs in the optimal row
0.
The current basis remains optimal if and only if the objective
function coefficient for each variable remains within the allowable
range given on the LINDO print out.
If the current basis remains optimal, both the values of the
decision variables and objective function remain unchanged. If the
objective coefficient for any variable is outside the allowable
range, the current basis is no longer optimal.
– Case 2 – At least one variable whose objective
function coefficient is changed has a reduced
cost of zero.
• Depending on whether any of the
constraints whose right-hand side are being
modified are binding constraints, there are
two cases to consider.
– Case 1 – All constraints whose right-hand sides are being
modified are nonbinding constraints.
• The current basis remains optimal if and only if each right-hand
side remains within its allowable range.
• Then the values of the decision variables and optimal objective
function remain unchanged.
• If the right-hand side for any constraint is outside its allowable
range, the current basis is no longer optimal.
– Case 2 – At least one of the constraints whose right-hand
side is being modified is a binding constraint (that is, has
zero slack or excess).
Reference
• Wayne L. Winston, Munirpallam Venkataramanan.
(2003). Introduction to Mathematical
Programming: Operations Research. 4th Edition.
Duxbury Press. ISBN-13: 978-0534359645
• Taha, Hamdy A., (2007). Operation Research : An
Introduction. 8th Edition, Pearson Prentice Hall,
New Jersey . ISBN : 0-13-188923-0
Thank You

You might also like