Module 5 (ppt file)

advertisement
Computational Methods for
Management and Economics
Carla Gomes
Module 5
Modeling Issues
Main Categories of LP problems:
Resource-Allocation Problems
Cost-benefit-trade-off problems
Distribution-Network Problems
Resource Allocation Problem
Wyndor Glass
• Resources – m (plants)
• Activities – n (2 products)
• Wyndor Glass problem optimal product mix --allocation of resources to activities i.e., choose the levels
of the activities that achieve best overall measure of
performance
Financial Planning
• Another area of application of resource-allocation
problems  Financial Planning
• Resources:
– Financial assets (cash, securities,accounts receivable,
lines of credit, etc).
• Example: Capital budgeting
– Resources: amounts of investment capital available at
different points in time.
Think-Big Capital Budgeting
Problem
• Think-Big Development Co. is a major investor in
commercial real-estate development projects.
• They are considering three large construction projects
– Construct a high-rise office building.
– Construct a hotel.
– Construct a shopping center.
• Each project requires each partner to make four
investments at four different points in time for the
corresponding share: a down payment now, and additional
capital after one, two, and three years.
Financial Data for the Projects
Amount
Investment Capital Requirements
Year
Available
Office Building
Hotel
Shopping Cente
0
1
2
$25 million
$40 million
$80 million
$90 million
$20 million
60 million
80 million
50 million
$20 million
90 million
80 million
20 million
3
$15 million
10 million
70 million
60 million
$45 million
$70 million
$50 million
Net
present
value
Net present value - discounted future cash outflows (capital invested)
and cash inflows (income) and adding discounted net cash flows
• Thus a partner taking a certain percentage share of
a project is obligated to invest that percentage of
each the amounts for each point in time.
Question: At what fraction should ThinkBig invest in each of the three projects?
• Activities:
Activity 1 – invest in construction of office building
Activity 2 – invest in construction of hotel
Activity 3 – invest in construction of shopping center
 Decisions – level for each activity
• Resources:
Resource 1 – total investment capital available now
Resource 2 – cumulative investment capital available by the end of
one year.
Resource 3– cumulative investment capital available by the end of
two years.
Resource 4– cumulative investment capital available by the end of
three years.
Cumulative Investment Capital Required for an
entire Project
Amount
Investment Capital Requirements
Year
Available
Office Building
Hotel
Shopping Cente
0
1
2
$25 million
$40 million
$80 million
$90 million
$45 million
100 million
160 million
140 million
$65 million
190 million
240 million
160 million
3
$80 million
200 million
310 million
220 million
$45 million
$70 million
$50 million
Net
present
value
Net present value - discounted future cash outflows (capital invested)
and cash inflows (income) and adding discounted net cash flows
Algebraic Formulation
Let OB = Participation share in the office building,
H = Participation share in the hotel,
SC = Participation share in the shopping center.
Maximize NPV = 45OB + 70H + 50SC
subject to
Total invested now:
40OB + 80H + 90SC ≤ 25 ($million)
Total invested within 1 year:
100OB + 160H + 140SC ≤ 45 ($million)
Total invested within 2 years: 190OB + 240H + 160SC ≤ 65 ($million)
Total invested within 3 years: 200OB + 310H + 220SC ≤ 80 ($million)
and
OB ≥ 0, H ≥ 0, SC ≥ 0.
Cost-benefit-trade-off problems
Cost-benefit-trade-off problems
The mix of levels of various activities is
chosen to achieve minimum acceptable levels
for various benefits at a minimum cost.
The Profit & Gambit Co.
(Hillier & Hillier):
• Management has decided to undertake a major advertising
campaign that will focus on the following three key products:
– A spray prewash stain remover.
– A liquid laundry detergent.
– A powder laundry detergent.
• The campaign will use both television and print media
• The general goal is to increase sales of these products.
• Management has set the following goals for the campaign:
– Sales of the stain remover should increase by at least 3%.
– Sales of the liquid detergent should increase by at least 18%.
– Sales of the powder detergent should increase by at least 4%.
Question: how much should they advertise in each medium to
meet the sales goals at a minimum total cost?
Profit & Gambit Co. Data
Profit & Gambit Co. Advertising-Mix Problem
Unit Cost ($millions)
Stain Remover
Liquid Detergent
Powder Detergent
Television
1
Print Media
2
Increase in Sales per Unit of Advertising (%)
0
1
3
2
-1
0
Minimum
Increase
3
18
4
• Activity 1 – advertise on television
• Activity 2 – advertise in the print media
• Benefit 1 – increases sales of stain remover
• Benefit 2 – increases sales of liquid
detergent
• Benefit 3 – increases sales of powder
detergent
Algebraic Model for Profit &
Gambit
Let TV = the number of units of advertising on television
PM = the number of units of advertising in the print media
Minimize Cost = TV + 2PM (in millions of dollars)
subject to
Stain remover increased sales:
PM ≥ 3
Liquid detergent increased sales: 3TV + 2PM ≥ 18
Powder detergent increased sales: –TV + 4PM ≥ 4
and
TV ≥ 0, PM ≥ 0.
Applying the Graphical Method
Amount of print media advertising
PM
Feasible
10
region
8
6
4
PM = 3
2
-TV + 4 PM = 4
-4
-2
0
2
3 TV + 2 PM = 18
4
6
Amount of TV advertising
8
10
TV
The Optimal Solution
PM
10
Feasible
region
Cost = 15 = TV + 2 PM
Cost = 10 = TV + 2 PM
4
(4,3)
optimal
solution
0
5
10
Amount of TV advertising
15 TV
Summary of the Graphical Method
• Draw the constraint boundary line for each constraint. Use
the origin (or any point not on the line) to determine which
side of the line is permitted by the constraint.
• Find the feasible region by determining where all
constraints are satisfied simultaneously.
• Determine the slope of one objective function line. All
other objective function lines will have the same slope.
• Move a straight edge with this slope through the feasible
region in the direction of improving values of the objective
function. Stop at the last instant that the straight edge still
passes through a point in the feasible region. This line
given by the straight edge is the optimal objective function
line.
• A feasible point on the optimal objective function line is an
optimal solution.
Union Airways Personnel
Scheduling
• Union Airways is adding more flights to and from
its hub airport and so needs to hire additional
customer service agents.
• The five authorized eight-hour shifts are
–
–
–
–
–
Shift 1: 6:00 AM to 2:00 PM
Shift 2: 8:00 AM to 4:00 PM
Shift 3: Noon to 8:00 PM
Shift 4: 4:00 PM to midnight
Shift 5: 10:00 PM to 6:00 AM
Question: How many agents should be assigned to
each shift?
Time Periods Covered
by Shift
Time Period
1
6 AM to 8 AM
√
8 AM to 10 AM
√
√
79
10 AM to noon
√
√
65
Noon to 2 PM
√
√
√
87
√
√
64
2 PM to 4 PM
2
3
4
5
Minimum
Number of
Agents Needed
48
4 PM to 6 PM
√
√
73
6 PM to 8 PM
√
√
82
8 PM to 10 PM
√
43
10 PM to midnight
√
Midnight to 6 AM
Daily cost per
agent
√
52
√
15
$170 $160 $175 $180 $195
LP Formulation
Let Si = Number working shift i (for i = 1 to 5),
Minimize Cost = $170S1 + $160S2 + $175S3 + $180S4 + $195S5
subject to
Total agents 6AM–8AM:
S1 ≥ 48
Total agents 8AM–10AM:
S1 + S2 ≥ 79
Total agents 10AM–12PM:
S1 + S2 ≥ 65
Total agents 12PM–2PM:
S1 + S2 + S3 ≥ 87
Total agents 2PM–4PM:
S2 + S3 ≥ 64
Total agents 4PM–6PM:
S3 + S4 ≥ 73
Total agents 6PM–8PM:
S3 + S4 ≥ 82
Total agents 8PM–10PM:
S4 ≥ 43
Total agents 10PM–12AM:
S4 + S5 ≥ 52
Total agents 12AM–6AM:
S5 ≥ 15
and
Si ≥ 0 (for i = 1 to 5)
Work-scheduling problem
A Work-Scheduling Problem
(from Intro Math Programming
Winston & Venkataramanan)
A post office requires different numbers of full-time
employees on different days of the week. Union rules
state that each full-time employee must work five
consecutive days and then receive two days off. For
example, an employee who works on Monday to
Friday must be off on Saturday and Sunday. The
post office wants to meet its daily requirements using only
full-time employees.
Overview
• Work-scheduling problem
– The model
– Practical enhancements or modifications
– Two non-linear objectives that can be made
linear
– A non-linear constraint that can be made linear
These slides are adapted from James Orlin’s
Scheduling Postal Workers
• Each postal worker works for 5 consecutive days,
followed by 2 days off, repeated weekly.
Day
Demand
Mon Tues Wed Thurs Fri
17
13
15
19
14
Sat
Sun
16
11
• Minimize the number of postal workers (for the
time being, we will permit fractional workers on
each day.)
What’s wrong with this formulation?
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to
x1  17
x2  13
•Decision variables
–Let x1 be the number of workers who
work on Monday
x3  15
x4  19
x5  14
–Let x2 be the number of workers who
work on Tuesday …
–Let x3, x4, …, x7 be defined
similarly.
x6  16
x7  11
xj  0 for j = 1 to 7
Day
Demand
Mon Tues Wed Thurs Fri
17
13
15
19
14
Sat
Sun
16
11
Answer
• Objective function is not number of fulltime post office employees  each
employee is counted five times;
• The variables x1, x2, x3, etc are interrelated but
that is not captured in our formulation (for
example some people who are working on
Monday are also working on Tuesday)
LP Formulation
• Select the decision variables
– Let x1 be the number of workers who start working on
Monday, and work till Friday
– Let x2 be the number of workers who start on Tuesday
…
– Let x3, x4, …, x7 be defined similarly.
Note 1: number of full-time employees is
x1 + x2 + x3 + x 4 + x5 + x6 + x7
Note 2: Who is working on Monday? Everybody
except those who start working on Tuesday and
Wednesday (on Monday they have a day off)
(similarly reasoning can be applied for the other
days)
Day
Demand
Mon Tues Wed Thurs Fri
Sat
The13linear
program
15
19
14
16
17
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to
x1 +
x1 + x2 +
x4 + x5 + x6 + x7  17
x5 + x6 + x7  13
x1 + x2 + x3 +
x6 + x7
x1 + x2 + x3 + x4 +
x7
x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6




15
19
14
16
x3 + x4 + x5 + x6 + x7  11
xj  0 for j = 1 to 7
Sun
11
Some Enhancements of the Model
• Suppose that there was a pay differential. The
cost of workers who start work on day j is cj per
worker.
Minimize
z = c1 x1 + c2 x2 + c3 x3 + … + c7 x7
Some Enhancements of the Model
• Suppose that one can hire part time workers
(one day at a time), and that the cost of a part
time worker on day j is PTj.
• Let yj = number of part time workers on day j
What is the Revised Linear
Program?
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to
x4 + x5 + x6 + x7
x5 + x6 + x7


17
13
x1 + x2 + x3 +
x6 + x7
x1 + x2 + x3 + x4 +
x7
x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6




15
19
14
16
x3 + x4 + x5 + x6 + x7

11
x1 +
x1 + x2 +
xj  0 for j = 1 to 7
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
+ PT1 y1 + PT2 y2 + … + PT7 y7
subject to
x1 +
x4 + x5 + x6 + x7 + y1  17
x1 + x2 +
x5 + x6 + x7 + y2  13
x1 + x2 + x3 +
x6 + x7 + y3  15
x1 + x2 + x3 + x4 +
x7 + y4  19
x1 + x2 + x3 + x4 + x5 +
y5  14
x2 + x3 + x4 + x5 + x6
+ y6  16
x3 + x4 + x5 + x6 + x7 + y7  11
xj  0 , yj  0
for j = 1 to 7
Another Enhancement
• Suppose that the number of workers required on
day j is dj. Let yj be the number of workers on day
j.
• What is the minimum cost schedule, where the
“cost” of having too many workers on day j is fj(yj – dj), which is a non-linear function?
• NOTE: this will lead to a non-linear program, not
a linear program.
• We will let sj = yj – dj be the excess number of
workers on day j.
What is the Revised Linear
Program?
Minimize z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to
x4 + x5 + x6 + x7
x5 + x6 + x7


17
13
x1 + x2 + x3 +
x6 + x7
x1 + x2 + x3 + x4 +
x7
x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6




15
19
14
16
x3 + x4 + x5 + x6 + x7

11
x1 +
x1 + x2 +
xj  0 for j = 1 to 7
Minimize
z = f1(s1) + f2(s2) + f3(s3) + f4(s4) + f5(s5) + f6(s6) + f7(s7)
subject to
x1 +
x4 + x5 + x6 + x7 - s1 = 17
x1 + x2 +
x5 + x6 + x7 - s2 = 13
x1 + x2 + x3 +
x6 + x7 - s3 = 15
x1 + x2 + x3 + x4 +
x7 - s4 = 19
x1 + x2 + x3 + x4 + x5 s5 = 14
x2 + x3 + x4 + x5 + x6
- s6 = 16
x3 + x4 + x5 + x6 + x7 - s7 = 11
xj  0 , sj  0
for j = 1 to 7
A non-linear objective that often
can be made linear.
Suppose that one wants to minimize the
maximum of the slacks, that is
minimize z = max (s1, s2, …, s7).
This is a non-linear objective.
But we can transform it, so the problem becomes
an LP.
Minimize z
z  sj
subject to
for j = 1 to 7.
x1 +
x4 + x5 + x6 + x7 - s1
x1 + x2 +
x5 + x6 + x7 - s2
x1 + x2 + x3 +
x6 + x7 - s3
x1 + x2 + x3 + x4 +
x7 - s4
x1 + x2 + x3 + x4 + x5 s5
x2 + x3 + x4 + x5 + x6
- s6
x3 + x4 + x5 + x6 + x7 - s7
= 17
= 13
= 15
= 19
= 14
= 16
= 11
xj  0 , sj  0 for j = 1 to 7
The new constraint ensures that z  max (s1, …, s7)
The objective ensures that z = sj for some j.
Another non-linear objective that often
can be made linear.
Suppose that the “goal” is to have dj workers on
day j. Let yj be the number of workers on day j.
Suppose that the objective is
minimize
Si
| yj – dj |
This is a non-linear objective.
But we can transform it, so the problem becomes an LP.
Minimize
Sj zj
zj  dj - yj for j = 1 to 7.
zj  yj - dj
subject to
for j = 1 to 7.
x1 +
x4 + x5 + x6 + x7 = y1
x1 + x2 +
x5 + x6 + x7 = y2
x1 + x2 + x3 +
x6 + x7 = y3
x1 + x2 + x3 + x4 +
x7 = y4
x1 + x2 + x3 + x4 + x5 = y5
x2 + x3 + x4 + x5 + x6
= y6
x3 + x4 + x5 + x6 + x7 = y7
xj  0 , yj  0 for j = 1 to 7
The new constraints ensure that zj  | yj – dj | for each j.
The objective ensures that zj = | yj – dj | for each j.
A ratio constraint:
Suppose that we need to ensure that at least 30% of the
workers have Sunday off.
How do we model this?
(x1 + x2 )/x1 + x2 + x3 + x4 + x5 + x6 + x7  .3
(x1 + x2 )  .3 x1 + .3 x2 + .3 x3 + .3 x4 + .3 x5 + .3 x6 + .3 x7
-.7 x1 - .7 x2 + .3 x3 + .3 x4 + .3 x5 + .3 x6 + .3 x7 <= 0
Other enhancements
• Require that each shift has an integral
number of workers
– integer program
• Consider longer term scheduling
– model 6 weeks at a time
• Consider shorter term scheduling
– model lunch breaks
• Model individual workers
– permit worker preferences
Distribution Network Problems
The Big M Distribution-Network
Problem
• The Big M Company produces a variety of
heavy duty machinery at two factories. One
of its products is a large turret lathe.
• Orders have been received from three
customers for the turret lathe.
Some Data
Shipping Cost for Each
Lathe
Customer Customer Customer
To
1
2
3
From
Factory 1 $700
Factory 2
800
Order
10 lathes
Size
$900
900
$800
700
8 lathes
9 lathes
Output
12 lathes
15 lathes
The Distribution Network
C1
10 lathes
needed
C2
8 lathes
needed
C3
9 lathes
needed
$700/lathe
12 lathe
produced
F1
$900/lathe
$800/lathe
$900/lathe
$800/lathe
15 lathes
produced
F2
$700/lathe
Question: How many lathes should be shipped
from each factory to each customer?
• Activities – shipping lanes (not the level of production
which has already been defined)
– Level of each activity – number of lathes shipped
through the corresponding shipping lane.
Best mix of shipping amounts
Resources  requirements from factories and
customers. Example:
Requirement 1: Factory 1 must ship 12 lathes
Requirement 2: Factory 2 must ship 15 lathes
Requirement 3: Customer 1 must receive 10 lathes
Requirement 4: Customer 2 must receive 8 lathes
Requirement 5: Customer 3 must receive 9 lathes
Algebraic Formulation
Let Sij = Number of lathes to ship from i to j (i = F1, F2; j = C1, C2, C3).
Minimize Cost = $700SF1-C1 + $900SF1-C2 + $800SF1-C3
+ $800SF2-C1 + $900SF2-C2 + $700SF2-C3
subject to
Factory 1:
SF1-C1 + SF1-C2 + SF1-C3 = 12
Factory 2:
SF2-C1 + SF2-C2 + SF2-C3 = 15
Customer 1: SF1-C1 + SF2-C1 = 10
Customer 2: SF1-C2 + SF2-C2 = 8
Customer 3: SF1-C3 + SF2-C3 = 9
and
Sij ≥ 0 (i = F1, F2; j = C1, C2, C3).
Summary of Main Categories of
LP problems:
Resource-Allocation Problems
Cost-benefit-trade-off problems
Distribution-Network Problems
Types of Functional Constraints
Type
Resource
constraint
Benefit
constraint
Fixedrequirement
constraint
Typical
Form* Interpretation Main Usage
LHS ≤
RHS
For some resource,
Amount used ≤
Amount available
Resourceallocation
problems and
mixed problems
LHS ≥
RHS
For some benefit,
Level achieved ≥
Minimum
Acceptable
Cost-benefittrade-off
problems and
mixed problems
LHS =
RHS
For some quantity,
Amount provided =
Required amount
Distributionnetwork problems
and mixed
problems
* LHS = Left-hand side
RHS = Right-hand side (a constant).
Mixed LP problems
Save-It Company Waste Reclamation
• The Save-It Company operates a reclamation center that
collects four types of solid waste materials and then treats
them so that they can be amalgamated into a salable
product.
• Three different grades of product can be made: A, B, and C
(depending on the mix of materials used).
Question: What quantity of each of the three
grades of product should be produced from
what quantity of each of the four materials?
Product Data for the Save-It Company
Amalgamation
Cost per Pound
Selling Price
per Pound
A
Material 1: Not more than 30% of total
Material 2: Not less than 40% of total
Material 3: Not more than 50% of total
Material 4: Exactly 20% of total
$3.00
$8.50
B
Material 1: Not more than 50% of total
Material 2: Not less than 10% of the
total
Material 4: Exactly 10% of the total
2.50
7.00
C
Material 1: Not more than 70% of the
total
2.00
5.50
Grade
Specification
Material Data for the Save-It Company
Material
Pounds/Week
Available
Treatment
Cost
per Pound
1
3,000
$3.00
2
2,000
6.00
3
4,000
4.00
4
1,000
5.00
Additional
Restrictions
1. For each material, at
least half of the
pounds/week available
should be collected and
treated.
2. $30,000 per week
should be used to treat
these materials.
Algebraic Formulation
Let xij = Pounds of material j allocated to product i per week (i = A, B, C; j = 1, 2, 3, 4).
Maximize Profit = 5.5(xA1 + xA2 + xA3 + xA4) + 4.5(xB1 + xB2 + xB3 + xB4) + 3.5(xC1 + xC2 + xC3 + xC4)
subject to Mixture Specifications:
xA1 ≤ 0.3 (xA1 + xA2 + xA3 + xA4)
xA2 ≥ 0.4 (xA1 + xA2 + xA3 + xA4)
xA3 ≤ 0.5 (xA1 + xA2 + xA3 + xA4)
xA4 = 0.2 (xA1 + xA2 + xA3 + xA4)
xB1 ≤ 0.5 (xB1 + xB2 + xB3 + xB4)
xB2 ≥ 0.1 (xB1 + xB2 + xB3 + xB4)
xB4 = 0.1 (xB1 + xB2 + xB3 + xB4)
xC1 ≤ 0.7 (xC1 + xC2 + xC3 + xC4)
Availability of Materials:
xA1 + xB1 + xC1 ≤ 3,000
xA2 + xB2 + xC2 ≤ 2,000
xA3 + xB3 + xC3 ≤ 4,000
xA4 + xB4 + xC4 ≤ 1,000
Restrictions on amount treated:
xA1 + xB1 + xC1 ≥ 1,500
xA2 + xB2 + xC2 ≥ 1,000
xA3 + xB3 + xC3 ≥ 2,000
xA4 + xB4 + xC4 ≥ 500
Restriction on treatment cost:
3(xA1 + xB1 + xC1) + 6(xA2 + xB2 + xC2)
+ 4(xA3 + xB3 + xC3) + 5(xA4 + xB4 + xC4) = 30,000
and xij ≥ 0 (i = A, B, C; j = 1, 2, 3, 4).
Spreadsheet Formulation
Unit Amalg. Cost
Unit Selling Price
Unit Profit
Grade A
$3.00
$8.50
$5.50
Grade B
$2.50
$7.00
$4.50
Grade C
$2.00
$5.50
$3.50
Material Allocation
(pounds of material used for each product grade)
Grade A
Grade B
Grade C
Material 1
412.3
2,587.7
0
Material 2
859.6
517.5
0
Material 3
447.4
1,552.6
0
Material 4
429.8
517.5
0
Total Products
2,149.1
5,175.4
0
Total Profit
$35,110
Total Treatment Cost
Treatment Funds Available
Unit
Treament
Cost
$3
$6
$4
$5
Minimum
to Treat
1,500
1,000
2,000
500
Mixture Specifications
Grade A, Material 1
412.3
Grade A, Material 2
859.6
Grade A, Material 3
447.4
Grade A, Material 4
429.8
<=
<=
<=
<=
$30,000
=
$30,000
Total
Material
Treated
3,000
1,377
2,000
947
<=
>=
<=
=
644.7
859.6
1,074.6
429.8
<=
<=
<=
<=
Amount
Available
3,000
2,000
4,000
1,000
Mixture
Percents
30% of
40% of
50% of
20% of
Grade
Grade
Grade
Grade
A
A
A
A
Grade B, Material 1
Grade B, Material 2
Grade B, Material 4
2,587.7
517.5
517.5
<=
>=
=
2,587.7
517.5
517.5
50%
10%
10%
of Grade B
of Grade B
of Grade B
Grade C, Material 1
0.0
<=
0.0
70%
of Grade C
Download