Upload
phebe-oliver
View
214
Download
0
Tags:
Embed Size (px)
Citation preview
© The McGraw-Hill Companies, Inc., 20032.1McGraw-Hill/Irwin
Three Classic Applications of LP
• Product Mix at Ponderosa Industrial– Considered limited resources, and determined optimal mix of plywood
products.
– Increased overall profitability of company by 20%.
• Personnel Scheduling at United Airlines– Designed work schedules for all employees at a location to meet service
requirements most efficiently.
– Saved $6 million annually.
• Planning Supply, Distribution, and Marketing at Citgo Petroleum Corporation
– The SDM system uses LP to coordinate the supply, distribution, and marketing of each of Citgo’s major products throughout the United States.
– The resulting reduction in inventory added $14 million annually to Citgo’s profits.
© The McGraw-Hill Companies, Inc., 20032.2McGraw-Hill/Irwin
Wyndor Glass Co. Product Mix Problem
• Wyndor has developed the following new products: An 8-foot glass door with aluminum framing (unit profit = $300); a 4-foot by 6-foot double-hung, wood-framed window (unit profit = $500).
• The company has three plants: Plant 1 (capacity: 4 hrs available) produces aluminum frames and hardware; Plant 2 (capacity: 12 hrs available) produces wood frames; Plant 3 (18 hrs available) produces glass and assembles the windows and doors.
• The 8-foot glass door requires some of the production capacity in Plants 1 and 3, but not Plant 2; The 4-foot wood-framed window needs only Plants 2 and 3. Technological coefficients (hrs/unit): Plant 1: 1 hr/doors, 0 hrs/windows; Plant 2: 0 hrs/doors, 2 hrs/windows; Plant 3: 3 hrs/doors, 2 hrs/windows.
• Questions: What should be the product mix?
© The McGraw-Hill Companies, Inc., 20032.3McGraw-Hill/Irwin
Algebraic Model for Wyndor Glass Co.
Let D = the number of doors to produceW = the number of windows to produce
Maximize P = $300D + $500Wsubject to
D ≤ 42W ≤ 12
3D + 2W ≤ 18and
D ≥ 0, W ≥ 0.
© The McGraw-Hill Companies, Inc., 20032.4McGraw-Hill/Irwin
Graph of Feasible Region
0 2 4 6 8
8
6
4
10
2
Feasible
region
Production rate for doorsD
W
2 W =12
D = 4
3 D + 2 W = 18
Production rate for windows
© The McGraw-Hill Companies, Inc., 20032.5McGraw-Hill/Irwin
Finding the Optimal Solution
0 2 4 6 8
8
6
4
2
Production rate
for windows
Production rate for doors
Feasible
region
(2, 6)
Optimal solution
10
W
D
P = 3600 = 300D + 500W
P = 3000 = 300D + 500W
P = 1500 = 300D + 500W
© The McGraw-Hill Companies, Inc., 20032.6McGraw-Hill/Irwin
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.
© The McGraw-Hill Companies, Inc., 20032.7McGraw-Hill/Irwin
Identifying the Target Cell and Changing Cells
• Choose the “Solver” from the Tools menu.• Select the cell you wish to optimize in the “Set Target Cell” window.• Choose “Max” or “Min” depending on whether you want to maximize or minimize
the target cell.• Enter all the changing cells in the “By Changing Cells” window.
Doors WindowsUnit Profit $300 $500
Hours HoursUsed Available
Plant 1 1 0 1 <= 4Plant 2 0 2 2 <= 12Plant 3 3 2 5 <= 18
Doors Windows Total Profit
Hours Used Per Unit Produced
© The McGraw-Hill Companies, Inc., 20032.8McGraw-Hill/Irwin
Adding Constraints
• To begin entering constraints, click the “Add” button to the right of the constraints window.
• Fill in the entries in the resulting Add Constraint dialogue box.
Doors WindowsUnit Profit $300 $500
Hours HoursUsed Available
Plant 1 1 0 1 <= 4Plant 2 0 2 2 <= 12Plant 3 3 2 5 <= 18
Doors Windows Total ProfitUnits Produced 1 1 $800
Hours Used Per Unit Produced
© The McGraw-Hill Companies, Inc., 20032.10McGraw-Hill/Irwin
Some Important Options
• Click on the “Options” button, and click in both the “Assume Linear Model” and the “Assume Non-Negative” box.
– “Assume Linear Model” tells the Solver that this is a linear programming model.
– “Assume Non-Negative” adds non-negativity constraints to all the changing cells.
© The McGraw-Hill Companies, Inc., 20032.12McGraw-Hill/Irwin
The Optimal Solution
Doors WindowsUnit Profit $300 $500
Hours HoursUsed Available
Plant 1 1 0 2 <= 4Plant 2 0 2 12 <= 12Plant 3 3 2 18 <= 18
Doors Windows Total ProfitUnits Produced 2 6 $3,600
Hours Used Per Unit Produced
© The McGraw-Hill Companies, Inc., 20032.13McGraw-Hill/Irwin
The Profit & Gambit Co.
• 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?
© The McGraw-Hill Companies, Inc., 20032.14McGraw-Hill/Irwin
Profit & Gambit Co. Spreadsheet Model
34567891011121314
B C D E F GTelevision Print Media
Unit Cost ($millions) 1 2
Increased MinimumSales Increase
Stain Remover 0% 1% 3% >= 3%Liquid Detergent 3% 2% 18% >= 18%
Powder Detergent -1% 4% 8% >= 4%
Total CostTelevision Print Media ($millions)
Advertising Units 4 3 10
Increase in Sales per Unit of Advertising
© The McGraw-Hill Companies, Inc., 20032.15McGraw-Hill/Irwin
Algebraic Model for Profit & Gambit
Let TV = the number of units of advertising on televisionPM = 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 ≥ 3Liquid detergent increased sales: 3TV + 2PM ≥ 18Powder detergent increased sales: –TV + 4PM ≥ 4
andTV ≥ 0, PM ≥ 0.
© The McGraw-Hill Companies, Inc., 20032.16McGraw-Hill/Irwin
Applying the Graphical Method
8
6
4
2
0 2 4 6 8 1 0-2-4Amount of TV advertising
Feasible
region
10
3 TV + 2 PM = 18
PM = 3
PM
TV
-TV + 4 PM = 4
Amount of print media advertising
© The McGraw-Hill Companies, Inc., 20032.17McGraw-Hill/Irwin
The Optimal Solution
Amount of TV advertising
Feasible region
0 5 10 15
10
4
(4,3)
optimal solution
Cost = 15 = TV + 2 PM
Cost = 10 = TV + 2 PM
TV
PM
© The McGraw-Hill Companies, Inc., 20032.18McGraw-Hill/Irwin
A Production Problem
Weekly supply of raw materials:
8 Small Bricks 6 Large Bricks
Products:
TableProfit = $20 / Table
ChairProfit = $15 / Chair
© The McGraw-Hill Companies, Inc., 20032.19McGraw-Hill/Irwin
Linear Programming
• Linear programming uses a mathematical model to find the best allocation of scarce resources to various activities so as to maximize profit or minimize cost.
Let T = Number of tables to produceC = Number of chairs to produce
Maximize Profit = ($20)T + ($15)Csubject to
2T + C ≤ 6 large bricks2T + 2C ≤ 8 small bricks
andT ≥ 0, C ≥ 0.
© The McGraw-Hill Companies, Inc., 20032.20McGraw-Hill/Irwin
Graphical Representation
1 2 3 4 5 6
1
2
3
4
5
Chairs
Tables
Chairs + 2 Tables = 6 Large Bricks
2 Chairs + 2 Tables = 8 Small Bricks
© The McGraw-Hill Companies, Inc., 20032.21McGraw-Hill/Irwin
Components of a Linear Program
• Data Cells
• Changing Cells (“Decision Variables”)
• Target Cell (“Objective Function”)
• Constraints
© The McGraw-Hill Companies, Inc., 20032.22McGraw-Hill/Irwin
When is a Spreadsheet Model Linear?
• All equations (output cells) must be of the form= ax + by + cz + …
where a, b, c are constants (data cells) and x, y, z are changing cells.
© The McGraw-Hill Companies, Inc., 20032.23McGraw-Hill/Irwin
Why Use Linear Programming?
• Linear programs are easy (efficient) to solve
• The best (optimal) solution is guaranteed to be found (if it exists)
• Useful sensitivity analysis information is generated
• Many problems are essentially linear
© The McGraw-Hill Companies, Inc., 20032.24McGraw-Hill/Irwin
Developing a Spreadsheet Model
• Step #1: Data Cells– Enter all of the data for the problem on the spreadsheet.
– Make consistent use of rows and columns.
– It is a good idea to color code these “data cells” (e.g., light blue).
345678
B C D E F GTables Chairs
Profit $20.00 $15.00
AvailableLarge Bricks 2 1 6Small Bricks 2 2 8
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.25McGraw-Hill/Irwin
Developing a Spreadsheet Model
• Step #2: Changing Cells– Add a cell in the spreadsheet for every decision that needs to be made.
– If you don’t have any particular initial values, just enter 0 in each.
– It is a good idea to color code these “changing cells” (e.g., yellow with border).
34567891011
B C D E F GTables Chairs
Profit $20.00 $15.00
AvailableLarge Bricks 2 1 6Small Bricks 2 2 8
Tables ChairsProduction Quantity: 0 0
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.26McGraw-Hill/Irwin
Developing a Spreadsheet Model
• Step #3: Target Cell– Develop an equation that defines the objective of the model.
– Typically this equation involves the data cells and the changing cells in order to determine a quantity of interest (e.g., total profit or total cost).
– It is a good idea to color code this cell (e.g., orange with heavy border).
10
11
GTotal Profit
=SUMPRODUCT(C4:D4,C11:D11)
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
AvailableLarge Bricks 2 1 6Small Bricks 2 2 8
Tables Chairs Total Profit
Production Quantity: 1 0 $20.00
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.27McGraw-Hill/Irwin
Developing a Spreadsheet Model
• Step #4: Constraints– For any resource that is restricted, calculate the amount of that resource used in a
cell on the spreadsheet (an output cell).
– Define the constraint in three consecutive cells. For example, if Quantity A ≤ Quantity B, put these three items (Quantity A, ≤, Quantity B) in consecutive cells.
– Note the use of relative and absolute addressing to make it easy to copy formulas in column E.
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
Total Used AvailableLarge Bricks 2 1 3 <= 6Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
678
ETotal Used
=SUMPRODUCT(C7:D7,$C$11:$D$11)=SUMPRODUCT(C8:D8,$C$11:$D$11)
© The McGraw-Hill Companies, Inc., 20032.28McGraw-Hill/Irwin
Defining the Target Cell
• Choose the “Solver” from the Tools menu.• Select the cell you wish to optimize in the “Set Target Cell” window.• Choose “Max” or “Min” depending on whether you want to maximize or
minimize the target cell.
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
Total Used AvailableLarge Bricks 2 1 3 <= 6Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.29McGraw-Hill/Irwin
Identifying the Changing Cells
• Enter all the changing cells in the “By Changing Cells” window.– You may either drag the cursor across the cells or type the addresses.
– If there are multiple sets of changing cells, separate them by typing a comma.
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
Total Used AvailableLarge Bricks 2 1 3 <= 6Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.30McGraw-Hill/Irwin
Adding Constraints
• To begin entering constraints, click the “Add” button to the right of the constraints window.
• Fill in the entries in the resulting Add Constraint dialogue box.
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
Total Used AvailableLarge Bricks 2 1 3 <= 6Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.31McGraw-Hill/Irwin
Some Important Options
• Click on the “Options” button, and click in both the “Assume Linear Model” and the “Assume Non-Negative” box.
– “Assume Linear Model” tells the Solver that this is a linear programming model.
– “Assume Non-Negative” adds nonnegativity constraints to all the changing cells.
© The McGraw-Hill Companies, Inc., 20032.32McGraw-Hill/Irwin
The Solution
• After clicking “Solve”, you will receive one of four messages:
– “Solver found a solution. All constraints and optimality conditions are satisfied.”
– “Set cell values did not converge.”
– “Solver could not find a feasible solution.”
– “Conditions for Assume Linear Model are not satisfied.”
345678910
11
B C D E F GTables Chairs
Profit $20.00 $15.00
Total Used AvailableLarge Bricks 2 1 6 <= 6Small Bricks 2 2 8 <= 8
Tables Chairs Total Profit
Production Quantity: 2 2 $70.00
Bill of Materials
© The McGraw-Hill Companies, Inc., 20032.33McGraw-Hill/Irwin
Properties of Linear Programming Solutions
• An optimal solution must lie on the boundary of the feasible region.
• There are exactly four possible outcomes of linear programming:– A unique optimal solution is found.
– An infinite number of optimal solutions exist.
– No feasible solutions exist.
– The objective function is unbounded (there is no optimal solution).
• If an LP model has one optimal solution, it must be at a corner point.
• If an LP model has many optimal solutions, at least two of these optimal solutions are at corner points.
© The McGraw-Hill Companies, Inc., 20032.34McGraw-Hill/Irwin
Example: (Multiple Optimal Solutions)
Minimize Z = 6x1 + 4x2
subject tox1 ≤ 42x2 ≤ 123x1 + 2x2 ≤ 18
andx1 ≥ 0, x2 ≥ 0.
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
x2
x1
© The McGraw-Hill Companies, Inc., 20032.35McGraw-Hill/Irwin
Example: (No Feasible Solution)
Maximize Z = 3x1 + 5x2
subject tox1 ≥ 5x2 ≥ 43x1 + 2x2 ≤ 18
andx1 ≥ 0, x2 ≥ 0.
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
x2
x1