Professional Documents
Culture Documents
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.
Chapter 3 Overview
– Resource-Allocation
– Cost-Benefit-Tradeoff
– Mixed
– Transportation
– Assignment
statistics and partly because no one had yet had the insight as to how to solve the problems algorithmically
• George Dantzig, a graduate student at Berkley arrived late for a graduate-level statistics class and found two problems written on the board. Not knowing they were examples of
unsolved statistics problems, he mistook them for part of a homework assignment, jotted them down, and solved them. Six weeks later, Dantzig's statistic professor notified him
that he had prepared one of his two "homework" proofs for publication, and Dantzig was given co-author credit on another paper several years later when another mathematician
independently worked out the same solution to the second problem. Dantzig later published his "homework" as a thesis to earn his doctorate.
• George Dantzig went on to work on planning methods for the US Air Force during World War II using a desk calculator. During 1946 his colleague challenged him to mechanize
the planning process in order to entice him into not taking another job. Dantzig formulated the problem as linear inequalities but ended up with a vast number of feasible
solutions. Dantzig's core insight was to realize that the way to find the best solution was to utilize a linear objective function that needed to be maximized.
• After Dantzig included an objective function as part of his formulation during mid-1947, the problem was mathematically more tractable. Dantzig realized that one of the
unsolved problems that he mistook as homework was applicable to finding an algorithm for linear programs. Dantzig realized that the column geometry used would make the
• The Simplex Method is listed as one of the top ten algorithms of the 20th century and provides a structured approach for maximizing a linear function of several variables under
Sources: https://en.wikipedia.org/wiki/Simplex_algorithm
http://www.snopes.com/college/homework/unsolvable.asp#CIZUfRCJ5mCqCL2f.99
Resource Allocation Problems
• Resource constraints place limits on the levels of activities that utilize the
resources
• There are Activities which Decisions to be made are the Levels of these Activities
• The three most effective advertising media for this product are
– Television commercials on Saturday morning programs for children.
– Advertisements in food and family-oriented magazines.
– Advertisements in Sunday supplements of major newspapers.
Question:
At what level should they advertise Crunchy Start in each of the three media?
3-8
Cost and Exposure Data
Costs
Expected number of
1,300,000 600,000 500,000
exposures
3-9
Analysis of the Problem
1) The Data
2) The Decisions
3) The Constraints
• DADACAM
What are the simplifying assumptions for the Super Grain Corporation?
A) Design & Development Cost for each additional ad in a medium is about the same as the first ad in that medium
B) Cost of working in one medium is not affected by how much work it is doing with the other types of media (independence) – [e.g. not taking
into account saturation, multiple impressions across media, overlap of work, efficiencies/savings]
3-10
Algebraic Formulation
subject to
Number of TV Spots: TV ≤ 5
and
TV ≥ 0, M ≥ 0, SS ≥ 0.
3-11
Super Grain - Excel Formulation
Solver Parameters
Spreadsheet Formulation – After Solver Run
A B C D E F G H
1 Super Grain Corp. Advertising-Mix Problem
2
3 TV Spots Magazine Ads SS Ads
4 Exposures per Ad 1,300 600 500
5 (thousands)
6 Budget Budget
7 Cost per Ad ($thousands) Spent Available
8 Ad Budget 300 150 100 4,000 <= 4,000
9 Planning Budget 90 30 40 1,000 <= 1,000
10
11 Total Exposures
12 TV Spots Magazine Ads SS Ads (thousands)
13 Number of Ads 0 20 10 17,000
14 <=
15 Max TV Spots 5
3-14
Some Observations
• Measurement: Instead of measuring profit, Claire decided to measure the “expected number of exposures”. Why?
• The company has been doing well and has decided to expand its operations.
3-16
DADACAM for TBA
Data:
Decisions:
Constraints:
• Can only buy full airplanes ( Solution must have integer values)
Measure of Performance:
• Profit (Maximize)
Wait! This ProblemViolates Divisibility Assumption of
LP
• Divisibility Assumption of Linear Programming: Decision variables in a
linear programming model are allowed to have any values, including fractional
values, that satisfy the functional and nonnegativity constraints. Thus, these
variables are not restricted to just integer values.
• Since the number of airplanes purchased by TBA must have an integer value,
the divisibility assumption is violated.
3-18
Algebraic Formulation
subject to
and
S ≥ 0, L ≥ 0
3-19
TBA Spreadsheet Formulation
TBA Solver Set-up Parameters
Spreadsheet Model Solved by Solver
3-22
TBA Solved by RSPE
Integer Constraint
• Each project requires each partner to make four investments: a down payment now, and
additional capital after one, two, and three years.
• All three projects are expected to be very profitable in the long run so the management of
Think-Big wants to invest as much as possible in some or all of them.
• Management is willing to commit all the company’s investment capital currently available
as well as all additional investment capital that will become available over the next three
years.
Question: At what fraction should Think-Big invest in each of the three projects? That is
What is the investment mix required to maximize profit?
3-24
Think-Big Financial Data for the Projects
Investment Capital Requirements
• Resources
– Resource 1 : Total Investment Capital Available now
– Resource 2 : Cumulative investment capital available at end of one year
– Resource 3 : Cumulative investment capital available at end of two years
– Resource 4 : Cumulative investment capital available at end of three years
3-26
Think- Big
Resource Availability & Capital Requirements
Think-Big Algebraic Formulation
Let OB = Participation share in the office building,
subject to
and
OB ≥ 0, H ≥ 0, SC ≥ 0.
Note that this model possesses the key identifying feature for resource-allocation problems, namely, each functional constraint is a
3-28
Setting up the Think Big Spreadsheet
Think Big – Solver Set-up
Settings
Think Big – Solver Results
3-31
Think Big – RSPE Results
Summary of Formulation Procedure for Resource-
Allocation Problems
1. Identify the activities for the problem at hand.
2. Identify an appropriate overall measure of performance (commonly profit).
3. For each activity, estimate the contribution per unit of the activity to the
overall measure of performance.
4. Identify the resources that must be allocated.
5. For each resource, identify the amount available and then the amount used per
unit of each activity.
6. Enter the data in steps 3 and 5 into data cells.
7. Designate changing cells for displaying the decisions.
8. In the row for each resource, use SUMPRODUCT to calculate the total
amount used. Enter <= and the amount available in two adjacent cells.
9. Designate an objective cell. Use SUMPRODUCT to calculate this measure of
performance.
3-33
Template for Resource-Allocation Problems
Activities
SUMPRODUCT
resource used per unit of activity (resource used per unit,
changing cells) <=
Total Profit
Level of Activity changing cells SUMPRODUCT(profit per unit, changing cells)
2. Resources 3-34
Cost-Benefit Trade-Off Problems
• Unlike Resource-Allocation problems, C-B problems strive to define what
benefits much be achieved
• Benefit Constraint:
– Level Achieved ≥ Minimum Acceptable Level for a given benefit
2-37
The Profit & Gambit Co. – Activity Analysis
• Activities:
• Benefits:
2-39
Algebraic Model for Profit & Gambit
subject to
2-41
Union Airways Personnel Scheduling:
A Pure Cost Trade-off Problem
• Union Airways is adding more flights to and from its hub airport and so needs
to hire additional customer service agents.
3-42
Schedule Data
Time Periods Covered by Shift
Minimum
Number of
Time Period 1 2 3 4 5 Agents Needed
6 AM to 8 AM √ 48
8 AM to 10 AM √ √ 79
10 AM to noon √ √ 65
Noon to 2 PM √ √ √ 87
2 PM to 4 PM √ √ 64
4 PM to 6 PM √ √ 73
6 PM to 8 PM √ √ 82
8 PM to 10 PM √ 43
10 PM to midnight √ √ 52
Midnight to 6 AM √ 15
Daily cost per agent $170 $160 $175 $180 $195
Note: The last column is derived from a study on the size of queues meant to keep customer waiting times to 3-43
Formulation
1) The Data – Shift Coverage
3) The Constraints – Customer Service cannot suffer/queue size/number of agents per shift. Shifts are predetermined
5) Assumptions – Not worried about profit, just minimizing cost, resources unrestricted
subject to
and
Si ≥ 0 (for i = 1 to 5)
3-45
Spreadsheet Formulation – Union Airways
Things to Note:
• Blue – Data Provided/Constraints
• Yellow – User Enters or Solver Solves
• Constraints are “ ≥” So we are dealing we must provide a minimum level or adequate level of service
• H17 Sum Product – Figuring out how many agents are working during that time period
• J21 Sum Product – Calculates total cost for all shifts
3-46
Solver & RSPE Parameters
Things to Note:
• NumberWorking = Integer (as much as management would not like to admit it )
Optimal LP Solution that Minimizes Cost
Summary of Formulation Procedure for Cost Benefit
Tradeoff
3-49
Template for Cost-Benefit Tradoff Problems
Activities
SUMPRODUCT
benefit achieved per unit of activity (benefit per unit,
changing cells) >=
Total Cost
Level of Activity changing cells SUMPRODUCT(cost per unit, changing cells)
Activities
SUMPRODUCT
resource used per unit of activity (resource used per unit,
changing cells) <=
Total Profit
Level of Activity changing cells SUMPRODUCT(profit per unit, changing cells)
3-50
Summary of Formulation Procedure for
Cost-Benefit-Tradeoff Problems
1. Identify the activities for the problem at hand.
2. Identify an appropriate overall measure of performance (commonly cost).
3. For each activity, estimate the contribution per unit of the activity to the
overall measure of performance.
4. Identify the benefits that must be achieved.
5. For each benefit, identify the minimum acceptable level and then the
contribution of each activity to that benefit.
6. Enter the data in steps 3 and 5 into data cells.
7. Designate changing cells for displaying the decisions.
8. In the row for each benefit, use SUMPRODUCT to calculate the level
achieved. Enter >= and the minimum acceptable level in two adjacent cells.
9. Designate an objective cell. Use SUMPRODUCT to calculate this measure of
performance.
3-51
Mixed Problems
• Just when you thought it was safe to venture out into the Linear Programming
world!
1. The Identifying Feature of a Pure Resource Allocation Problem is that all of its functional constraints are resource constraints
2. The Identifying Feature of a Pure Cost-Benefit Trade-off Problem is that all of its functional constraints are benefit constraints
3. NOTE: Functional Constraints are include all the constraints of a problem except for it non-negativity constraints
3-53
Types of Functional Constraints
3-54
Revisiting the Super Grain Case Study
• Recall that with Super Grain Claire determined that there should be no TV
Commercials:
A B C D E F G H
1 Super Grain Corp. Advertising-Mix Problem
2
3 TV Spots Magazine Ads SS Ads
4 Exposures per Ad 1,300 600 500
5 (thousands)
6 Budget Budget
7 Cost per Ad ($thousands) Spent Available
8 Ad Budget 300 150 100 4,000 <= 4,000
9 Planning Budget 90 30 40 1,000 <= 1,000
10
11 Total Exposures
12 TV Spots Magazine Ads SS Ads (thousands)
13 Number of Ads 0 20 10 17,000
14 <=
15 Max TV Spots 5
• In discussions with her manager, the model is questions. Although Claire has found a
way to maximize ad exposures but small children are not reading cereal ads. The
importance of TV Commercials on Saturday Morning shows should not be overlooked.
The model should be adjusted.
• The boss also would like Claire to take into account the budget for coupon discounts
and to find a way to increase the reach of the campaign to young children and parents
of young children.
3-55
Continuing the Super Grain Case Study
• David and Claire conclude that the spreadsheet model needs to be expanded to
incorporate some additional considerations.
• Benefits
– Promoting the new breakfast cereal to young children.
– Promoting the new breakfast cereal to parents of young children.
3-56
Benefit and Fixed-Requirement Data
3-57
Algebraic Formulation - Original
subject to
Number of TV Spots: TV ≤ 5
and
TV ≥ 0, M ≥ 0, SS ≥ 0.
3-58
Algebraic Formulation - New
subject to
Number of TV Spots: TV ≤ 5
and
TV ≥ 0, M ≥ 0, SS ≥ 0. 3-59
Spreadsheet Formulation – Super Grain Revisited
Super Grain Revisited - Solved
A B C D E F G H
1 Super Grain Corp. Advertising-Mix Problem
2
3 TV Spots Magazine Ads SS Ads
4 Exposures per Ad 1,300 600 500
5 (thousands)
6 Cost per Ad ($thousands) Budget Spent Budget Available
7 Ad Budget 300 150 100 3,775 <= 4,000
8 Planning Budget 90 30 40 1,000 <= 1,000
9
10 Number Reached per Ad (millions) Total Reached Minimum Acceptable
11 Young Children 1.2 0.1 0 5 >= 5
12 Parents of Young Children 0.5 0.2 0.2 5.85 >= 5
13
14 TV Spots Magazine Ads SS Ads Total Redeemed Required Amount
15 Coupon Redemption per Ad 0 40 120 1,490 = 1,490
16 ($thousands)
17 Total Exposures
18 TV Spots Magazine Ads SS Ads (thousands)
19 Number of Ads 3 14 7.75 16,175
20 <=
21 Maximum TV Spots 5
3-61
Solver & RSPE Parameters – Super Grain Revisited
Summary of Formulation Procedure for Mixed Linear Programming
Problems
1. Identify the activities for the problem at hand. The decisions to be made are the levels of
these activities.
2. Identify an appropriate overall measure of performance for solutions to the problem.
3. For each activity, estimate the contribution per unit of the activity to the overall measure of
performance.
4. Identify any resources that must be allocated to the activities.
5. Identify any benefits to be obtained from the activities. For each one, identify the minimum
acceptable level and then the contribution per unit of each activity to that benefit.
6. Identify any fixed requirements that, for some type of quantity, the amount provided must
equal a required amount. For each fixed requirement, identify the required amount and
then the contribution toward this required amount per unit of each activity.
7. Enter the data in steps 3-6 into data cells in a spreadsheet.
8. Designate changing cells for displaying the decisions.
9. Use output cells to specify the constraints on resources, benefits, and fixed requirements.
10. Designate an objective cell for displaying the overall measure of performance. Use
SUMPRODUCT to calculate this measure of performance.
3-63
Template for Mixed Problems
Activities
SUMPRODUCT
resource used per unit of activity (resource used per unit,
<=
C o nstra ints
changing cells)
Benefit Benefit
Achieved Needed
3-64
Transportation Problems
• Transportation problems are one of the most common types of linear programming problems.
• A typical example is a company that has several plants producing a product that needs to get
to customers or distribution centers. In WWII it was used to plan troop deployment from
bases in the United States to Europe and Asia.
• For the Factory/Plant metaphor, the main question is how much each plant should ship in
order to minimize the overall cost of shipping while meeting customer demands.
• The classic statement of the transportation problem uses a matrix with the rows representing
sources and columns representing destinations. The costs of shipping from sources to
destinations are indicated by the entries in the matrix. If shipment is impossible between a
given source and destination, a large cost is entered. This discourages the solution from using
such cells.
• Supplies and demands are shown along the margins of the matrix. In the classic formulation
of the transportation problem total supply is equal to total demand.
The Big M Transportation Problem
• Orders have been received from three customers for the turret lathe.
Question: How many lathes should be shipped from each factory to each
customer?
From Output
3-66
The Distribution Network
Factories Customers
C1 10 lathes
needed
$700/lathe
12 lathe F1
produced
$900/lathe
$800/lathe
C2 8 lathes
needed
$800/lathe $900/lathe
15 lathes F2
produced
$700/lathe
C3 9 lathes
needed
Activities – correspond to shipping lanes depicted by arrows
Let Sij = Number of lathes to ship from i to j (i = F1, F2; j = C1, C2, C3).
subject to
and
3-68
Spreadsheet Formulation – Big M Company
Solver & RSPE Parameters – Big M Company
Spreadsheet Solved – Big M Company
A B C D E F G H
1 Big M Company Distribution Problem
2
3 Shipping Cost
4 (per Lathe) Customer 1 Customer 2 Customer 3
5 Factory 1 $700 $900 $800
6 Factory 2 $800 $900 $700
7
8 Total
9 Shipped
10 Units Shipped Customer 1 Customer 2 Customer 3 Out Output
11 Factory 1 10 2 0 12 = 12
12 Factory 2 0 6 9 15 = 15
13 Total To Customer 10 8 9
14 = = = Total Cost
15 Order Size 10 8 9 $20,500
3-71
Assignment Problems
• The assignment problem is a special case of the Transportation problem where
there is an equal number of “sources” (suppliers) and “sinks” (demand
centers) and where the value of all supplies and demands are equal to one.
• For a reference example, consider the problem of manager who has to match
personnel to various tasks.
Sellmore Company Assignment Problem
3-73
Data for the Sellmore Problem
Required Time per Task (Hours)
Ian 47 45 32 51 12
Joan 39 56 36 43 13
Sean 32 51 25 46 15
3-75
Solver and RSPE Parameters - Sellmore
Solution– Sellmore Problem
A B C D E F G H I J
1 Sellmore Co. Assignment Problem
2
3 Task
4 Required Time Word Hourly
5 (Hours) Processing Graphics Packets Registrations Wage
6 Ann 35 41 27 40 $14
7 Assignee Ian 47 45 32 51 $12
8 Joan 39 56 36 43 $13
9 Sean 32 51 25 46 $15
10
11
12 Task
13 Word
14 Cost Processing Graphics Packets Registrations
15 Ann $490 $574 $378 $560
16 Assignee Ian $564 $540 $384 $612
17 Joan $507 $728 $468 $559
18 Sean $480 $765 $375 $690
19
20
21 Task
22 Word Total
23 Assignment Processing Graphics Packets Registrations Assignments Supply
24 Ann 0 0 1 0 1 = 1
25 Assignee Ian 0 1 0 0 1 = 1
26 Joan 0 0 0 1 1 = 1
27 Sean 1 0 0 0 1 = 1
28 Total Assigned 1 1 1 1
29 = = = = Total Cost
30 Demand 1 1 1 1 $1,957
3-77
The Model for Assignment Problems
Given a set of tasks to be performed and a set of assignees who are available to
perform these tasks, the problem is to determine which assignee should be
assigned to each task.
To fit the model for an assignment problem, the following assumptions need to be
satisfied:
1. The number of assignees and the number of tasks are the same.
2. Each assignee is to be assigned to exactly one task.
3. Each task is to be performed by exactly one assignee.
4. There is a cost associated with each combination of an assignee performing a task.
5. The objective is to determine how all the assignments should be made to minimize
the total cost.
3-78
Table of Contents
Chapter 5 (What-If Analysis for Linear Programming)
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.
Before “What-If ?”- A Word About Model Formulation from the
Perspective of a Systems Engineer
• Real world problems may be much more complex than those discussed in the textbook
• Subject matter expertise, experience, rules of thumb, intuition, studies and even pure guesswork may go into building a model. Models will evolve over
• How do we know if the model is the “correct” model? We don’t. There may not be a single “correct” model. All we can do is validate the model against
sets of data for which we believe we know the “correct” answers. When we test a model against a set of known data (data with known answers), we call
• After decision makers are satisfied that the model has been validated, they will often ask a lot “what-if” questions:
– What if the estimates of parameters in the model are not correct?
– How do the conclusions of the model change if the assumptions are changed?
– What is the impact if other options are pursued that were not considered in the current model?
The Trouble with the “Real World”
• Real applications seldom have parameters that are known with a lot of certainty
– For example, on the Wyndor problem profit for doors and windows are given
– However, these profits depend on many factors that may change and impact these numbers (cost of materials, shipping, production, advertising,
- Unit Profit
- Hours Available
5-82
But are they?
Real World Example – Consumer Products – The iPhone
An iPhone generates approximately $650 in revenue for Apple. This figure has remained fairly steady over
time. Using deduction from overall margins, it’s possible to estimate the gross margin on the product to be
around 55%. That means that the cost of goods sold (COGS) for the iPhone is about $293.
Is that a lot? Where does that money go? What else does it tell us about how the company operates?
1 - Bill of materials (BOM). This represents the cost of the components that go into the device.
2 - Transportation/warehousing. This is the cost to transport and store the product before sale.
4 - Warranty expense. This is paid back to customers for returned product that can no longer be sold.
We can estimate a device’s BOM through a teardown analysis and there are firms that do this. Usually
this offers enough competitive insight into the cost structure and hence gross margin because the
Some Details on the iPhone Cost of Goods Sold
A. The iPhone takes 24 hours to be built. Of that 6 to 8 hours is spent in “burn-in” to install and test the
B. This leaves about 17 hours unaccounted for in the throughput time. Could this time be spent in labor
intensive operations? The wage of workers on the line is given as $1.78/hr. 17 hours of labor input
would imply $30 labor cost per iPhone. That seems a lot higher than the industry (i.e. iSupply’s
estimate is $8 for manufacturing cost.) This is an upper bound. Obviously, those 17 hours could be
spent in automated operations which were not shown or simply sitting idle, waiting for a process to
begin.
C. There are 141 (presumably labor) work steps in the production for an iPhone. If we knew the time
each step took we could obtain another estimate. For example, if each step in the human assembly
process took 3 minutes[2] then human hands will touch the iPhone for 423 minutes or about 7 hours.
This would imply a labor cost for an iPhone of about $12.5. If each step was longer or shorter, the
cost wouldhttp://www.asymco.com/2012/02/22/the-iphone-manufacturing-cost-structure
vary accordingly.
Back to Wyndor
- Unit profits are rough estimates, what if they vary?
- Production availability per factory can be adjusted. What if we adjust them?
- The possibilities are mind boggling!
Homework Assignment #2
The profit per door has been revised from $300 to $200. No change occurs in the optimal solution.
The profit per door has been revised from $300 to $500. No change occurs in the optimal solution.
5-86
Sensitivity Analysis – When the Optimal Solution is Affected
Doors Windows
Unit Profit $1,000 $500
Hours Hours
Hours Used Per Unit Produced Used Available
Plant 1 1 0 4 <= 4
Plant 2 0 2 6 <= 12
Plant 3 3 2 18 <= 18
Enter Desired
Analysis Range
5-88
Now Run a Report
Optimization>Parameter Analysis.
show.
5-92
The Parameter Analysis Report
5-93
Using the Sensitivity Report to Find the Allowable Range
Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$12 Units Produced Doors 2 0 300 450 300
$D$12 Units Produced Windows 6 0 500 1E+30 300
5-94
Graphical Insight into the Allowable Range
W
Production rate
for windows
4 Line C
PD = 300 (Profit = 300 D + 500 W)
Feasible
region
2
PD = 750 (Profit = 750 D + 500 W)
Line A
0 2 4 6 D
Production rate for doors
The two dashed lines that pass through the solid constraint boundary lines are the objective function lines when PD (the unit profit for
5-95