37
© The McGraw-Hill Companies, Inc., 2003 1.١ Irwin/McGraw-Hill Linear Programming: Basic Concepts

Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

© The McGraw-Hill Companies, Inc., 20031.١Irwin/McGraw-Hill

Linear Programming: Basic Concepts

Page 2: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢Dr. Samia Rouibah

Introduction• The management of any organization make Decision about how to allocate its

resources to various activities to best meet organizational objectives

• Linear Programming (LP) is a powerful problem-solving tool

• Applicable to both profit-making and not-for-profit organization

• Wide variety of resources must be allocated simultaneously to activities– Resources: money, different kind of personnel, machinery and equipment– Activities: production, marketing, financial

• Applications of LP go beyond the allocation of resources, however activities are always involved

• Find the best mix of activities (which one to pursue and at what level)

• LP uses a Mathematical Model

• Linear Programming means the planning of activities represented by a linear mathematical model

Page 3: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣Dr. Samia Rouibah

Three Classic Applications of LP

• Product Mix at Ponderosa Industrial– Considered limited resources, and determined optimal mix of products sold in a

competitive environment.– 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 (4000 reservations sales, 11 reservations offices, 1000 customer service agents at 10 largest airports).

– 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’sprofits.

Standard for future applications in Linear Programming

Page 4: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٤Dr. Samia Rouibah

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 (the number of units of each produced per

week) for the two new products that would maximize the total profit?

Page 5: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٥Dr. Samia Rouibah

The Management Science Group Begins its Work

• Should Consider all possible combination of production rates

• Identifies the needed information to conduct this study– Available production capacity in each of the plants– How much of the production capacity in each plant would be needed by

each product– Profitability of each product

$500$300Unit Profit18 hours2 hours3 hours312 hours2 hours024 hours01 hour1

Available per week

WindowsDoorsPlant

Production Time Usedfor Each Unit Produced

Page 6: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٦Dr. Samia Rouibah

Formulating the Wyndor Problem on a Spreadsheet

• Transfer the data onto a spreadsheet• Need to answer 3 questions

– What are the decisions to be made (Decision Variable)?– What are the constraints on these decisions (Constraints)?– What is the overall measure of performance for these decisions (Objective

Function)?

• Answer– Variables: Number of units produced per week for the two new products– Constraints: Hours of production time used per week cannot exceed the

number of hours available– Objective Function: Maximizing the total profit per week from the two

products

Page 7: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٧Dr. Samia Rouibah

Developing a Spreadsheet Model

• Step #1: Data Cells– Enter all of the data for the problem on the spreadsheet.– The cells showing the data are the Data cells shaded light blue– Data cells are given range name: profit(C4:D4),

HoursUsedPerUnitProduced (C7:D9), and HoursAvailable(G7:G9)

Doors WindowsUnit Profit $300 $500

HoursAvailable

Plant 1 1 0 4Plant 2 0 2 12Plant 3 3 2 18

Hours Used Per Unit Produced

Page 8: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٨Dr. Samia Rouibah

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).

Doors WindowsUnit Profit $300 $500

HoursAvailable

Plant 1 1 0 4Plant 2 0 2 12Plant 3 3 2 18

Doors WindowsUnits Produced 0 0

Hours Used Per Unit Produced

Page 9: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٩Dr. Samia Rouibah

Developing a Spreadsheet Model

• Step #3: Constraints (Output cells)– 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.

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

56789

EHoursUsed

=SUMPRODUCT(C7:D7,UnitsProduced)=SUMPRODUCT(C8:D8,UnitsProduced)=SUMPRODUCT(C9:D9,UnitsProduced)

Cells providing output that depends on the changing cells are called output cells

Page 10: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٠Dr. Samia Rouibah

Developing a Spreadsheet Model

• Step #4: 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).

Doors WindowsUnit Profit $300 $500

HoursAvailable

Plant 1 1 0 4Plant 2 0 2 12Plant 3 3 2 18

Doors Windows Total ProfitUnits Produced 1 1 $800

Hours Used Per Unit Produced

1112

GTotal Profit

=SUMPRODUCT(UnitProfit,UnitsProduced)

Target cell is made as large as possible when making decisions

Page 11: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١١Dr. Samia Rouibah

A Trial Solution

Doors WindowsUnit Profit $300 $500

Hours HoursUsed Available

Plant 1 1 0 4 <= 4Plant 2 0 2 6 <= 12Plant 3 3 2 18 <= 18

Doors Windows Total ProfitUnits Produced 4 3 $2,700

Hours Used Per Unit Produced

•The spreadsheet for the Wyndor problem with a trial solution (4 doors and 3 windows) entered into the changing cells.

•Does this trial solution provide the best mix production (Optimal Solution)? Not necessarily.

Page 12: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٢Dr. Samia Rouibah

This Spreadsheet Model is a LP Model (see p.34)

• Summary of the formulation procedure1. Gather the data for the problem2. Enter the data into data cells on a spreadsheet3. Identify the decisions to be made on the levels of activities and

designate changing cells for displaying these decisions4. Identify the constraints on these decisions and introduce output cells as

needed to specify these constraints5. Choose the overall measure of performance to be entered into the target

cell6. Use a SUMPRODUCT function to enter the appropriate value into

each output cell (including the target cell)

3 and 6 are key for differentiating a LP model from other kinds of mathematical models on spreadsheet

Page 13: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٣Dr. Samia Rouibah

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 ≤ 123D + 2W ≤ 18

andD ≥ 0, W ≥ 0.

Page 14: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٤Dr. Samia Rouibah

The Graphical Method for Solving Two-Variable Problems

The graphical method provides helpful intuition about linear programming

Page 15: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٥Dr. Samia Rouibah

Displaying Solutions as Points on a Graph:Graphing the Product Mix

Prod

uctio

n ra

te (u

nits

per

wee

k) fo

r win

dow

s

A product mix of

A product mix of

1

2

3

4

5

6

7

8

0

-1

-1-2 1 2 3 4 5 6 7 8

-2

Prod

uctio

n ra

te (u

nits

per

wee

k) fo

r win

dow

s

Production rate (units per week) for doors

(4, 6)

(2, 3)

D = 4 and W = 6

D = 2 and W = 3

Origin

D

W

Page 16: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٦Dr. Samia Rouibah

Graph Showing Constraints: D ≥ 0 and W ≥ 0

Prod

uctio

n ra

te fo

r win

dow

s

8

6

4

2

2 4 6 80

Production rate for doors

Prod

uctio

n ra

te fo

r win

dow

s

D

W

Page 17: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٧Dr. Samia Rouibah

Nonnegative Solutions Permitted by D ≤ 4

Prod

uctio

n ra

te fo

r win

dow

s

D

W

8

6

4

2

2 4 6 80Production rate for doors

Prod

uctio

n ra

te fo

r win

dow

s

D = 4

The constraint boundary equation is obtained by replacing the inequality sign by the equality sign

Page 18: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٨Dr. Samia Rouibah

Nonnegative Solutions Permitted by 2W ≤ 12

Production rate for doors

8

6

4

2

2 4 6 80

2 W = 12

D

WProduction rate for windows

Page 19: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science١٩Dr. Samia Rouibah

Boundary Line for Constraint 3D + 2W ≤ 18

Production rate for doors

8

6

4

2

2 4 6 80

10

(0, 9)

(2, 6)

(4, 3)

21_(1, 7 )

21_(3, 4 )

21_(5, 1 )

(6, 0)

3 D + 2 W = 18

D

WProduction rate for windows

Page 20: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٠Dr. Samia Rouibah

Changing Right-Hand Side Creates Parallel Constraint Boundary Lines

12

10

8

6

4

2

0 2 4 6 8 10

Production rate for doorsD

W

3D + 2W = 24

3D + 2W = 18

3D + 2W = 12

Production rate for windows

Page 21: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢١Dr. Samia Rouibah

Nonnegative Solutions Permitted by3D + 2W ≤ 18

8

6

4

0 2 4 6 8

10

2

Production rate for doorsD

W

3D + 2W = 18

Production rate for windows

Page 22: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٢Dr. Samia Rouibah

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

Page 23: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٣Dr. Samia Rouibah

Objective Function (P = 1,500)

0 2 4 6 8

8

6

4

2

Production rate

for windows

Production rate for doors

Feasible

regionP = 1500 = 300D + 500W

D

W

Page 24: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٤Dr. Samia Rouibah

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

Page 25: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٥Dr. Samia Rouibah

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.

Page 26: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٦Dr. Samia Rouibah

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.

3456789

101112

B C D E F GDoors Windows

Unit Profit $300 $500Hours HoursUsed Available

Plant 1 1 0 1 <= 1Plant 2 0 2 2 <= 12Plant 3 3 2 5 <= 18

Doors Windows Total ProfitUnits Produced 1 1 $800

Hours Used Per Unit Produced

Page 27: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٧Dr. Samia Rouibah

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.

3456789

101112

B C D E F GDoors Windows

Unit Profit $300 $500Hours HoursUsed Available

Plant 1 1 0 1 <= 1Plant 2 0 2 2 <= 12Plant 3 3 2 5 <= 18

Doors Windows Total ProfitUnits Produced 1 1 $800

Hours Used Per Unit Produced

Page 28: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٨Dr. Samia Rouibah

The Complete Solver Dialogue Box

Page 29: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٢٩Dr. Samia Rouibah

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.

Page 30: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٠Dr. Samia Rouibah

The Solver Results Dialogue Box

Page 31: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣١Dr. Samia Rouibah

The Optimal Solution

3456789

101112

B C D E F GDoors Windows

Unit Profit $300 $500Hours HoursUsed Available

Plant 1 1 0 2 <= 1Plant 2 0 2 12 <= 12Plant 3 3 2 18 <= 18

Doors Windows Total ProfitUnits Produced 2 6 $3,600

Hours Used Per Unit Produced

Page 32: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٢Dr. Samia Rouibah

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.

Page 33: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٣Dr. Samia Rouibah

Components of a Linear Program

• Data Cells

• Changing Cells (“Decision Variables”)

• Target Cell (“Objective Function”)

• Constraints

Page 34: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٤Dr. Samia Rouibah

Four Assumptions of Linear Programming

• Linearity

• Divisibility

• Certainty

• Nonnegativity

Page 35: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٥Dr. Samia Rouibah

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

Page 36: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٦Dr. Samia Rouibah

The Graphical Method for Solving LP’s

• Formulate the problem as a linear program

• Plot the constraints

• Identify the feasible region

• Draw an imaginary line parallel to the objective function (Z = a)

• Find the optimal solution

Page 37: Linear Programming: Basic Concepts · 2007-02-27 · • Linear Programming (LP) is a powerful problem-solving tool • Applicable to both profit-making and not-for-profit organization

Introduction to Management Science٣٧Dr. Samia Rouibah

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.