Lecture 7
Lecture 7
Lijian Lu
Dept. of ISOM, HKUST
1
This class
• Sensitivity analysis
2
Resource Allocation Decision
Example: Bland Brewery Problem
Corn Beer
Hops
Malt
Ale
3
Bland Brewery Problem (continued)
• Profitability
1 Barrel of Beer 1 Barrel of Ale
$23 $13
Number of Barrels 32 34
Can we earn more profit if we “mix” beer and ale in the production
plan?
7
Bland Brewery Model: Standard Notation
• Decision Variables
– A = # of barrels of ale to produce, and
– B = # of barrels of beer to produce.
1 Barrel of 1 Barrel of
Beer Ale
m Objective Function
Profit in $ = 13A + 23B
$23 $13
1 Barrel of m Constraints
1 Barrel of Beer
Ale
Corn Availability: 5A + 15B £ 480
Corn 15 lbs 5 lbs Hops Availability: 4A + 4B £ 160
Hops 4 ozs 4 ozs
Malt Availability: 35A + 20B £ 1190
Non-negativity: A, B ³ 0
Malt 20 lbs 35 lbs
8
Bland Brewery Linear Program
Objective Function
max 13 A + 23 B (Profit)
subject to
Constraints (corn) 5A + 15B £ 480
(hops) 4A + 4B £ 160 Right hand side
Variables
9
Feasible/Infeasible Solution
• A production plan (A,B) that satisfies all of the constraints
is called a feasible solution
10
Feasible/Infeasible Solution
• A production plan (A,B) that satisfies all of the constraints
is called a feasible solution
11
Optimal Solution
12
Definition of LP Problem
13
Examples of Linear/Non-linear Functions
14
Examples of Linear/Non-linear Constraints
• Linear Constraints of A, B, C
A-B ≤ 10;
A≥0;
A+B+3C=5;
• Non-linear Constraints of A, B, C
AB ≤ 2C;
A2≤ 100;
15
Assumptions in Linear Program
m Continuity:
m the decision variables are continuous, i.e., fractional values
are allowed
m Proportionality
m Each unit of output uses the same amount of resources
m No economies of scale
m No diseconomies of scale
m Additivity
m Each unit of output has the same valuation
m Profit is the sum of the profit contributions from each output
16
Procedure of LP Formulation
• Step 1. Define the decision variables.
17
Exercise
A school board is investigating various
ways of composing the faculty for a
proposed new elementary school.
18
Objective
• The board finds that the annual teacher salary is
$15,000, and the average aide salary is $10,000.
19
School Board Requirements
• The building can accommodate no more
than 50 faculty members. t + a ≤ 50
20
Linear Program (LP) Formulation
• Decision variables
– t = number of teachers hired
– a = number of aides hired
• LP problem
Min 15t + 10a
Objective s.t. t + a ≤ 50 Constraints
function
t + a ≥ 20
t ≥ 1/2a
t≥0
“Subject to” a≥0
21
Solving LP by Graphical Method
• Formulate the problem in standard LP format
23
Example: Product Mix Problem
A manager must decide on the mix of products A and B to produce for the coming
week. For each unit of Product A, it requires processing times of 1 minute for
molding and 2 minutes for painting. For each unit of Product B, it requires 1
minute for molding, 1 minute for painting, and 1 minute for cutting. Based on
the preliminary staff and machine schedules, there will be 300 minutes available
for molding, 400 minutes for painting, and 250 minutes for cutting for the coming
week. The manager also estimates that the profit margins will be $3 per unit of A
and $2 per unit of B.
Max Z = 3 A + 2 B
s.t. A + B < 300 ( 1 ) Molding
2A + B < 400 ( 2 ) Painting
B < 250 ( 3 ) Cutting
A,B > 0
24
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2)
B < 250 (3)
B A,B > 0
500
300
250
(1)
A 25
0 250 300 500
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2)
B < 250 (3)
B A,B > 0
500
400
250
(1)
(2)
A 26
0 200 250 500
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2)
B < 250 (3)
B A,B > 0
500
250 (3)
(1)
(2)
A 27
0 250 500
Max Z = 3 A + 2 B Iso-profit Line Method
s.t. A + B < 300 (1) Set Z = 600 Þ 3 A + 2 B = 600
2A + B < 400 (2) If A = 0 Þ B = 300
B < 250 (3)
B A,B > 0 If B = 0 Þ A = 200
500 The objective function line can be
represented by a straight line connecting
points ( 0 , 300 ) and ( 200 , 0 ) on the
graph
To maximize Z, move the line to the
right until it reaches the last corner
point in the feasible region.
(1)
(2)
A 28
0 250 500
(b) What combination of the products will maximize the total profit?
100 A and 200 B
B
500
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2)
B < 250 (3)
A,B > 0
Optimal solution
A = 100
B = 200
Max Z = 700 (3)
250
A 29
0 ( 2 ) 250 (1) 500
(c) What is the maximum total profit?
Total profit = 3(100) + 2(200) = $ 700
B
500
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2)
B < 250 (3)
A,B > 0
Optimal solution
A = 100
B = 200
Max Z = 700 (3)
250
A 30
0 ( 2 ) 250 (1) 500
(d) Is there any idle time in molding, painting, or cutting departments?
If so, which department has idle time and how much?
B
500 Check constraints
Max Z = 3 A + 2 B
s.t. A + B < 300 (1)
2A + B < 400 (2) •Molding: A + B = 300
B < 250 (3) •Painting: 2A + B = 400
A,B > 0 •Cutting: B = 200 < 250
Optimal solution
A = 100 Hence, cutting has idle time
B = 200 of 50 minutes
Max Z = 700 (3)
250
A 31
0 ( 2 ) 250 (1) 500
Binding vs. Non-binding
• Binding constraints
– limit the improvement in the objective function,
e.g., use all resources available
• Non-binding constraints
– do not limit improvement, e.g., have “left over”
resources
– Slack is the amount of resources not being used
32
(e) If it is possible to increase the capacity of cutting at the cost of $50 for an additional
hour, what should you do?
Do nothing. As cutting already has 50 minutes of idle time,
B additional capacity will not improve the optimal solution.
500
Max Z = 3 A + 2 B Shadow price is the
s.t. A + B < 300 (1)
2A + B < 400 (2) marginal revenue that can be
B < 250 (3) generated by increasing one
A,B > 0 unit of capacity.
Optimal solution
A = 100
Example: shadow price is $0
B = 200 per unit of cutting capacity
Max Z = 700 (3)
250 Relationship between slack
variable (Si ) and shadow price
(SPi) :
Si > 0 (non-binding) Þ SPi = 0
SPi > 0 Þ Si = 0 (binding)
A 33
0 ( 2 ) 250 (1) 500
(f) Is it profitable to increase the capacity of painting at the cost of $50 for an additional hour?
A 34
0 ( 2 ) (250
2’ ) (1) 500
(f) Is it profitable to increase the capacity of painting at the cost of $50 for an additional hour?
A 35
0 ( 2 ) ( 2’ ) (1) 500
(f) Is it profitable to increase the capacity of painting at the cost of $50 for an additional hour?
A 36
0 ( 2 ) ( 2’ ) (1) 500
Takeaways
• Resource allocation via LP
37