Chapter 07
Chapter 07
LP has been applied in many areas over the past 50 years All LP problems have 4 properties in common
1. All problems seek to maximize or minimize some
Development of a production schedule that will quantity,
tit usually
ll profit
fit or costt (th
(the objective ti )
bj ti ffunction)
function
satisfy future demands for a firm’s production 2. The presence of restrictions or constraints that limit
while minimizingg total p
production and inventory
y the degree to which we can pursue our objective
costs
3. There must be alternative courses of action to choose
Determination of grades of petroleum products to
yield the maximum profit from
Selection of different blends of raw materials to 4. The objective and constraints in problems must be
feed mills to produce finished feed combinations expressed in terms of linear equations or inequalities
at minimum cost 2A + 5B = 10 (linear equation)
Determination of a distribution system that will 3A + 2B < 25 (linear inequality)
minimize total shipping cost from several 2A2 + 5B3 + 3AB < 10 ((non-linear inequality)
q y))
warehouses
h to
t various
i market
k t llocations
ti
7–3 7–4
Requirements of a Linear
Programming Problem LP Properties and Assumptions
a1 X1 + a2 X 2 + ...... + an X n = b 1. Certainty
2. Proportionality
3. Additivity
4. Divisibility
Table 7.1 5. Nonnegative variables
7–5 7–6
One of the most common LP applications is the The Flair Furniture Company produces inexpensive
product mix problem tables and chairs
Two
T or more products
d t are produced
d d using
i B th products
Both d t require
i a certain
t i number
b off h
hours off
limited resources such as personnel, machines, carpentry work and certain number of labor hours in
and raw materials tthe
e pa
painting
t gaand
d varnishing
a s g depa
department
t e t
The profit that the firm seeks to maximize is Each table takes 4 hours of carpentry and 2 hours of
based on the profit contribution per unit of each painting and varnishing
product
d t Each chair requires 3 hours of carpentry and 1 hour
The company would like to determine how of painting and varnishing
many units of each product it should produce There are 240 hours of carpentry time and 100 hours
so as to maximize overall profit given its limited of painting and varnishing time available each week
resources Each table yields a profit of $70 and each chair a
profit of $50
7–9 7 – 10
T do
To d this
thi we plotl t each
h constraint
t i t equation
ti – Thi Axis
This A i Represents
R t the
th Constraint
C t i tT≥0
80 –
Chairs
on a graph (2D coordinate frame – Fig. 7.1) –
Th nonnegativity
The t i t mean that
th t we
umber of C
ti it constraints 60 –
are always working in the first (or northeast) –
quadrant (see Fig. 7.1) 40 – This Axis Represents the
Nu
– Constraint C ≥ 0
We start by graphing the equality portion of 20 –
the first ((carpentry
p y hour)) constraint –
4T + 3C = 240 |–
0
| |
20
| |
40
| |
60
| |
80
| |
100
|
T
It is a straight line and we need to find any Figure 7.1 Number of Tables
two points to draw the line
7 – 17 7 – 18
40 –
hairs
Any point above the plot will violate
The point (30, 40) lies on the line and exactly –
mber of Ch
th restriction
the t i ti
satisfies the constraint 60 –
4(30) + 3(40) = 240 –
(30, 40) (70, 40)
40 –
Num
The point (30, 20) lies below the line and satisfies
–
the constraint
20 –
4(30) + 3(20) = 180 ≤ 240 – (30, 20)
The point (70, 40) lies above the line and does not |– | | | | | | | | | | |
0 20 40 60 80 100
satisfy the constraint T
Number of Tables
4(70) + 3(40) = 400 > 240 Figure 7.3
7 – 21 7 – 22
Chairs
Graph of painting and varnishing
2T + 1C ≤ 100 – constraint equation – the shaded
umber of C
60 – area represents all the possible
We start by graphing the equality portion – solution points
of the constraint: 40 –
Nu
–
(T = 50, C = 0)
2T + 1C = 100 20 –
–
The two points at which the line intercepts |– | | | | | | | | | | |
Chairs
constraints simultaneously Painting/Varnishing Constraint
–
A new graph is drawn to show both constraint
umber of C
60 –
plots (Fig. 7.5) –
The feasible region (or area of feasible solutions)
solutions is 40 –
Nu
where all constraints are satisfied – i.e. the –
Carpentry Constraint
overlapped area 20 – Feasible
g
– Region
A point
Any i t inside
i id this
thi region
i isi a feasible
f ibl solution
l ti |– | | | | | | | | | | |
Any point outside the region is an infeasible 0 20 40 60 80 100 T
solution Figure 7.5 Number of Tables
7 – 25 7 – 26
7 – 27 7 – 28
Isoprofit Line Solution Method Isoprofit Line Solution Method
Once the feasible region has been graphed, we For Flair Furniture, choose a profit of $2,100
$
need to find the optimal solution from the many The objective function is then
possible solutions $2,100
$2 100 = 70T + 50C
It is the point lying in the feasible region that produces
the highest profit
Solving for the axis intercepts which are (0, 42)
and (30
(30, 0)
0), we can draw the graph
The speediest way to do this is to use the isoprofit
line method The line represents all combinations of (T, C) that
yield a total profit of $2,100
Starting with a small but possible profit value,
value we
graph the objective function (a straight line) This is obviously not the best possible solution
We move the objective
j function line in the Further graphs can be created using larger profits
direction of increasing profit while maintaining the The further away we move from the origin, the
slope (isoprofit lines are parallel to each other) larger the profit will be
The
Th last
l t point
i t the
th line
li touches
t h ini the
th feasible
f ibl The highest profit ($4,100)
($4 100) will be generated when
region is the optimal solution the isoprofit line passes through the point (30, 40)
7 – 29 7 – 30
Chairs
– – $2,800
, = $70T + $50C
umber of C
umber of C
60 – 60 –
– $2,100 = $70T + $50C – $2,100 = $70T + $50C
(0, 42)
40 – 40 –
Nu
Nu
7 – 31 7 – 32
Isoprofit Line Solution Method Corner Point Solution Method
C
Optimal solution to the A second
d approach
h tto solving
l i LP problems
bl
100 – Flair Furniture problem employs the corner point method
– It is a simpler technique but involves
80 – looking at the profit at every corner point
Chairs
7 – 33 7 – 34
–
Point 3 : (T = 30, C = 40) Profit = $70(30) + $50(40) = $4,100
umber of C
60 –
– Because Point 3 returns the highest profit, this
3 is the optimal solution
40 –
Nu
7 – 37 Table 7.3 7 – 38
Most organizations have access to First select the Linear Programming module
software to solve big LP problems Specify the number of constraints (non-negativity
is assumed)
ass med)
While there are differences between
Specify the number of decision variables
software implementations, the approach
eachh takes
t k ttowardsd hhandling
dli LP is
i Specify whether the objective is to be maximized
or minimized
basically the same
For the Flair Furniture p
problem there are two
Once
O you are experienced
i d in
i dealing
d li with
ith constraints, two decision variables, and the
computerized LP algorithms, you can objective is to maximize profit
easily adjust to minor changes
7 – 39 7 – 40
Using QM for Windows Using QM for Windows
Computer screen for input of data Computer screen for input of data
7 – 41 7 – 42
Program 7.1C
Program 7.1D
7 – 43 7 – 44
Using Excel’s Solver Command to Using Solver to Solve the Flair
Solve LP Problems Furniture Problem
The Solver tool in Excel can be used to find Recall the model for Flair Furniture is
solutions to
Maximize profit = $70T + $50C
LP problems
bl
Subject to 4T + 3C ≤ 240
Integer programming problems
2T + 1C ≤ 100
Noninteger programming problems
Solver may be sensitive to the initial values it uses To use Solver, it is necessary to enter formulas
Solver is limited to 200 variables and 100 based on the initial model
constraints Program 7.2A shows how the data and formulas
It can be used for small real world problems
p are entered into Solver to solve this problem
p
Add-ins like What’sBest! Can be used to expand The following slide details the steps in creating
Solver’s capabilities the Solver model
7 – 45 7 – 46
Using Solver to Solve the Flair Using Solver to Solve the Flair
Furniture Problem Furniture Problem
Program 7.2A
7 2A
1. Modify the variable names and the
constraint names if needed
2. Enter the coefficients for the objective
function and constraints
3. Indicate constraint signs (≤, =, and ≥) for
display purposes only
4. Input the right-hand side values for each
constraint
5. Initialize the values of the variables to 1s to
make it easier to check the formula
7 – 47 7 – 48
Using Solver to Solve the Flair Using Solver to Solve the Flair
Furniture Problem Furniture Problem
Once the model has been entered
entered, the following
steps can be used to solve the problem 3. The Set Target Cell contains the cell that is used
1A. In Excel 2003,
1A 2003 select Tools—
Tools—Solver to calculate the value of the objective
j function.
1B. In Excel 2007, select the Data tab and then select 4. The By Changing Cells box contains the cells that
Solver in the Analysis
y group
g p will hold the values for the variables
5. The Subject to the Constraints box contains the
If Solver does not appear in the indicated place, constraints for the model
follow the installation instructions in the text 6 In the Solver Parameters window,
6. window click Options
and check Assume Linear Model and check
2. Once Solver has been selected, a window will Assume Non-
Non-negative
negative, as illustrated in Program
open for
f th the iinputt off th
the S
Solver
l P
Parameters.
t Make
M k 7.2C, then click OK
sure all the parameters set by Solver are correct
7 – 49 7 – 50
Using Solver to Solve the Flair Using Solver to Solve the Flair
Furniture Problem Furniture Problem
Program 7.2C
7 – 51 7 – 52
Using Solver to Solve the Flair Using Solver to Solve the Flair
Furniture Problem Furniture Problem
Excel’s
E l’ answer reportt for
f the
th Flair
Fl i Furniture
F it problem
bl
solution region
g X1 = 3
ds of Bran
15 –
The optimal Feasible Region Substituting 3 in the first equation, we find X2 = 12
solution will lie at a Point b is the intersection of ingredient constraints A
10 – and
dB
on off th
the corners
Pound
7 – 59 7 – 60
Holiday Meal Turkey Ranch Holiday Meal Turkey Ranch
Substituting
S these value back into the objective Using the isocost X2
–
function we find approach Feasible Region
Choosing
Ch i an
Cost = 2X1 + 3X2 20 –
initial cost of 54
Cost at point a = 2(3) + 3(12) = 42
nd 2
cents
ds of Bran
Cost at point b = 2(8.4) + 3(4.8) = 31.2 2X1 + 3X2 = 54
15 –
Pound
X1 = 27; X2 = 0
The lowest cost solution is to purchase 8.4
It is clear
pounds of brand 1 feed and 4.8 pounds of brand 2 5–
feed for a total cost of 31.2 cents per turkey per i
improvement t is
i
month possible (X1 = 8.4, X2 = 4.8)
0 |– | | | | |
5 10 15 20 25 X1
Figure 7.11 Pounds of Brand 1
7 – 61 7 – 62
Program 7.3
Program 7.4A
7 – 63 7 – 64
Holiday Meal Turkey Ranch Four Special Cases in LP
Solution to the Holiday Meal Turkey Ranch
problem using Solver Four special cases and difficulties arise at
times when using the graphical approach
to solving LP problems
Infeasibility
y
Unboundedness
Redundancy
y
Alternate Optimal Solutions
Program 7.4B
7 – 65 7 – 66
7 – 69 7 – 70
0– | | | | | |
Figure 7.14 5 10 15 20 25 30 X1
7 – 71 7 – 72
Four Special Cases in LP Four Special Cases in LP
Example
E l off
Alternate Optimal Solutions X2
alternate 8–
Occasionally two or more optimal solutions optimal
p
may exist solutions 7–
Graphically this occurs when the objective 6 –A
function’s
function s isoprofit or isocost line runs Opt a So
Optimal Solution
ut o Consists
Co s sts o
of All
5– Combinations of X1 and X2 Along
perfectly parallel to one of the constraints Maximize: 3X1 + 2X2 the AB Segment
This actually y allows management
g great
g Subj.
j to: 6X1 + 4X2 < 24 4–
flexibility in deciding which combination to X1 < 3 3– Isoprofit Line for $8
select as the profit is the same at each X 1 , X2 > 0
2–
alternate solution B Isoprofit Line for $12
1 – Feasible Overlays Line Segment AB
Region
0– | | | | | | | |
Figure 7.15 1 2 3 4 5 6 7 8 X1
7 – 73 7 – 74
Program 7.5A
7 5A
7 – 81 7 – 82
Program 7.6B
7 – 83 7 – 84
Changes in the Changes
g in Resources or
Technological Coefficients Right-Hand-Side Values
Change in the technological coefficients for the The right-hand-side values of the constraints
High Note Sound Company often represent resources available to the firm
(a) Original Problem (b) Change in Circled (c) Change in Circled
Labor
L b hours,
h machine
hi time,
ti money available
il bl …
Coefficient Coefficient
X2 X2 X2 If additional resources were available, a
60 – 60 – 60 – higher total profit could be realized
Receivers
3X1 + 1X2 ≤ 60 2 X1 + 1X2 ≤ 60 3X1 + 1X2 ≤ 60 Sensitivity analysis about resources will help
40 – 40 – 40 –
answer questions such as:
Stereo R
Changes
g in Resources or Changes
g in Resources or
Right-Hand-Side Values Right-Hand-Side Values
If the right-hand side of a constraint (e.g. 80 hrs) However, the amount of possible increase in the
is changed, the feasible region will change right-hand side of a resource is limited
(unless the constraint is redundant) (Fig
(Fig. 7-19) If the number of hours increased beyond the
Often the optimal solution will change (Fig. 7-19) upper bound, then the objective function would no
The amount of change (increase or decrease) in longer
g increase by y the dual p
price (Fig.
( g 7-19c))
the objective function value that results from a There would simply be excess (slack
slack) hours of a
unit change in one of the resources available is resource or the objective function may change by
called the dual price or dual value an amount different from the dual price
The dual price for a constraint is the improvement The dual price is relevant only within limits
(or deterioration) in the objective function value If the dual value of a constraint is zero
that results from a one-unit increase (or decrease) The slack is positive, indicating unused resource
in the right-hand side of the constraint
Additional amount of resource will simply
p y increase
the amount of slack
7 – 87 7 – 88
Changes in the Electrician's Time Changes in the Electrician's Time
for High Note Sound for High Note Sound
If available electrician time is increased by 20 hrs If available electrician time is decreased by 20 hrs
X2 X2
(from 80 to 100 hrs), the optimum solution (from 80 to 60 hrs), the optimum solution
60 – will be changed from (0, 20) to (0, 25), and the 60 – will be changed from (0, 20) to (0, 15), and the
maximum profit will be changed from $2400 maximum profit will be changed from $2400
to $3000 – an increase of $600 (= 20×30) to $1800 – an decrease of $600 (= 20×30)
40 – 40 –
C
Constraint
t i t Representing
R ti 60 Hours
H off C
Constraint
t i t Representing
R ti 60 Hours
H off
Audio Technician’s Time Resource Audio Technician’s Time Resource
a
25 –
20 – b Changed Constraint Representing 100 Hours 20 – Changed Constraint Representing 60 Hours
of Electrician’s Time Resource a of Electrician’s Time Resource
15 –
b
– | c | | | – c | | | |
0 20 40 50 60 X1 0 20 30 40 60 X1
Figure 7.19a Figure 7.19b
7 – 89 7 – 90
Constraint
Representing
p g Program 7.5A
7 5A
20 – 60 Hours of Audio
Technician’s
Time Resource
– | | | | | |
0 20 40 60 80 100 120
X1
Figure 7.19c If the number of hours increased beyond 240, the profit would no Program 7.5B
longer increase and the optimum solution would still be (0, 60)
7 – 91 7 – 92
Excel Solver and Changes in
Right-Hand-Side Values
Excel sensitivity analysis output