SlideShare a Scribd company logo
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.1
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.2
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?
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.3
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.4
Graph of Feasible Region
0 2 4 6 8
8
6
4
10
2
Feasible
region
Production rate for doors
D
W
2 W =12
D = 4
3 D + 2 W = 18
Production rate for windows
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.5
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)
Optimalsolution
10
W
D
P =3600= 300D + 500W
P =3000= 300D + 500W
P =1500= 300D + 500W
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.6
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.7
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 Windows
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 1 <= 4
Plant 2 0 2 2 <= 12
Plant 3 3 2 5 <= 18
Doors Windows Total Profit
Hours Used Per Unit Produced
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.8
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 Windows
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 1 <= 4
Plant 2 0 2 2 <= 12
Plant 3 3 2 5 <= 18
Doors Windows Total Profit
Units Produced 1 1 $800
Hours Used Per Unit Produced
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.9
The Complete Solver Dialogue Box
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.10
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.11
The Solver Results Dialogue Box
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.12
The Optimal Solution
Doors Windows
Unit Profit $300 $500
Hours Hours
Used Available
Plant 1 1 0 2 <= 4
Plant 2 0 2 12 <= 12
Plant 3 3 2 18 <= 18
Doors Windows Total Profit
Units Produced 2 6 $3,600
Hours Used Per Unit Produced
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.13
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?
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.14
Profit & Gambit Co. Spreadsheet Model
3
4
5
6
7
8
9
10
11
12
13
14
B C D E F G
Television Print Media
Unit Cost ($millions) 1 2
Increased Minimum
Sales Increase
Stain Remover 0% 1% 3% >= 3%
Liquid Detergent 3% 2% 18% >= 18%
Powder Detergent -1% 4% 8% >= 4%
Total Cost
Television Print Media ($millions)
Advertising Units 4 3 10
Increase in Sales per Unit of Advertising
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.15
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.16
Applying the Graphical Method
8
6
4
2
0 2 4 6 8 1 0
-2
-4
Amount of TV advertising
Feasible
region
10
3 TV + 2 PM = 18
PM = 3
PM
TV
-TV + 4 PM = 4
Amount of print media advertising
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.17
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
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.18
A Production Problem
Weekly supply of raw materials:
8 Small Bricks 6 Large Bricks
Products:
Table
Profit = $20 / Table
Chair
Profit = $15 / Chair
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.19
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 produce
C = Number of chairs to produce
Maximize Profit = ($20)T + ($15)C
subject to
2T + C ≤ 6 large bricks
2T + 2C ≤ 8 small bricks
and
T ≥ 0, C ≥ 0.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.20
Graphical Representation
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.21
Components of a Linear Program
• Data Cells
• Changing Cells (“Decision Variables”)
• Target Cell (“Objective Function”)
• Constraints
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.22
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.23
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
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.24
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).
3
4
5
6
7
8
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Available
Large Bricks 2 1 6
Small Bricks 2 2 8
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.25
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).
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Available
Large Bricks 2 1 6
Small Bricks 2 2 8
Tables Chairs
Production Quantity: 0 0
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.26
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
G
Total Profit
=SUMPRODUCT(C4:D4,C11:D11)
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Available
Large Bricks 2 1 6
Small Bricks 2 2 8
Tables Chairs Total Profit
Production Quantity: 1 0 $20.00
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.27
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.
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Total Used Available
Large Bricks 2 1 3 <= 6
Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
6
7
8
E
Total Used
=SUMPRODUCT(C7:D7,$C$11:$D$11)
=SUMPRODUCT(C8:D8,$C$11:$D$11)
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.28
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.
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Total Used Available
Large Bricks 2 1 3 <= 6
Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.29
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.
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Total Used Available
Large Bricks 2 1 3 <= 6
Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.30
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.
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Total Used Available
Large Bricks 2 1 3 <= 6
Small Bricks 2 2 4 <= 8
Tables Chairs Total Profit
Production Quantity: 1 1 $35.00
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.31
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.32
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.”
3
4
5
6
7
8
9
10
11
B C D E F G
Tables Chairs
Profit $20.00 $15.00
Total Used Available
Large Bricks 2 1 6 <= 6
Small Bricks 2 2 8 <= 8
Tables Chairs Total Profit
Production Quantity: 2 2 $70.00
Bill of Materials
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.33
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.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.34
Example: (Multiple Optimal Solutions)
Minimize Z = 6x1 + 4x2
subject to
x1 ≤ 4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
and
x1 ≥ 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
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.35
Example: (No Feasible Solution)
Maximize Z = 3x1 + 5x2
subject to
x1 ≥ 5
x2 ≥ 4
3x1 + 2x2 ≤ 18
and
x1 ≥ 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
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003
2.36
Example: (Unbounded Solution)
Maximize Z = 5x1 + 12x2
subject to
x1 ≤ 5
2x1 –x2 ≤ 2
and
x1 ≥ 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

More Related Content

PPT
Vcs slides on or 2014
PPTX
linear programming
PDF
Optimization Problems Solved by Different Platforms Say Optimum Tool Box (Mat...
PDF
ENEL_680_Linear_and_Integer_Programming-1.pdf
PPT
Decision Making Process
PPTX
Management Science
PPTX
PPTX
chapter 2 revised.pptx
Vcs slides on or 2014
linear programming
Optimization Problems Solved by Different Platforms Say Optimum Tool Box (Mat...
ENEL_680_Linear_and_Integer_Programming-1.pdf
Decision Making Process
Management Science
chapter 2 revised.pptx

Similar to Chap002t.ppt (20)

PPTX
Hillier_10e_ch03....................pptx
PPTX
Linear programming manzoor nabi
PPT
modB.ppt modA.ppt operation management slide for business
PPTX
Operation research chapter two linear programming
PPTX
Linear Programming
PPTX
Operation research ppt chapter two mitku
PPTX
chapter 2 revised.pptx
PDF
3 Introduction To Linear Programming
PPTX
Or ch2 (2)
PPTX
introduction to Operation Research
PPT
QT Slides Class One
PPT
370_13735_EA221_2010_1__1_1_Linear programming 1.ppt
PPT
lp 2.ppt
PPTX
Introduction to Management Science and Linear Programming
PPTX
linear programing is the model that can be
PPT
13910406.ppt11112233rtyioouu6789op987899999999000
PPT
LPILP Models-1.ppt
PDF
Michael Zhang.pdf
PPTX
Quantitativetechniqueformanagerialdecisionlinearprogramming 090725035417-phpa...
PPT
Intro week3 excel vba_114e
Hillier_10e_ch03....................pptx
Linear programming manzoor nabi
modB.ppt modA.ppt operation management slide for business
Operation research chapter two linear programming
Linear Programming
Operation research ppt chapter two mitku
chapter 2 revised.pptx
3 Introduction To Linear Programming
Or ch2 (2)
introduction to Operation Research
QT Slides Class One
370_13735_EA221_2010_1__1_1_Linear programming 1.ppt
lp 2.ppt
Introduction to Management Science and Linear Programming
linear programing is the model that can be
13910406.ppt11112233rtyioouu6789op987899999999000
LPILP Models-1.ppt
Michael Zhang.pdf
Quantitativetechniqueformanagerialdecisionlinearprogramming 090725035417-phpa...
Intro week3 excel vba_114e
Ad

More from NehaSardana9 (8)

PDF
Flipkart_wired_semi_final_ppt_1686063103.pdf
PDF
Exports Merged PPT available for steel company
PPTX
SCM Case- Barilla Spa section operations case study
PPTX
Moduel 2 Readings.pptx
PPTX
financial instruments.pptx
PPTX
Session 3-4 CB.pptx
PPTX
73549-financial analysis powerpoint.pptx
PPT
9781292145150_pp07.ppt
Flipkart_wired_semi_final_ppt_1686063103.pdf
Exports Merged PPT available for steel company
SCM Case- Barilla Spa section operations case study
Moduel 2 Readings.pptx
financial instruments.pptx
Session 3-4 CB.pptx
73549-financial analysis powerpoint.pptx
9781292145150_pp07.ppt
Ad

Recently uploaded (20)

PDF
Navigating the Thai Supplements Landscape.pdf
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PDF
Optimise Shopper Experiences with a Strong Data Estate.pdf
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PPTX
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
PDF
annual-report-2024-2025 original latest.
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PDF
Microsoft 365 products and services descrption
DOCX
Factor Analysis Word Document Presentation
PDF
Business Analytics and business intelligence.pdf
PPTX
SAP 2 completion done . PRESENTATION.pptx
PDF
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
PPTX
Pilar Kemerdekaan dan Identi Bangsa.pptx
PPTX
IMPACT OF LANDSLIDE.....................
PPT
DU, AIS, Big Data and Data Analytics.ppt
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
Copy of 16 Timeline & Flowchart Templates – HubSpot.pptx
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
sac 451hinhgsgshssjsjsjheegdggeegegdggddgeg.pptx
Navigating the Thai Supplements Landscape.pdf
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Optimise Shopper Experiences with a Strong Data Estate.pdf
ISS -ESG Data flows What is ESG and HowHow
STERILIZATION AND DISINFECTION-1.ppthhhbx
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
annual-report-2024-2025 original latest.
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
Microsoft 365 products and services descrption
Factor Analysis Word Document Presentation
Business Analytics and business intelligence.pdf
SAP 2 completion done . PRESENTATION.pptx
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
Pilar Kemerdekaan dan Identi Bangsa.pptx
IMPACT OF LANDSLIDE.....................
DU, AIS, Big Data and Data Analytics.ppt
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Copy of 16 Timeline & Flowchart Templates – HubSpot.pptx
IBA_Chapter_11_Slides_Final_Accessible.pptx
sac 451hinhgsgshssjsjsjheegdggeegegdggddgeg.pptx

Chap002t.ppt

  • 1. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.1 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.
  • 2. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.2 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?
  • 3. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.3 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.
  • 4. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.4 Graph of Feasible Region 0 2 4 6 8 8 6 4 10 2 Feasible region Production rate for doors D W 2 W =12 D = 4 3 D + 2 W = 18 Production rate for windows
  • 5. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.5 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) Optimalsolution 10 W D P =3600= 300D + 500W P =3000= 300D + 500W P =1500= 300D + 500W
  • 6. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.6 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.
  • 7. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.7 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 Windows Unit Profit $300 $500 Hours Hours Used Available Plant 1 1 0 1 <= 4 Plant 2 0 2 2 <= 12 Plant 3 3 2 5 <= 18 Doors Windows Total Profit Hours Used Per Unit Produced
  • 8. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.8 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 Windows Unit Profit $300 $500 Hours Hours Used Available Plant 1 1 0 1 <= 4 Plant 2 0 2 2 <= 12 Plant 3 3 2 5 <= 18 Doors Windows Total Profit Units Produced 1 1 $800 Hours Used Per Unit Produced
  • 9. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.9 The Complete Solver Dialogue Box
  • 10. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.10 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.
  • 11. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.11 The Solver Results Dialogue Box
  • 12. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.12 The Optimal Solution Doors Windows Unit Profit $300 $500 Hours Hours Used Available Plant 1 1 0 2 <= 4 Plant 2 0 2 12 <= 12 Plant 3 3 2 18 <= 18 Doors Windows Total Profit Units Produced 2 6 $3,600 Hours Used Per Unit Produced
  • 13. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.13 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?
  • 14. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.14 Profit & Gambit Co. Spreadsheet Model 3 4 5 6 7 8 9 10 11 12 13 14 B C D E F G Television Print Media Unit Cost ($millions) 1 2 Increased Minimum Sales Increase Stain Remover 0% 1% 3% >= 3% Liquid Detergent 3% 2% 18% >= 18% Powder Detergent -1% 4% 8% >= 4% Total Cost Television Print Media ($millions) Advertising Units 4 3 10 Increase in Sales per Unit of Advertising
  • 15. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.15 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.
  • 16. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.16 Applying the Graphical Method 8 6 4 2 0 2 4 6 8 1 0 -2 -4 Amount of TV advertising Feasible region 10 3 TV + 2 PM = 18 PM = 3 PM TV -TV + 4 PM = 4 Amount of print media advertising
  • 17. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.17 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
  • 18. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.18 A Production Problem Weekly supply of raw materials: 8 Small Bricks 6 Large Bricks Products: Table Profit = $20 / Table Chair Profit = $15 / Chair
  • 19. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.19 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 produce C = Number of chairs to produce Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0.
  • 20. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.20 Graphical Representation
  • 21. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.21 Components of a Linear Program • Data Cells • Changing Cells (“Decision Variables”) • Target Cell (“Objective Function”) • Constraints
  • 22. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.22 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.
  • 23. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.23 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
  • 24. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.24 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). 3 4 5 6 7 8 B C D E F G Tables Chairs Profit $20.00 $15.00 Available Large Bricks 2 1 6 Small Bricks 2 2 8 Bill of Materials
  • 25. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.25 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). 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Available Large Bricks 2 1 6 Small Bricks 2 2 8 Tables Chairs Production Quantity: 0 0 Bill of Materials
  • 26. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.26 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 G Total Profit =SUMPRODUCT(C4:D4,C11:D11) 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Available Large Bricks 2 1 6 Small Bricks 2 2 8 Tables Chairs Total Profit Production Quantity: 1 0 $20.00 Bill of Materials
  • 27. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.27 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. 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Total Used Available Large Bricks 2 1 3 <= 6 Small Bricks 2 2 4 <= 8 Tables Chairs Total Profit Production Quantity: 1 1 $35.00 Bill of Materials 6 7 8 E Total Used =SUMPRODUCT(C7:D7,$C$11:$D$11) =SUMPRODUCT(C8:D8,$C$11:$D$11)
  • 28. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.28 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. 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Total Used Available Large Bricks 2 1 3 <= 6 Small Bricks 2 2 4 <= 8 Tables Chairs Total Profit Production Quantity: 1 1 $35.00 Bill of Materials
  • 29. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.29 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. 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Total Used Available Large Bricks 2 1 3 <= 6 Small Bricks 2 2 4 <= 8 Tables Chairs Total Profit Production Quantity: 1 1 $35.00 Bill of Materials
  • 30. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.30 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. 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Total Used Available Large Bricks 2 1 3 <= 6 Small Bricks 2 2 4 <= 8 Tables Chairs Total Profit Production Quantity: 1 1 $35.00 Bill of Materials
  • 31. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.31 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.
  • 32. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.32 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.” 3 4 5 6 7 8 9 10 11 B C D E F G Tables Chairs Profit $20.00 $15.00 Total Used Available Large Bricks 2 1 6 <= 6 Small Bricks 2 2 8 <= 8 Tables Chairs Total Profit Production Quantity: 2 2 $70.00 Bill of Materials
  • 33. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.33 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.
  • 34. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.34 Example: (Multiple Optimal Solutions) Minimize Z = 6x1 + 4x2 subject to x1 ≤ 4 2x2 ≤ 12 3x1 + 2x2 ≤ 18 and x1 ≥ 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
  • 35. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.35 Example: (No Feasible Solution) Maximize Z = 3x1 + 5x2 subject to x1 ≥ 5 x2 ≥ 4 3x1 + 2x2 ≤ 18 and x1 ≥ 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
  • 36. McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 2.36 Example: (Unbounded Solution) Maximize Z = 5x1 + 12x2 subject to x1 ≤ 5 2x1 –x2 ≤ 2 and x1 ≥ 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