1 applications of linear and integer programming models - 2 chapter 3
TRANSCRIPT
1
Applications of Linear and Integer Programming
Models - 2
Applications of Linear and Integer Programming
Models - 2
Chapter 3
2
3.5 Applications of Integer Linear Programming Models
Many real life problems call for at least one integer decision variable.
There are three types of Integer models: Pure integer (AILP) Mixed integer (MILP) Binary (BILP)
3
The use of binary variables in constraints
X 10 If a new health care plan is adopted If it is not
X 1 If a new police station is built downtown0 If it is not
X 1 If a particular constraint must hold0 If it is not
• AAny decision situation that can be modeled by “yes”/“no”, “good”/“bad” etc., falls into the binary category.
To illustrate
4
Example A decision is to be made whether each of three plants should be built
(Yi = 1) or not built (Yi = 0)Requirement Binary Representation
At least 2 plants must be built Y1 + Y2 + Y3 2If plant 1 is built, plant 2 must not be built Y1 + Y2 1If plant 1 is built, plant 2 must be built Y1 – Y2 One, but not both plants must be built Y1+ Y2 = 1Both or neither plants must be built Y1 – Y2 =0Plant construction cannot exceed $17 million
given the costs to build plants are $5, $8, $10 million 5Y1+8Y2+10Y3 17
The use of binary variables in constraints
5
Example - continued Two products can be produced at a plant.
• Product 1 requires 6 pounds of steel and product 2 requires 9 pounds. • If a plant is built, it should have 2000 pounds of steel available.
The production of each product should satisfy the steel availability if the plant is opened, or equal to zero if the plant is not opened.
6X1 + 9X2 2000Y1
The use of binary variables in constraints
If the plant is built Y1 = 1.The constraint becomes6x1 + 9X2 2000
If the plant is not built Y1 = 0.The constraint becomes 6x1 + 9X2 0, and thus,X1 = 0 and X2 = 0
6
3.5.1 Personnel Scheduling Models
Assignments of personnel to jobs under minimum required coverage is a typical integer problems.
When resources are available over more than one period, linking constraint link the resources available in period t to the resources available in a period t+1.
8
You look so funnyYou look so funny
You look so funny
You l
ook s
o fun
ny
You
look
so
funn
y
You l
ook s
o fun
nyYou look so
funny
You look so funnyYou look so funny
9
The City of Sunset Beach staffs lifeguards 7 days a week.
Regulations require that city employees work five days. Insurance requirements mandate 1 lifeguard per 8000
average daily attendance on any given day.
The city wants to employ as few lifeguards as possible.
Sunset Beach Lifeguard Assignments
10
Problem Summary Schedule lifeguard over 5 consecutive days. Minimize the total number of lifeguards. Meet the minimum daily lifeguard requirements
Sun. Mon. Tue. Wed. Thr. Fri. Sat. 8 6 5 4 6 7 9
Sunset Beach Lifeguard Assignments
11
Decision VariablesXi = the number of lifeguards scheduled to begin on day “ i ” for i=1, 2, …,7 (i=1 is Sunday)
Objective FunctionMinimize the total number of lifeguard scheduled
ConstraintsEnsure that enough lifeguards are scheduled each day.
Sunset Beach Lifeguard Assignments
12
To ensure that enough lifeguards are scheduled for each day, identify which workers are on duty. For example: …
Sunset Beach Lifeguard Assignments
13
X1X1
Sunset Beach Lifeguard Assignments
X6X6 X5X5
X4X4 X3X3
Tue. Wed. Thu. Fri. Sat Sun.
Who works on Saturday ?Who works on Friday ? X2
Mon
X3X4X5X6
Repeat this procedure for each day of the week, and build the constraints accordingly.
14
Sunset Beach Lifeguard Assignments
Min X1 + X2 + X3 + X4 + X5 + X6 + X7
S.T. X1 + X4 + X5 + X6 + X7 8
X1 + X2 + X5 + X6 + X7 6X1 + X2 + X3 + X6 + X7 5X1 + X2 + X3 + X4 + X7 4
X1 + X2 + X3 + X4 + X5 6
X2 + X3 + X4 + X5 + X6 7
X3 + X4 + X5 + X6 + X7 9
All the variables are non negative integers
17TOTAL LIFEGUARDS
OPTIMAL ASSIGNMENTSLIFEGUARDS
DAY PRESENT REQUIRED BEGIN SHIFT
SUNDAY 9 8 1MONDAY 8 6 0TUESDAY 6 5 1WEDNESDAY 5 4 1THURSDAY 6 6 3FRIDAY 7 7 2SATURDAY 9 9 2
10Note: An alternate optimal solution exists.
Sunset Beach Lifeguard Assignments
18
These models involve a “go/no-go” situations, that can be modeled using binary variables.
Typical elements in such models are: Budget Space Priority conditions
3.5.2 Project selection Models
19
The Salem City Council needs to decide how to allocate funds to nine projects such that public support is maximized.
Data reflect costs, resource availabilities, concerns and priorities the city council has.
Salem City Council – Project Selection
20
Project Cost (1000) Jobs PointsHire seven new police officers 400.00$ 7 4176Modernize police headquarters 350.00$ 0 1774Buy two new police cars 50.00$ 1 2513Give bonuses to foot patrol officers 100.00$ 0 1928Buy new fire truck/support equipment 500.00$ 2 3607Hire assistant fire chief 90.00$ 1 962Restore cuts to sport programs 220.00$ 8 2829Restore cuts to school music 150.00$ 3 1708Buy new computers for high school 140.00$ 2 3003
Survey results
X1
X2
X3
X4
X5
X6
X7
X8
X9
Salem City Council – Project Selection
21
Decision Variables: Xj- a set of binary variables indicating if a project j is selected (Xj=1) or not (Xj=0) for j=1,2,..,9.
Objective function:
Maximize the overall point score of the funded projects Constraints:
See the mathematical model.
Salem City Council – Project Selection
22
Either police car or fire truck be purchased
Sports funds and music funds must be restored before computer equipment is purchased
Sports funds and music funds must be restored / not restored together
The maximum amounts of funds to be allocated is $900,000
The number of police-related activities selected is at most 3 (out of 4)
The number of new jobs created must be at least 10
Salem City Council – Project Selection The Mathematical Model
Max 4176X1+1774X2+ 2513X3+1928X4+3607X5+962X6+2829X7+1708X8+3003X9
S.T. 400X1+ 350X2+ 50X3+ 100X4+ 500X5+ 90X6+ 220X7+ 150X8+ 140X9 900
7X1+ X3+ 2X5+ X6+ 8X7+ 3X8+ 2x9 10
X1+ X2+ X3+ X4 3
X3+ X5 = 1
X7 - X8 = 0
X7 - X9 0
x8 - x9
(Xi = 0,1 for i=1, 2…, 9)
23
Salem City Council – Project selection
=SUMPRODUCT(B4:B12,E4:E12)
=SUMPRODUCT(B4:B12,C4:C12)=SUMPRODUCT(B4:B12,D4:D12)=SUM(B4:B7)=B6+B8=B10-B11=B10-B12=B11-B12
24
3.5.3 Supply Chain Management
Supply chain management models integrate the manufacturing process and the distribution of goods to customers.
The overall objective of these models is to minimize total system costs
The requirements concern (among others) Appropriate production levels Maintaining a transportation system to satisfy demand in timely
manner.
25
Globe Electronics, Inc. manufactures two styles of remote control cable boxes, G50 and H90.
Globe runs four production facilities and three distribution centers.
Each plant operates under unique conditions, thus has a different fixed operating cost, production costs, production rate, and production time available.
Globe Electronics, Inc.
26
Demand has decreased, and management is contemplating closing one or more of its facilities.
Management wishes to:
– Develop an optimal distribution policy.– Determine which plant to close (if any).
Globe Electronics, Inc.
27
Data
Fixed Cost Production Cost / unit Production Time (hr/unit) Available hrPlant per Month G50 H90 G50 H90 per Month
Philadelphia 40 10 14 0.06 0.06 640St. Louis 35 12 12 0.07 0.08 960New Orleans 20 8 10 0.09 0.07 480Denver 30 13 15 0.05 0.09 640
Fixed Cost Production Cost / unit Production Time (hr/unit) Available hrPlant per Month G50 H90 G50 H90 per Month
Philadelphia 40 10 14 0.06 0.06 640St. Louis 35 12 12 0.07 0.08 960New Orleans 20 8 10 0.09 0.07 480Denver 30 13 15 0.05 0.09 640
Production costs, Times, Availability
Monthly Demand ProjectionDemand
Cincinnati Kansas CitySan FranciscoG50 2000 3000 5000G90 5000 6000 7000
DemandCincinnati Kansas CitySan Francisco
G50 2000 3000 5000G90 5000 6000 7000
Globe Electronics, Inc.
28
Transportation Costs per 100 units
At least 70% of the demand in each distribution center must be satisfied.
Unit selling price• G50 = $22; H90 = $28.
City FranciscoCincinnati Kansas San
Philadelphia $200 300 500
St.Louis 100 100 400New Orleans 200 200 300Denver 300 100 100
Globe Electronics, Inc.
29
Ordering raw materialScheduling personnel
Production1. Production level for
each productin each plant.
2. Distribution plan.
Distribution centers 1. Storage 2. Sale and Dissemination to retail establishments
The Globe problem
Globe Electronics, Inc.
30
3
2
11
2
3
4
Philadelphia
St. Louis
New Orleans
Denver
Cincinnati
Kansas City
San Francisco
G11, H11G12 , H
12
G22, H22
G 31, H 31
G13 , H
13
Transportation variables
Globe Electronics, Inc. - Variables
G 41, H 41
31+ +
3
2
11
2
3
4
Philadelphia
St. Louis
New Orleans
Denver
Cincinnati
Kansas City
San Francisco
G11, H11G12 , H
12
G22, H22
G 31, H 31
G13 , H
13
Total production of G50 in Philadelphia = GP =
G11
G11
G11
G11
G11G11G11G11G11G11
G11
G12
G12
G12
G12
G12G12G12G12
G11G13
G13
G13
G13
G13G13G13
G12
G13
G12
G13G12
Production variables in each plant
G13
G13
G12
G11
Globe Electronics, Inc. - Variables
32
3
2
1
Philadelphia
St. Louis
New Orleans
Denver
Cincinnati
Kansas City
San Francisco
G11, H11G12 , H
12
G22, H22
G 31, H 31
G13 , H
13
Shipment variables to each distribution center
1
2
3
4
Total shipment of H90 to Cincinnati = HC = H11 + H21 + H31 +H41
Globe Electronics, Inc. - Variables
34
Objective functionMax Gross Profit = 22(Total G50)+28(Total H90) – Total
Production Cost – Total transportation Cost = Max 22G + 28H G = total number of
G50 producedH = total number of
H90 produced
Globe Electronics – all plants opened
35
Objective functionMax Gross Profit = 22(Total G50)+28(Total H90) – Total
Production Cost – Total transportation Cost = Max 22G + 28H
– 2H11 – 3H12 – 5H13
– 1H21 – 1H22 – 4H23
– 2H31 – 2H32 – 3H33
– 3H41 – 1H42 – 1H43
– 2G11 – 3G12 – 5G13
– 1G21 – 1G22 – 4G23
– 2G31 – 2G32 – 3G33
– 3G41 – 1G42 – 1G43
Transportation costs
– 10GP – 12GSL – 8GNO – 13GD
– 14HP – 12HSL – 10HNO – 15HDProduction costs
Globe Electronics – all plants opened
36
Constraints: Ensure that the amount shipped from a plant equals the amount
produced in a plant (summation constraints).For G50
G11 + G12 + G13 = GP
G21 + G22 + G23 = GSL
G31 + G32 + G33 = GNO
G41 + G42 + G43 = GD
For H90H11 + H12 + H13 = HP
H21 + H22 + H23 = HSL
H31 + H32 + H33 = HNO
H41 + H42 + H43 = HD
The amount received by a distribution center is equal to all the shipments made to this center (summation constraints).
For G50G11 + G21 + G31 + G41 = GC
G12 + G22 + G32 + G42 = GKC
G13 + G23 + G33 + G43 = GSF
For H90H11 + H21 + H31 + H41 = HC
H12 + H22 + H32 + H42 = HKC
H13 + H23 + H33 + H43 = HSF
Globe Electronics – all plants opened
37
Constraints The amount shipped to each distribution center is at least 70% of its
projected demand. The amount shipped to each distribution center does not exceed its
demand.• Cincinnati: GC 1400 GC 2000
HC 3500 HC 5000
• Kansas City GKC 2100 GKC 3000HKC 4200 HKC 6000
• San Francisco GSF 3500 GSF 5000HSF 4900 HSF 7000
Globe Electronics – all plants opened
38
Constraints: Production time used at each plant cannot exceed the time
available:
.06GP + .0 6HP 640
.07GSL+ .08HSL 960
.09GNO + .07HNO 480
.05GD + .09HD 640
All the variables are non negative
Globe Electronics – all plants opened
39
Globe Electronics – all plants opened spreadsheet
=F10*F9+F19*F18-SUMPRODUCT(G23:G26,F5:F8) SUMPRODUCT(H23:H26,F14:F17)-SUMPRODUCT(C5:E8,C23:E26)-SUMPRODUCT(C14:E17,C23:E26)-SUM(F23:F26)
=$I23*$F5+$J23*$F14Drag to L24:L26
40
Globe Electronics 1 - Summary
The optimal value of the objective function is $356,571.43 Note that the fixed cost of operating the plants was not
included in the objective function because all the plants remain operational.
Subtracting the fixed cost of $125,000 results in a net monthly profit of $231,571.43
Rounding down several non-integer solution values results in an integral solution with total profit of $231,550.
This solution may not be optimal, but it is very close to it.
41
Globe Electronics Model No. 2:The number of plants that remain operational in each city is adecision variable.
42
High set up costs raise the question:Is it optimal to leave all the plants operational?
Using binary variables the optimal solution provides suggestions for: Production levels for each product in each plant, Transportation pattern from each plant to distribution
center, Which plant remains operational.
Globe Electronics – which plant remains opened?
43
• Binary Decision Variables
Yi = a binary variable that describes the number of operational plants in city i.
• Objective functionSubtract the following conditional set up costs from the previous objective function:
40,000YP + 35,000YSL + 20,000YND + 30,000YD
• ConstraintsChange the production constraints
.06GP + .0 6HP 640YP .07GSL+ .08HSL 960YSL
.09GNO + .07HNO 480YNO .05GD + .09HD 640YD
Globe Electronics – which plant remains opened?
44
=F10*F9+F19*F18-SUMPRODUCT(G23:G26,F5:F8) - SUMPRODUCT(H23:H26,F14:F17)-SUMPRODUCT(C5:E8,C23:E26)-SUMPRODUCT(C14:E17,C23:E26)-SUMPRODUCT(F23:F26,A5:A8)
Globe Electronics – which plant remains opened?
45
Globe Electronics 2 - Summary
The Philadelphia plant should be closed, while the other plants work at capacity.
Schedule monthly production according to the quantities shown in the Excel output.
The net monthly profit will be $266,083 (after rounding down the non-integer variable values), which is $34,544 per month greater than the optimal monthly profit obtained when all four plants are operational.
47
Many marketing situations can be modeled by linear programming models.
Typically, such models consist of: Budget constraints, Deadlines constraints, Choice of media, Exposure to target population.
The objective is to achieve the most effective advertising plan.
Appendix 3.4 (CD): Advertising Models
48
Vertex Software, Inc.
Vertex Software has developed a new software product, LUMBER 2000.
A marketing plan for this product is to be developed for the next quarter. The product will be promoted using black and white and colored full
page ads. Three publications are considered:
• Building Today• Lumber Weekly• Timber World
49
Requirements A maximum of one ad should be placed in any one issue of any of
the publication during the quarter. At least 50 full-page ads should appear during the quarter. at least 8 color ads should appear during the quarter. One ad should appear in each issue of Timber World. At least 4 weeks of advertising should be placed in each of the
Building Today and Lumber Weekly publications. No more than $ 40000 should be spent on advertising in any one of
the trade publications.
Vertex Software, Inc.
50
Circulation and advertising costsPublication Frequency Circulat. Cost/AdBuilding Today 5 day/week 400,000 Full pg.: $800
Half pg.: $500Only B&W
Lumber Weekly Weekly 250,000 B&W pg.: $1500Color pg.: $4000
Timber WorldMonthly 200,000 B&W pg.: $2000Color pg.: $6000
Key reader attitudes Percentage of Readership Attribute Rating Bldng. Lumbr Timber
Computer data-base user .50 60% 80 90Large Firm (>2M sales) .25 40 80 80Location (city / suburb) .15 60 60 80
Age of firm (>5 years) .10 20 40 50
Vertex Software, Inc.
51
SolutionThe requirements are:
• Stay within a $90,000 budget for print advertising.• Place no more than 65 ads(=5 x 13 weeks) and no less than 20 ads
(=5 X 4 weeks) in Building Today.• Place no more than 13 and no less than 4 ads in Lumber Weekly.• Place exactly 3 ads in Timber World.• Place at least 50 full-page ads.• Place at least 8 color ads.• Spend no more than $40,000 on advertisement in any one of the trade
publications.
Vertex Software, Inc.
52
Variables X1 = number of full page B&W ads placed in
Building Today X2 = number of half page B&W ads placed in
Building Today X3 = number of full page B&W ads placed in
Lumber Weekly X4 = number of full page color ads placed in
Lumber Weekly X5 = number of full page B&W ads placed in
Timber World X6 = number of full page color ads placed in
Timber World
Vertex Software, Inc.
53
The Objective Function The objective function measures the effectiveness of the
promotion operation (to be maximized).
It depends on the number of ads in each publication, as
well as on the relative effectiveness per ad. A special technique (external to this problem) is applied to
evaluate this relative effectiveness.
Vertex Software, Inc.
54
Vertex Software, Inc.=SUMPRODUCT($B$6:$B$9,C6:C9)Drag to cells D11 and E11
=C$11*C$13*$B17Drag across to D17:E17 then down to C19:E19. Then delete formulas in cells C17,D19, and E19
55
Budget
• The Mathematical ModelMax 102000X1+40800X2+91250X3+182500X4+82000X5+164000X6
S.T.800X1 + 500X2+ 1500X3+ 4000X4+ 2000X5 + 6000X6 90000
X1 + X2 65
X1 + X2 20X3 + X4 13X3 + X4 4
X5 + X6 = 3X1 + X3 + X4 + X5 + X6 50X4 + X6 ³ 8
800X1 + 500X2 400001500X3 + 4000X4 40000
2000X5 + 6000X6 40000All variables non-negative
Vertex Software, Inc.
# of Building Today ads# of Lumber Weekly ads
Timber World adsFull PageColored
Maximum spent In each magazine
56
Publication Page Size Style Cost Per Ad Exposure Units Ads Cost Expsoure Units
Building Today Full B&W $800 102000 50 $40,000 5100000Half B&W $500 40800 0 $0 0
50 $40,000 5100000
Lumber Weekly Full B&W $1,500 91250 5 $7,500 456250Full Color $4,000 182500 8 $32,000 1460000
13 $39,500 1916250
Timber World Full B&W $2,000 82000 2 $4,000 164000Full Color $6,000 164000 1 $6,000 164000
3 $10,000 328000
Budget $90,000 TOTALS 66 $89,500 7344250Max Build Today 65Min Build Today 20 Size Totals Full Page 66 $89,500 7344250Max Lum Week 13 Half Page 0 $0 0Min Lum Week 4# Timber World 3 Style Totals B&W 57 $51,500 5720250Min Full Page 50 Color 9 $38,000 1624000
Min Color 8Max Any Pub $40,000
VERTEX SOFTWARE, INC.
Totals for Building Today
Totals for Lumber Weekly
LIMITS
Totals
Totals for Timber World
Vertex Software, Inc.
57
Copyright 2002 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that named in Section 117 of the United States Copyright Act without the express written consent of the copyright owner is unlawful. Requests for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. Adopters of the textbook are granted permission to make back-up copies for their own use only, to make copies for distribution to students of the course the textbook is used in, and to modify this material to best suit their instructional needs. Under no circumstances can copies be made for resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.