Overview Graphing Linear Inequalities

Course Name: Business Quantitative Analysis
QU1
Module: 10
Module Title: Linear Programming
Lectures and handouts by:
Paul Jeyakumar, M.Sc., CGA
1
Overview
Graphing linear inequalities
Linear programming model
Graphical sensitivity analysis
Applications
2
Graphing Linear Inequalities
Identify the slope and the y-intercept in the
equation for a straight line.
Graph an equation for a straight line.
Determine the point of intersection of two
lines algebraically and graphically.
Graph linear inequalities.
3
1
Linear Equation: Slope-Intercept
Slope-intercept form of the equation for a
straight line:
y = mx + b
where
m = slope of the line
b = y-intercept
4
Linear Equation: Slope-Intercept
Example
Slope-intercept form:
2x1 + 3x2 = 13
3x2 = - 2x1 + 13
x2 = – 2x1/3 + 13/3
Slope = –2/3
y-intercept = 13/3
5
Graphing a Linear Equation
2x1 + 3x2 = 13
At x1 = 0, x2 = 13/3 = 4.333
At x2 = 0, 2x1 + 3(0) = 13, or x1 = 13/2 = 6.5
Plot the points (6.5, 0) and (0, 4.333) on a
graph and join them by a straight line.
6
2
Graphing Equation - Example
7
Solving Two Simultaneous
Equations
Solve the following two equations using
algebra. Graph both equations and verify
the answer.
2x1 + 3x2 = 10 …… (1)
3x1 – 4x2 = – 2 …… (2)
8
Solving Two Simultaneous
Equations (contd.)
Multiply the first equation by 3 and the
second equation by 2.
6x1 + 9x2 = 30 …… (3)
6x1 – 8x2 = – 4 …… (4)
Subtract (4) from (3).
17x2 = 34 or x2 = 2
Substitute x2 = 2 in equation (1).
2x1 + 3(2) = 10 2x1 = 4 or x1 = 2
The lines intersect at (2, 2).
9
3
Graphical Solution - Example
2x1 + 3x2 = 10
x1 = 0, x2 = 10/3 = 3.33
x2 = 0, x1 = 10/2 = 5
Points (0, 3.33) and (5, 0) are on the line.
3x1 – 4x2 = – 2
x1 = 0, x2 = 0.5
x2 = 0, x1 = – 2/3 = – 0.667
Points (0, 0.5) and (– 0.667, 0) are on the line.
10
Graphical Solution (contd.)
11
Graphing Inequality, 2x1 + 3x2 ≤ 10
12
4
Assumptions
Proportionality assumption:
No economies of scale or quantity
discounts, and for each decision variable,
the total amount of each resource input and
the associated profit are directly
proportional to the value of the variable
Example:
If one unit of production requires 2 hours of
assembly time and the unit profit is $6/unit,
then for 10 units we need 20 hours of
assembly time and we make a profit of $60.
13
Assumptions (contd.)
Divisibility Assumption: Can have fractional
values for the decision variables
May be true mathematically, but it may not
be practical
Can we produce 23.6 units?
14
Assumptions (contd.)
Additivity Assumption:
Given all the values of the decision variables, the
total amount of each resource input, and the
associated profit, is the same as the sum of the
input and profit for each individual process.
Example:
A unit of Product A takes 2 hours of assembly time,
and a unit of Product B takes 3 hours of assembly
time. If we produce 10 units of Product A and 15
units of Product B, then the total assembly time is
(2 x 10) + (3 x 15) = 65 hours.
15
5
Practice Question 1
A company produces round and square
goldfish bowls made of glass. The square
type has a metal base. Each square bowl
requires 4 hours of furnace time while each
round bowl requires 2 hours. 2 pounds of
glass are required for each type of bowl.
Each week the company has 1,600 pounds
of glass, 2,000 hours of furnace time, and
400 metal bases. The contribution margins
per unit are $8 and $6 for square bowls and
round bowls respectively. The company can
sell all the bowls it makes. How many of
each bowl should be made in a week?
16
Practice Question 1 (contd.)
Definition of the two decision variables:
x1 = number of round bowls to produce/week
x2 = number of square bowls to produce/week
17
Practice Question 1 (contd.)
Objective function:
Maximize Z = 6x1 + 8x2
18
6
Practice Question 1 (contd.)
Resource constraints:
2x1 + 2x2 ≤ 1,600
(glass amount)
2x1 + 4x2 ≤ 2,000
(furnace time)
x2 ≤ 400
(metal bases)
19
Practice Question 1 (contd.)
Non-negativity constraints:
x1 ≥ 0
x2 ≥ 0
20
Practice Question 1 (contd.)
Maximize
6x1 + 8x2
Subject to
2x1 + 2x2 ≤ 1,600
2x1 + 4x2 ≤ 2,000
x2 ≤ 400
x1 ≥ 0, x2 ≥ 0
21
7
Practice Question 1 (contd.)
To draw the graph, convert the inequality
constraints to equality constraints.
2x1 + 2x2 = 1,600
2x1 + 4x2 = 2,000
x2 = 400
(glass amount)
(furnace time)
(metal bases)
22
Practice Question 1 (contd.)
For each linear constraint identify 2 points
that lie on the line. Plot the 2 points and join
the points using a straight line.
2x1 + 2x2 = 1,600
Set x1 to 0.
2(0) + 2x2 = 1,600 or 2x2 = 1,600 or x2 = 800
Set x2 to 0.
2x1 + 2(0) = 1,600 or 2x1 = 1,600 or x1= 800
The points (0,800) and (800,0) are on the line.
23
Practice Question 1 (contd.)
2x1 + 4x2 = 2,000
Set x1 to 0.
2(0) + 4x2 = 2,000 or 4x2 = 2,000 or x2 = 500
Set x2 to 0.
2x1 + 4(0) = 2,000 or 2x1 = 2,000 or x1= 1,000
The points (0,500) and (1,000,0) are on the line.
24
8
Practice Question 1 (contd.)
x2 = 400
There is only one set of values (0,400)
because x1 does not require any metal
bases.
2 non-negativity lines: x1 = 0, and x2 = 0
25
Practice Question 1 (contd.)
26
Practice Question 1 (contd.)
The shaded area in the graph is the set of
points that satisfy all the constraints. It is
called the solution set or the feasible region.
Feasible region has 5 corner points:
A, B, C, D, and E
27
9
Practice Question 1 (contd.)
Optimal production plan is at one of the
extreme points.
Compute the contribution margin, 6x1 + 8x2
at each extreme point.
Extreme point A:
Coordinates: x1 = 0, and x2 = 0
Contribution margin = ($6x0) + ($8x0) = $0
28
Practice Question 1 (contd.)
Extreme point B:
Coordinates: x1 = 0, and x2 = 400
Contribution margin
= ($6x0)+ ($8x400) = $3,200
29
Practice Question 1 (contd.)
Extreme point E :
Coordinates: x1 = 800, and x2 = 0
Contribution margin
= ($6x800)+ ($8x0) = $4,800
30
10
Practice Question 1 (contd.)
Extreme point D:
Point D is at the intersection of the two lines:
2x1 + 4x2 = 2,000
(1)
2x1 + 2x2 = 1,600
(2)
With an accurate graph the coordinates
could be read as (600, 200).
To solve subtract equation (2) from (1):
2x2 = 400, thus x2 = 200
So 2x1 + 4(200) = 2,000. x1 = 1,200/2 = 600
Coordinates: (600, 200)
Contribution margin
= ($6 × 600) + ($8 × 200) = $5,200
31
Practice Question 1 (contd.)
Extreme point C:
Point C is at the intersection of:
2x1 + 4x2 = 2,000 and x2 = 400
Substitute for x2 = 400 as follows:
2x1 + 4(400) = 2,000, 2x1 + 1,600 = 2,000
2x1 = 400 or x1 = 200
Coordinates: (200, 400)
Contribution margin
= ($6 × 200) + (8 × 400) = $4,400
32
Practice Question 1 (contd.)
Optimal production plan:
600 round bowls and 200 square bowls
33
11
Sensitivity Analysis
How would the solution change if the
problem parameters were altered?
Shadow price
34
Shadow Price
Ratio of the increase in the objective
function to the increase in resource
availability
If the resource is non-binding, the shadow
price is zero.
The shadow price is valid only for a range.
35
Practice Question 1 (contd.)
What is the shadow price for metal bases?
We have 400 metal bases available.
Optimal production plan utilizes only 200.
There are 200 unused metal bases.
The constraint is non-binding.
The shadow price of this resource is zero.
36
12
Practice Question 1 (contd.)
Would there be any benefit to increase the
furnace time from 2,000 to 2,100 hours?
Solve:
2x1 + 2x2 = 1,600
2x1 + 4x2 = 2,100
The solution gives x1 = 550 and x2 = 250,
yielding a contribution margin of
($6 × 550) + ($8 × 250) = $5,300.
Contribution margin increases from $5,200
to $5,300 by $100.
37
Practice Question 1 (contd.)
Shadow price = (increase in objective function)
divided by (increase in resource availability)
Shadow price = $100/100 hours = $1/hour
$1/hour is the maximum additional amount
the company should pay for an additional
hour of furnace time.
The shadow price is valid only for a range.
38
Software Applications
We use software applications to solve these
linear programming problems dealing with
multiple constraints.
39
13
Practice Question 2
Price
CD Player $150
Tape Deck $85
Tuner
$70
VC
$75
$35
$30
CM
$75
$50
$40
40
Practice Question 2 (contd.)
Price VC
CM
Assembly
CD Player $150 $75
$75
3 hours
Tape Deck $85 $35
$50
2 hours
Tuner
$70 $30
$40
1 hour
Available assembly hours = 400,000
41
Practice Question 2 (contd.)
Price VC
CM Assembly
CD Player $150 $75
$75
3 hours
Tape Deck $85 $35
$50
2 hours
Tuner
$70 $30
$40
1 hour
Available assembly hours = 400,000
Sales demand:
CD Players
Tape Decks
Tuners
Maximum
130,000
110,000
90,000
Minimum
50,000
50,000
50,000
42
14
Practice Question 2 (contd.)
What is our objective?
What should we do?
Definition of the controllable variables:
x1 = number of CD players to make
x2 = number of Tape Decks to make
x3 = number of Tuners to make
43
Practice Question 2 (contd.)
CM from producing x1 CD players, x2 Tape
decks, and x3 Tuners = 75x1 + 50x2 + 40x3
The objective is to maximize contribution
margin.
Objective function:
Maximize, Z = 75x1 + 50x2 + 40x3
44
Practice Question 2 (contd.)
Choice of values for x1, x2, and x3 is
restricted because of the availability of the
assembly time.
Time constraint:
3x1 + 2x2 + x3 ≤ 400,000
45
15
Practice Question 2 (contd.)
x1 ≥ 50,000
x2 ≥ 50,000
x3 ≥ 50,000
x1 ≤ 130,000
x2 ≤ 110,000
x3 ≤ 90,000
46
Practice Question 2 (contd.)
x1 ≥ 0
x2 ≥ 0
x3 ≥ 0
47
Practice Question 2 (contd.)
Maximize 75x1 + 50x2 + 40x3
Subject to 3x1 + 2x2 + x3 ≤ 400,000
x1 ≥ 50,000
x2 ≥ 50,000
x3 ≥ 50,000
x1 ≤ 130,000
x2 ≤ 110,000
x3 ≤ 90,000
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
48
16
Answer Report – Target Cell
Target Cell (Max)
Cell Name Original Value
$G$3 CM
11350000
Final Value
11350000
The maximum contribution margin as a
result of the production plan identified by
solver is $11,350,000.
49
Answer Report – Adjustable Cells
Cell
$B$2
$C$2
$D$2
Name Original Value
CD
70000
TD
50000
Tuner
90000
Final Value
70000
50000
90000
The final values indicate the number of
units to produce.
50
Answer Report – Constraints
Name Cell
Formula
Status
Slack
Time 400000 $G$5<=$F$5 Binding
0
For assembly, cell value is 400000. Optimal
production plan uses 400000 hours of
assembly time. The resource is binding and
there is no slack.
51
17
Sensitivity Analysis Adjustable Cells
Sensitivity of the optimal solution to
changes in the CM for each product and to
changes in the constraints
Reduced cost for the decision variable
indicates the shadow price.
Shadow price is the incremental change in
the CM for one unit change in the constraint
associated with that variable, all other
variables remaining constant.
52
Sensitivity Analysis Adjustable
Cells (contd.)
Final Reduced Objective Allowable Allowable
Name value
cost
coefficient increase decrease
CD
70000
0
75
45
0
TD
50000
0
50
0
1E+30
Tuner 90000 15
40
1E+30
15
Allowable increase/decrease: The current
optimal production is valid as long as the
unit CM for CD is between $75 and $120.
53
Sensitivity Analysis – Constraints
Final
Value
400000
Shadow Constraint Allowable Allowable
Price
R.H. Side Increase Decrease
25
400000
180000
60000
The shadow price is $25/hour.
It is valid from 340000 hours to 580000
hours.
54
18