Table of Contents Chapter 2 (Linear Programming: Basic Concepts)

Download Report

Transcript Table of Contents Chapter 2 (Linear Programming: Basic Concepts)

Table of Contents
Chapter 2 (Linear Programming: Basic Concepts)
The Wyndor Glass Company Product Mix Problem (Section 2.1)
Formulating the Wyndor Problem on a Spreadsheet (Section 2.2)
The Algebraic Model for Wyndor (Section 2.3)
The Graphical Method Applied to the Wyndor Problem (Section 2.4)
Using the Excel Solver with the Wyndor Problem (Section 2.5)
A Minimization Example—The Profit & Gambit Co. (Section 2.6)
McGraw-Hill/Irwin
2.2
2.3–2.8
2.9
2.10–2.20
2.21–2.28
2.29–2.34
Copyright © 2011 by the McGraw-Hill Companies, Inc. All rights reserved.
Wyndor Glass Co. Product Mix Problem
•
Wyndor has developed the following new products:
–
–
•
An 8-foot glass door with aluminum framing.
A 4-foot by 6-foot double-hung, wood-framed window.
The company has three plants
–
–
–
Plant 1 produces aluminum frames and hardware.
Plant 2 produces wood frames.
Plant 3 produces glass and assembles the windows and doors.
Questions:
1. Should they go ahead with launching these two new products?
2. If so, what should be the product mix?
2-2
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).
Wyndor Glass Co. Product-Mix Problem
Unit Profit
Doors
Windows
$300
$500
Hours
Hours Used Per Unit Produced
Available
Plant 1
1
0
4
Plant 2
0
2
12
Plant 3
3
2
18
2-3
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).
A
1
2
3
4
5
6
7
8
9
B
C
D
E
F
G
Wyndor Glass Co. Product-Mix Problem
Unit Profit
Doors
$300
Windows
$500
Hours Used Per Unit Produced
Plant 1
1
0
Plant 2
0
2
Plant 3
3
2
Hours
Available
4
12
18
2-4
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).
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
1
Windows
1
E
F
G
Hours
Available
1
12
18
Total Profit
$800
G
11
Total Profit
12 =SUMPRODUCT(UnitProfit,UnitsProduced)
2-5
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.
A
1
2
3
4
5
6
7
8
9
10
11
12
B
C
D
E
F
G
<=
<=
<=
Hours
Available
4
12
18
Wyndor Glass Co. Product-Mix Problem
Unit Profit
Doors
$300
Windows
$500
Hours Used Per Unit Produced
Plant 1
1
0
Plant 2
0
2
Plant 3
3
2
Units Produced
Doors
0
Windows
0
Hours
Used
0
0
0
Total Profit
$0
2-6
Formulas for the Spreadsheet Model
A
1
2
3
4
5
6
7
8
9
10
11
12
B
C
D
E
F
G
<=
<=
<=
Hours
Available
4
12
18
Wyndor Glass Co. Product-Mix Problem
Unit Profit
Doors
$300
Windows
$500
Hours Used Per Unit Produced
Plant 1
1
0
Plant 2
0
2
Plant 3
3
2
Units Produced
Range Name
HoursAvailable
HoursUsed
HoursUsedPerUnitProduced
TotalProfit
UnitProfit
UnitsProduced
Doors
0
Cells
G7:G9
E7:E9
C7:D9
G12
C4:D4
C12:D12
Windows
0
5
6
7
8
9
Hours
Used
0
0
0
Total Profit
$0
E
Hours
Used
=SUMPRODUCT(C7:D7,UnitsProduced)
=SUMPRODUCT(C8:D8,UnitsProduced)
=SUMPRODUCT(C9:D9,UnitsProduced)
G
11
Total Profit
12 =SUMPRODUCT(UnitProfit,UnitsProduced)
2-7
A Trial Solution
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
4
Windows
3
E
Hours
Used
4
6
18
F
G
<=
<=
<=
Hours
Available
1
12
18
Total Profit
$2,700
The spreadsheet for the Wyndor problem with a trial solution (4 doors and 3
windows) entered into the changing cells.
2-8
Algebraic Model for Wyndor Glass Co.
Let D = the number of doors to produce
W = the number of windows to produce
Maximize P = $300D + $500W
subject to
D≤4
2W ≤ 12
3D + 2W ≤ 18
and
D ≥ 0, W ≥ 0.
2-9
Graphing the Product Mix
W
Production rate (units per week) for windows
8
A product mix of
D = 4 and W = 6
7
(4, 6)
6
5
4
A product mix of
D = 2 and W = 3
3
(2, 3)
2
1
Origin
-2
-1
0
-1
1
2
3
4
5
6
7
Production rate (units per week) for doors
8
D
-2
2-10
Graph Showing Constraints: D ≥ 0 and W ≥ 0
W
Production rate for windows
8
6
4
2
0
2
4
6
8
D
Production rate for doors
2-11
Nonnegative Solutions Permitted by D ≤ 4
W
8
Production rate for windows
D= 4
6
4
2
0
2
6
4
Production rate for doors
8
D
2-12
Nonnegative Solutions Permitted by 2W ≤ 12
Production rate for windows
W
8
2 W = 12
6
4
2
0
2
4
6
8
D
Production rate for doors
2-13
Boundary Line for Constraint 3D + 2W ≤ 18
Production rate for windows
W
10
(0, 9)
8
1
(1, 7 _)
2
(2, 6)
6
3 D + 2 W = 18
1
(3, 4 _)
2
4
(4, 3)
2
1
(5, 1 _)
2
(6, 0)
0
2
4
6
8
D
Production rate for doors
2-14
Changing Right-Hand Side Creates Parallel Constraint
Boundary Lines
Production rate for windows
W
12
10
3D + 2W = 24
8
6
3D + 2W = 18
4
2
0
3D + 2W = 12
2
4
6
8
10
D
Production rate for doors
2-15
Nonnegative Solutions Permitted by
3D + 2W ≤ 18
Production rate for windows
W
10
8
6
3D + 2W = 18
4
2
0
2
4
Production rate for doors
6
8
D
2-16
Graph of Feasible Region
Production rate for windows
W
10
3 D + 2 W = 18
8
D= 4
6
2 W =12
4
Feasible
2
0
region
2
4
Production rate for doors
6
8
D
2-17
Objective Function (P = 1,500)
Production rate
W
for windows
8
6
4
P = 1500 = 300D + 500W
Feasible
region
2
0
2
4
Production rate for doors
6
8
D
2-18
Finding the Optimal Solution
Production rate
W
for windows
8
P = 3600 = 300D + 500W
P = 3000 = 300D + 500W
Optimal solution
(2, 6)
6
Feasible
4
P = 1500 = 300D + 500W
region
2
0
2
4
Production rate for doors
6
8
10
D
2-19
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.
2-20
Identifying the Target Cell and Changing Cells (Excel 2010)
•
•
•
•
Choose the “Solver” from the Data tab.
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.
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
1
Windows
1
E
Hours
Used
1
2
5
F
G
<=
<=
<=
Hours
Available
1
12
18
Total Profit
$800
2-21
Identifying the Target Cell and Changing Cells (Excel 2007)
•
•
•
•
Choose the “Solver” from the Data tab (Excel 2007) or Tools menu (earlier versions).
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.
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
1
Windows
1
E
Hours
Used
1
2
5
F
G
<=
<=
<=
Hours
Available
1
12
18
Total Profit
$800
2-22
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.
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
1
Windows
1
E
Hours
Used
1
2
5
F
G
<=
<=
<=
Hours
Available
1
12
18
Total Profit
$800
2-23
Some Important Options (Excel 2007)
•
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.
2-24
The Complete Solver Dialogue Box (Excel 2010)
2-25
The Complete Solver Dialogue Box (Excel 2007)
2-26
The Solver Results Dialogue Box
2-27
The Optimal Solution
B
3
4
5
6
7
8
9
10
11
12
Unit Profit
Plant 1
Plant 2
Plant 3
Units Produced
C
D
Doors
$300
Windows
$500
Hours Used Per Unit Produced
1
0
0
2
3
2
Doors
2
Windows
6
E
Hours
Used
2
12
18
F
G
<=
<=
<=
Hours
Available
1
12
18
Total Profit
$3,600
2-28
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?
2-29
Profit & Gambit Co. Spreadsheet Model
B
3
4
5
6
7
8
9
10
11
12
13
14
Unit Cost ($millions)
Stain Remover
Liquid Detergent
Powder Detergent
Advertising Units
C
D
Television
1
Print Media
2
Increase in Sales per Unit of Advertising
0%
1%
3%
2%
-1%
4%
Television
4
Print Media
3
E
Increased
Sales
3%
18%
8%
F
G
>=
>=
>=
Minimum
Increase
3%
18%
4%
Total Cost
($millions)
10
2-30
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.
2-31
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
2-32
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
15 TV
Amount of TV advertising
2-33
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.
2-34