Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical...

24
Chapter 7 Chapter 7 Linear Programming Models: Linear Programming Models: Graphical and Computer Methods © 2008 Prentice-Hall, Inc. Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna Introduction Introduction Many management decisions involve trying to make the most effective use of limited resources M hi lb ti h Machinery, labor, money, time, warehouse space, raw materials Linear programming Linear programming (LP LP) is a widely used mathematical modeling technique designed to help managers in planning and decision making relative to limited resource allocation relative to limited resource allocation Belongs to the broader field of mathematical mathematical programming programming programming programming In management science, programming programming refers to modeling and solving a problem mathematically 7 – 2 it is not the same as computer programming Examples of Successful LP Applications Development of a production schedule that will LP has been applied in many areas over the past 50 years Development of a production schedule that will satisfy future demands for a firm’s production while minimizing minimizing total production and inventory costs Determination of grades of petroleum products to yield the maximum maximum profit yield the maximum maximum profit Selection of different blends of raw materials to feed mills to produce finished feed combinations at minimum minimum cost at minimum minimum cost Determination of a distribution system that will minimize minimize total shipping cost from several h t i ktl ti 7 – 3 warehouses to various market locations Requirements of a Linear Programming Problem All LP problems have 4 properties in common 1. All problems seek to maximize maximize or minimize minimize some tit ll fit t (th bj ti f ti bj ti f ti ) quantity, usually profit or cost (the objective function objective function) 2. The presence of restrictions or constraints constraints that limit the degree to which we can pursue our objective the degree to which we can pursue our objective 3. There must be alternative courses of action to choose from 4. The objective and constraints in problems must be expressed in terms of linear linear equations or inequalities inequalities 2A +5B = 10 (linear equation) 2A + 5B = 10 (linear equation) 3A + 2B < 25 (linear inequality) 2A 2 + 5B 3 + 3AB < 10 (non-linear inequality) 7 – 4

Transcript of Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical...

Page 1: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Chapter 7Chapter 7Linear Programming Models:Linear Programming Models:

Graphical and Computer Methods

© 2008 Prentice-Hall, Inc.Quantitative Analysis for Management, Tenth Edition,by Render, Stair, and Hanna

IntroductionIntroduction

Many management decisions involve trying to make the most effective use of limited resources

M hi l b ti hMachinery, labor, money, time, warehouse space, raw materials

Linear programmingLinear programming (LPLP) is a widely used p g gp g g ( ) ymathematical modeling technique designed to help managers in planning and decision making relative to limited resource allocationrelative to limited resource allocationBelongs to the broader field of mathematical mathematical programmingprogrammingprogrammingprogrammingIn management science, programmingprogramming refers to modeling and solving a problem mathematically –

7 – 2

g g yit is not the same as computer programming

Examples of Successful LP Applications

Development of a production schedule that will

LP has been applied in many areas over the past 50 years

Development of a production schedule that will satisfy future demands for a firm’s production while minimizingminimizing total production and inventory gg p ycosts

Determination of grades of petroleum products to yield the maximummaximum profityield the maximummaximum profitSelection of different blends of raw materials to feed mills to produce finished feed combinations at minimumminimum costat minimumminimum costDetermination of a distribution system that will minimizeminimize total shipping cost from several

h t i k t l ti

7 – 3

warehouses to various market locations

Requirements of a Linear Programming Problem

All LP problems have 4 properties in common1. All problems seek to maximizemaximize or minimizeminimize some

tit ll fit t (th bj ti f tibj ti f ti )quantity, usually profit or cost (the objective functionobjective function)2. The presence of restrictions or constraintsconstraints that limit

the degree to which we can pursue our objectivethe degree to which we can pursue our objective3. There must be alternative courses of action to choose

from4. The objective and constraints in problems must be

expressed in terms of linearlinear equations or inequalitiesinequalities2A + 5B = 10 (linear equation)2A + 5B = 10 (linear equation)3A + 2B < 25 (linear inequality)2A2 + 5B3 + 3AB < 10 (non-linear inequality))

7 – 4

( q y))

Page 2: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Requirements of a Linear Programming Problem

In a linear equation, each term is either a constant or the product of a constant and p(the first power of) a single variable. The general linear equation in n variablesThe general linear equation in n variables is:

bXaXaXa nn =+++ ......2211

7 – 5

LP Properties and AssumptionsLP Properties and Assumptions

PROPERTIES OF LINEAR PROGRAMS1. One objective function2. One or more constraints3. Alternative courses of action4. Objective function and constraints are linearASSUMPTIONS OF LP1. Certainty2. Proportionality3. Additivity4. Divisibility

7 – 6

5. Nonnegative variablesTable 7.1

Basic Assumptions of LPBasic Assumptions of LP

We assume conditions of certaintycertainty exist and numbers in the objective and constraints are known with certainty and do not change during the y g gperiod being studiedWe assume proportionalityproportionality exists in the objective and constraints if 1 unit of product uses 3 hoursand constraints – if 1 unit of product uses 3 hours then 10 units of that product use 30 hoursWe assume additivityadditivity in that the total of all yyactivities equals the sum of the individual activitiesWe assume divisibilitydivisibility in that solutions need not be whole numbers – they are divisible and may takewhole numbers – they are divisible and may take any fractional valueAll answers or variables are nonnegative nonnegative – negative

f

7 – 7

values of physical quantities are impossible

Formulating LP ProblemsFormulating LP Problems

Formulating a linear program involves developing a mathematical model to represent the managerial problemproblemThe steps in formulating a linear program are

1 Completely understand the managerial1. Completely understand the managerial problem being faced

2. Identify the objective and constraintsy j3. Define the decision variables4. Use the decision variables to write

fmathematical expressions for the objective function and the constraints

7 – 8

Page 3: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Formulating LP ProblemsFormulating LP Problems

One of the most common LP applications is the product mix problemproduct mix problemT d t d d iTwo or more products are produced using limited resources such as personnel, machines, and raw materialsThe profit that the firm seeks to maximize is based on the profit contribution per unit of each

d tproductThe company would like to determine how many units of each product it should producemany units of each product it should produce so as to maximize overall profit given its limited resources

7 – 9

Flair Furniture CompanyFlair Furniture Company

The Flair Furniture Company produces inexpensive tables and chairsB th d t i t i b f h fBoth products require a certain number of hours of carpentry work and certain number of labor hours in the painting and varnishing departmentt e pa t g a d a s g depa t e tEach table takes 4 hours of carpentry and 2 hours of painting and varnishingEach chair requires 3 hours of carpentry and 1 hour of painting and varnishingThere are 240 hours of carpentry time and 100 hoursThere are 240 hours of carpentry time and 100 hours of painting and varnishing time available each week Each table yields a profit of $70 and each chair a

7 – 10

Each table yields a profit of $70 and each chair a profit of $50

Flair Furniture CompanyFlair Furniture CompanyThe company wants to determine the bestThe company wants to determine the best combination of tables and chairs to produce to reach the maximum profitThis problem can be formulated as an LP problem

HOURS REQUIREDHOURS REQUIRED TO PRODUCE 1 UNIT

DEPARTMENT(T)

TABLES(C)

CHAIRSAVAILABLE HOURS THIS WEEKDEPARTMENT TABLES CHAIRS THIS WEEK

Carpentry 4 3 240

Painting and varnishing 2 1 100Painting and varnishing 2 1 100

Profit per unit $70 $50

7 – 11

Table 7.2: Summarizing the information to better understand the problem

Flair Furniture CompanyFlair Furniture Company

The objective is toMaximize profit

Th t i tThe constraints are1. The hours of carpentry time used cannot

exceed 240 hours per weekexceed 240 hours per week2. The hours of painting and varnishing time

used cannot exceed 100 hours per weekpThe decision variables representing the actual decisions we will make areT = number of tables to be produced per weekC = number of chairs to be produced per week

7 – 12

Page 4: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Flair Furniture CompanyFlair Furniture Company

We create the LP objective function in terms of Tand C

Maximize profit = $70T + $50CDevelop mathematical relationships for the two

t i tconstraintsFor carpentry, total time used is

(4 hours per table)(Number of tables produced)+ (3 hours per chair)(Number of chairs produced)

We know thatWe know thatCarpentry time used ≤ Carpentry time available

7 – 13

4T + 3C ≤ 240 (hours of carpentry time)

Flair Furniture CompanyFlair Furniture CompanySimilarlySimilarly

Painting and varnishing time used ≤ Painting and varnishing time availableg g

2 T + 1C ≤ 100 (hours of painting and varnishing time)

This means that each table produced requires two hours of painting and varnishing timevarnishing time

Both of these constraints restrict production pcapacity and affect total profit

7 – 14

Flair Furniture CompanyFlair Furniture CompanyThe values for T and C must be nonnegativeThe values for T and C must be nonnegative

T ≥ 0 (number of tables produced is greater than or equal to 0)than or equal to 0)

C ≥ 0 (number of chairs produced is greater than or equal to 0)

The complete problem is stated mathematically as

Maximize profit = $70T + $50CMaximize profit = $70T + $50Csubject to

4T 3C ≤ 2404T + 3C ≤ 240 (carpentry constraint)2T + 1C ≤ 100 (painting and varnishing constraint)

T C ≥ 0 (nonnegati it constraint)

7 – 15

T, C ≥ 0 (nonnegativity constraint)

Graphical Solution to an LP ProblemGraphical Solution to an LP Problem

The easiest way to solve a small LP problems is with the graphical solution approach (2D coordinate system)approach (2D coordinate system)The graphical method only works when there are just two decision variablesthere are just two decision variablesWhen there are more than two variables, a more complex approach is needed as it ismore complex approach is needed as it is not possible to plot the solution on a two-dimensional graphdimensional graphThe graphical method provides valuable insight into how other approaches work

7 – 16

insight into how other approaches work

Page 5: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Graphical Representation of a Constraint

The first step in solving the problem is to identify a set or region of feasible solutionsT d thi l t h t i t tiTo do this we plot each constraint equation on a graph (2D coordinate frame – Fig. 7.1)Th ti it t i t th tThe nonnegativity constraints mean that we are always working in the first (or northeast) quadrant (see Fig. 7.1)quadrant (see Fig. 7.1)We start by graphing the equality portion of the first (carpentry hour) constraint( p y )

4T + 3C = 240It is a straight line and we need to find any

7 – 17

It is a straight line and we need to find any two points to draw the line

Graphical Representation of a Constraint

100 –

C

Thi A i R t th C t i t T ≥ 0–80 –

Cha

irs

This Axis Represents the Constraint T ≥ 0

60 ––

40 –umbe

r of C

This Axis Represents the–

20 –

Nu This Axis Represents the

Constraint C ≥ 0

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

7 – 18

Number of TablesFigure 7.1

Graphical Representation of a Constraint

The two easiest points are the points at which the line intercepts the T and C axesWh Fl i d t bl (T 0) thWhen Flair produces no tables (T = 0), the carpentry constraint is

4(0) + 3C = 2404(0) + 3C = 2403C = 240

C = 80C = 80Similarly for no chairs (C = 0)

4T + 3(0) = 2404T + 3(0) = 2404T = 240

T = 60

7 – 19

T = 60This line is shown on the following graph

Graphical Representation of a Constraint

100 –

CThe line represent all combinations of (T, C) that satisfy the carpentry

–80 –

–hairs (T = 0, C = 80)

constraint equation: 4T + 3C = 240

60 ––

40mbe

r of C

h

40 ––

20 –

Num

(T = 60, C = 0)

––| | | | | | | | | | | |

0 20 40 60 80 100 T

7 – 20

Number of TablesFigure 7.2

Page 6: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Graphical Representation of a Constraint

We need to identify all points (i.e. the region) that satisfy the constraint inequality: 4T + 3C ≤ 240There are three possible solution points thoseThere are three possible solution points – those on the line, below the line and above the lineThe point (30, 40) lies on the line and exactlyThe point (30, 40) lies on the line and exactly satisfies the constraint

4(30) + 3(40) = 240The point (30, 20) lies below the line and satisfies the constraint

4(30) + 3(20) = 180 ≤ 2404(30) + 3(20) = 180 ≤ 240The point (70, 40) lies above the line and does not satisfy the constraint

7 – 21

satisfy the constraint4(70) + 3(40) = 400 > 240

Graphical Representation of a Constraint

100 –

C Conclusion:Any point on or below the constraint

l t ill t i l t th t i ti–

80 ––ha

irs

plot will not violate the restriction (shaded area)Any point above the plot will violate th t i ti–

60 ––

mbe

r of C

h the restriction

(30, 40) (70, 40)40 ––

20 –

Num

(30, 40) (70, 40)

––| | | | | | | | | | | |

0 20 40 60 80 100 T

(30, 20)

7 – 22

Number of TablesFigure 7.3

Graphical Representation of a Constraint

Next we need to do the same for the second (painting and varnishing hour)

t i tconstraint : 2T + 1C ≤ 100

We start by graphing the equality portion of the constraint:of the constraint:

2T + 1C = 100The two points at which the line intercepts the T and C axes are:

7 – 23

(T =0, C =100) and (T =50, C =0)

Graphical Representation of a Constraint

100 –

C

(T = 0, C = 100)–

80 ––

Cha

irs Graph of painting and varnishing constraint equation – the shaded

60 ––

40 –umbe

r of C area represents all the possible

solution points

–20 –

Nu

(T = 50, C = 0)

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

7 – 24

Number of TablesFigure 7.4

Page 7: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Graphical Representation of a Constraint

To produce tables and chairs, both carpentry and painting and varnishing departments must be usedWe need to find a solution that satisfies both constraints simultaneouslysimultaneouslyA new graph is drawn to show both constraintA new graph is drawn to show both constraint plots (Fig. 7.5)The feasible regionfeasible region (or area of feasible solutionsarea of feasible solutions) isThe feasible regionfeasible region (or area of feasible solutionsarea of feasible solutions) is where all constraints are satisfied – i.e. the overlapped areaA i t i id thi i i f iblf ibl l tiAny point inside this region is a feasiblefeasible solutionAny point outside the region is an infeasibleinfeasiblesolution

7 – 25

solution

Graphical Representation of a Constraint

100 –

C Feasible solution region for Flair Furniture

–80 –

Cha

irs Painting/Varnishing Constraint

60 ––

40 –umbe

r of C

–20 –

Nu

Carpentry ConstraintFeasible Region–

–| | | | | | | | | | | |0 20 40 60 80 100 T

Number of Tables

g

7 – 26

Number of TablesFigure 7.5

Graphical Representation of a Constraint

For the point (30 20)For the point (30, 20)

Carpentry constraint

4T + 3C ≤ 240 hours available(4)(30) + (3)(20) 180 h dconstraint (4)(30) + (3)(20) = 180 hours used

Painting constraint

2T + 1C ≤ 100 hours available(2)(30) + (1)(20) = 80 hours usedconstraint (2)(30) + (1)(20) 80 hours used

For the point (70, 40)p ( )

Carpentry constraint

4T + 3C ≤ 240 hours available(4)(70) + (3)(40) = 400 hours used( )( ) ( )( )

Painting constraint

2T + 1C ≤ 100 hours available(2)(70) + (1)(40) = 180 hours used

7 – 27

Graphical Representation of a Constraint

For the point (50 5)For the point (50, 5)

Carpentry constraint

4T + 3C ≤ 240 hours available(4)(50) + (3)(5) 215 h dconstraint (4)(50) + (3)(5) = 215 hours used

Painting constraint

2T + 1C ≤ 100 hours available(2)(50) + (1)(5) = 105 hours usedconstraint (2)(50) + (1)(5) 105 hours used

7 – 28

Page 8: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Isoprofit Line Solution MethodIsoprofit Line Solution Method

Once the feasible region has been graphed, we need to find the optimal solution from the many possible solutionspossible solutions

It is the point lying in the feasible region that produces the highest profit

The speediest way to do this is to use the isoprofitline methodStarting with a small but possible profit value weStarting with a small but possible profit value, we graph the objective function (a straight line)We move the objective function line in the jdirection of increasing profit while maintaining the slope (isoprofit lines are parallel to each other)Th l t i t th li t h i th f ibl

7 – 29

The last point the line touches in the feasible region is the optimal solution

Isoprofit Line Solution MethodIsoprofit Line Solution Method

$For Flair Furniture, choose a profit of $2,100The objective function is then

$2 100 70T + 50C$2,100 = 70T + 50CSolving for the axis intercepts which are (0, 42) and (30 0) we can draw the graphand (30, 0), we can draw the graphThe line represents all combinations of (T, C) that yield a total profit of $2,100This is obviously not the best possible solutionFurther graphs can be created using larger profitsThe further away we move from the origin, the larger the profit will beThe highest profit ($4 100) will be generated when

7 – 30

The highest profit ($4,100) will be generated when the isoprofit line passes through the point (30, 40)

Isoprofit Line Solution MethodIsoprofit Line Solution Method

100 –

C Isoprofit line at $2,100

–80 –

Cha

irs

60 ––

40 –umbe

r of C

$2,100 = $70T + $50C(0, 42)

–20 –

Nu

(30, 0)

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

7 – 31

Number of TablesFigure 7.6

Isoprofit Line Solution MethodIsoprofit Line Solution Method

100 –

C Four isoprofit lines

–80 –

Cha

irs

$2,800 = $70T + $50C

$3,500 = $70T + $50C

60 ––

40 –umbe

r of C

$2,100 = $70T + $50C

,

–20 –

Nu

$4,200 = $70T + $50C

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

7 – 32

Number of TablesFigure 7.7

Page 9: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Isoprofit Line Solution MethodIsoprofit Line Solution Method

100 –

C Optimal solution to the Flair Furniture problem

–80 –

Cha

irs Maximum Profit Line

60 ––

40 –umbe

r of C Optimal Solution Point

(T = 30, C = 40)

–20 –

Nu

$4,100 = $70T + $50C

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

7 – 33

Number of TablesFigure 7.8

Corner Point Solution Method

A d h t l i LP bl

Corner Point Solution Method

A second approach to solving LP problems employs the corner point methodcorner point methodIt is a simpler technique but involvesIt is a simpler technique but involves looking at the profit at every corner point of the feasible regiongThe mathematical theory behind LP is that the optimal solution must lie at one of the

i ti t t i tt i t i thcorner pointscorner points, or extreme pointextreme point, in the feasible regionFor Flair Furniture the feasible region is aFor Flair Furniture, the feasible region is a four-sided polygon with four corner points labeled 1, 2, 3, and 4 on the graph

7 – 34

, , , g p

Corner Point Solution MethodCorner Point Solution Method

100 –

C Four corner points of the feasible region

–80 –

Cha

irs

2

60 ––

40 –umbe

r of C

3

–20 –

Nu

––| | | | | | | | | | | |

0 20 40 60 80 100 TNumber of Tables

14

7 – 35

Number of TablesFigure 7.9

Corner Point Solution MethodCorner Point Solution Method

( ) f $ ( ) $ ( ) $12

Point : (T = 0, C = 0) Profit = $70(0) + $50(0) = $0Point : (T = 0, C = 80) Profit = $70(0) + $50(80) = $4,000P i ( 0 0) P fi $ 0( 0) $ 0(0) $3 00

34Point : (T = 50, C = 0) Profit = $70(50) + $50(0) = $3,500

Point : (T = 30, C = 40) Profit = $70(30) + $50(40) = $4,100

Because Point returns the highest profit, this is the optimal solution

3

To find the coordinates for Point accurately we have to solve for the intersection of the two constraint lines

3

constraint lines4T + 3C = 240 (carpentry line)2T + 1C = 100 (painting line)

7 – 36

2T + 1C 100 (painting line)The details of this are on the following slide

Page 10: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Corner Point Solution MethodCorner Point Solution Method

Using the simultaneous equations methodsimultaneous equations method, we multiply the painting equation by –2 and add it to th t tithe carpentry equation

4T + 3C = 240 (carpentry line)– 4T – 2C =–200 (painting line)

C = 40Substituting 40 for C in either of the original equations allows us to determine the value of T

4T + (3)(40) = 240 (carpentry line)4T + 120 = 240

30

7 – 37

T = 30

Summary of Graphical Solution Methods

ISOPROFIT METHOD1. Graph all constraints and find the feasible region.2 Select a specific profit (or cost) line and graph it to find the slope2. Select a specific profit (or cost) line and graph it to find the slope.3. Move the objective function line in the direction of increasing profit

(or decreasing cost) while maintaining the slope. The last point it touches in the feasible region is the optimal solutiontouches in the feasible region is the optimal solution.

4. Find the values of the decision variables at this last point and compute the profit (or cost).

CORNER POINT METHOD1. Graph all constraints and find the feasible region.2 Find the corner points of the feasible reason2. Find the corner points of the feasible reason.3. Compute the profit (or cost) at each of the feasible corner points.4. Select the corner point with the best value of the objective function

7 – 38

p jfound in step 3. This is the optimal solution.

Table 7.3

Solving Flair Furniture’s LP Problem Using QM for Windows and Excel

Most organizations have access to software to solve big LP problemsWhile there are differences between software implementations, the approach

h t k t d h dli LP ieach takes towards handling LP is basically the sameO i d i d li ithOnce you are experienced in dealing with computerized LP algorithms, you can easily adjust to minor changeseasily adjust to minor changes

7 – 39

Using QM for WindowsUsing QM for Windows

First select the Linear Programming moduleSpecify the number of constraints (non-negativity is ass med)is assumed)Specify the number of decision variablesSpecify whether the objective is to be maximizedSpecify whether the objective is to be maximized or minimizedFor the Flair Furniture problem there are two pconstraints, two decision variables, and the objective is to maximize profit

7 – 40

Page 11: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Using QM for WindowsUsing QM for Windows

Computer screen for input of data

Program 7.1A

7 – 41

Using QM for WindowsUsing QM for Windows

Computer screen for input of data

Program 7.1B

7 – 42

Using QM for WindowsUsing QM for Windows

Computer screen for output of solution

Program 7.1C

7 – 43

Using QM for WindowsUsing QM for Windows

Graphical output of solutionGraphical output of solution

7 – 44

Program 7.1D

Page 12: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Using Excel’s Solver Command to Solve LP Problems

The Solver tool in Excel can be used to find solutions to

LP blLP problemsInteger programming problemsNoninteger programming problemsNoninteger programming problems

Solver may be sensitive to the initial values it usesSolver is limited to 200 variables and 100Solver is limited to 200 variables and 100 constraintsIt can be used for small real world problemspAdd-ins like What’sBest! Can be used to expand Solver’s capabilities

7 – 45

Using Solver to Solve the Flair Furniture Problem

Recall the model for Flair Furniture is

Maximize profit = $70T + $50CMaximize profit $70T $50CSubject to 4T + 3C ≤ 240

2T + 1C ≤ 100

To use Solver, it is necessary to enter formulas based on the initial modelbased on the initial modelProgram 7.2A shows how the data and formulas are entered into Solver to solve this problempThe following slide details the steps in creating the Solver model

7 – 46

Using Solver to Solve the Flair Furniture Problem

Program 7 2AProgram 7.2A

7 – 47

Using Solver to Solve the Flair Furniture Problem

1. Modify the variable names and the constraint names if needed

2. Enter the coefficients for the objective function and constraints

3. Indicate constraint signs (≤, =, and ≥) for display purposes only

4. Input the right-hand side values for each constraint

5. Initialize the values of the variables to 1s to make it easier to check the formula

7 – 48

Page 13: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Using Solver to Solve the Flair Furniture Problem

Once the model has been entered the followingOnce the model has been entered, the following steps can be used to solve the problem

1A In Excel 2003 select ToolsTools SolverSolver1A. In Excel 2003, select ToolsTools——SolverSolver1B. In Excel 2007, select the DataData tab and then select

SolverSolver in the AnalysisAnalysis groupyy g p

If Solver does not appear in the indicated place, follow the installation instructions in the text

2. Once Solver has been selected, a window will f th i t f th S l P t M kopen for the input of the Solver Parameters. Make

sure all the parameters set by Solver are correct

7 – 49

Using Solver to Solve the Flair Furniture Problem

3. The Set Target CellSet Target Cell contains the cell that is used to calculate the value of the objective function.j

4. The By Changing CellsBy Changing Cells box contains the cells that will hold the values for the variables

5. The Subject to the ConstraintsSubject to the Constraints box contains the constraints for the model

6 In the Solver ParametersSolver Parameters window click OptionsOptions6. In the Solver ParametersSolver Parameters window, click OptionsOptionsand check Assume Linear ModelAssume Linear Model and check Assume NonAssume Non--negativenegative, as illustrated in Program 7.2C, then click OKOK

7 – 50

Using Solver to Solve the Flair Furniture Problem

7. Review the information in the Solver window to make sure it is correct, and click Solve

8. The Solver SolutionsSolver Solutions window in Program 7.2D is displayed and indicates that a solution was found Select Keep Solver SolutionKeep Solver Solution and thefound. Select Keep Solver SolutionKeep Solver Solution, and the values in the spreadsheet will be kept at the optimal solution. You may select what sort of

ddi i l i f i ( A S i i iA S i i iadditional information (e.g., Answer, Sensitivity, Answer, Sensitivity, etc.etc.) is to be presented from the reports Window.

7 – 51

Using Solver to Solve the Flair Furniture Problem

7 – 52

Program 7.2C

Page 14: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Using Solver to Solve the Flair Furniture Problem

7 – 53

Program 7.2D

Using Solver to Solve the Flair Furniture Problem

E l’ t f th Fl i F it blExcel’s answer report for the Flair Furniture problem

7 – 54

Program 7.2E

Solving Minimization ProblemsSolving Minimization Problems

Many LP problems involve minimizing an objective such as cost instead of maximizing a profit functionfunctionMinimization problems can be solved graphically by first setting up the feasible solution region and y g gthen using either the corner point method or an isocost line approach (which is analogous to the isoprofit approach in maximization problems) toisoprofit approach in maximization problems) to find the values of the decision variables (e.g., X1and X2) that yield the minimum cost

7 – 55

Holiday Meal Turkey RanchThe Holiday Meal Turkey Ranch is considering

Holiday Meal Turkey RanchThe Holiday Meal Turkey Ranch is considering buying two different brands of turkey feed and blending them to provide a good, low-cost diet for i kits turkeys 1 lb. of brand 1 contains 5 oz. of ingredient A, 4 oz. of ingredient B and 0 5 oz of ingredient Cof ingredient B, and 0.5 oz. of ingredient C1 lb. of brand 2 contains 10 oz. of ingredient A, 3 oz. of ingredient B, but no ingredient Cg , gThe cost for brand 1 feed is 2 cents/lb.The cost for brand 2 feed is 3 cents/lb.To meet the minimum nutritional requirement, for each turkey and each month, the diet must contain at least 90 oz of ingredient A 48 oz of ingredient

7 – 56

at least 90 oz. of ingredient A, 48 oz. of ingredient B, and 1.5 oz. of ingredient C.

Page 15: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

Use LP to determine the lowest-cost diet that meets the minimum monthly intake requirement for each nutritional ingredientfor each nutritional ingredient. Holiday Meal Turkey Ranch data

INGREDIENT

COMPOSITION OF EACH POUND OF FEED (OZ.) MINIMUM MONTHLY

REQUIREMENT PER TURKEY (OZ )BRAND 1 FEED BRAND 2 FEEDINGREDIENT TURKEY (OZ.)BRAND 1 FEED BRAND 2 FEED

A 5 10 90

B 4 3 48

C 0.5 0 1.5Cost per pound 2 cents 3 cents

7 – 57

Table 7.4

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

X1 = number of pounds of brand 1 feed purchasedLet

1 p pX2 = number of pounds of brand 2 feed purchased

Minimize cost (in cents) = 2X1 + 3X2

subject to:5X1+ 10X2 ≥ 90 ounces (ingredient A constraint)4X1 + 3X2 ≥ 48 ounces (ingredient B constraint)

0.5X1 ≥ 1.5 ounces (ingredient C constraint)X1 ≥ 0 (nonnegativity constraint)X2 ≥ 0 (nonnegativity constraint)

7 – 58

X2 ≥ 0 (nonnegativity constraint)

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

Using the corner point methodFi t t t

–X2

First we construct the feasible solution region

20 –

nd 2

Ingredient C Constraint

gThe optimal solution will lie at

f th

15 –

10ds o

f Bra

n

Feasible Region

aon of the corners as it would in a maximization

10 –

5 –

Poun

d

Ingredient B Constraint

I di t A C t i tproblem0 –| | | | | |

5 10 15 20 25

Ingredient A Constraintb

c

7 – 59

5 10 15 20 25 X1Pounds of Brand 1Figure 7.10

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

We solve for the values of the three corner pointsPoint a is the intersection of ingredient constraints C and Band B

4X1 + 3X2 = 48X1 = 31

Substituting 3 in the first equation, we find X2 = 12Point b is the intersection of ingredient constraints A

d Band B5X1 + 10X2 = 904X1 + 3X2 = 484X1 + 3X2 48

Solving for point b with basic algebra we find X1 = 8.4 and X2 = 4.8

7 – 60

Solving for point c we find X1 = 18 and X2 = 0

Page 16: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Holiday Meal Turkey Ranch

S

Holiday Meal Turkey Ranch

Substituting these value back into the objective function we find

Cost = 2X1 + 3X2Cost at point a = 2(3) + 3(12) = 42Cost at point b = 2(8.4) + 3(4.8) = 31.2Cost at point c = 2(18) + 3(0) = 36

The lowest cost solution is to purchase 8.4 pounds of brand 1 feed and 4.8 pounds of brand 2pounds of brand 1 feed and 4.8 pounds of brand 2 feed for a total cost of 31.2 cents per turkey per month

7 – 61

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

Using the isocost approachCh i

–X2

Feasible RegionChoosing an initial cost of 54 cents

20 –

nd 2

2X1 + 3X2 = 54X1 = 0; X2 = 18

15 –

10ds o

f Bra

n

1 2 X1 = 27; X2 = 0 It is clear i t i

10 –

5 –

Poun

d

improvement is possible

0 –| | | | | |5 10 15 20 25

(X1 = 8.4, X2 = 4.8)

7 – 62

5 10 15 20 25 X1Pounds of Brand 1Figure 7.11

Holiday Meal Turkey RanchHoliday Meal Turkey Ranch

QM for Windows can also be used to solve the Holiday Meal Turkey Ranch problem

Program 7.3

7 – 63

Holiday Meal Turkey RanchHoliday Meal Turkey RanchSetting up Solver to solve the Holiday Meal TurkeySetting up Solver to solve the Holiday Meal Turkey Ranch problem

7 – 64

Program 7.4A

Page 17: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Holiday Meal Turkey RanchHoliday Meal Turkey RanchSolution to the Holiday Meal Turkey RanchSolution to the Holiday Meal Turkey Ranch problem using Solver

7 – 65

Program 7.4B

Four Special Cases in LPFour Special Cases in LP

Four special cases and difficulties arise at times when using the graphical approachtimes when using the graphical approach to solving LP problems

InfeasibilityyUnboundednessRedundancyyAlternate Optimal Solutions

7 – 66

Four Special Cases in LPFour Special Cases in LP

No feasible solutionExists when there is no solution to the problem that satisfies all the constraintproblem that satisfies all the constraint equationsNo feasible solution region existsNo feasible solution region existsThis is a common occurrence in the real worldGenerally one or more constraints are relaxed yuntil a solution is found

7 – 67

Four Special Cases in LPFour Special Cases in LPA bl ith f ibl l tiA problem with no feasible solution

X2 X1 >=7

8 –

2 X1 >=7

8 –

6 ––

2X1+X2 ≤ 8

4 ––

2 –

Region Satisfying Third ConstraintX1+2X2 ≤ 6

2 ––

0 – | | | | | | | | | |2 4 6 8 X1Fig re 7 12

7 – 68

1

Region Satisfying First Two ConstraintsRegion Satisfying First Two ConstraintsFigure 7.12

Page 18: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Four Special Cases in LPFour Special Cases in LP

UnboundednessSometimes a linear program will not have a fi it l tifinite solutionIn a maximization problem, one or more solution variables and the profit can be madesolution variables, and the profit, can be made infinitely large without violating any constraintsIn a graphical solution, the feasible region will be open endedThis usually means the problem has beenThis usually means the problem has been formulated improperly

7 – 69

Four Special Cases in LPFour Special Cases in LP

A l i i b d d h i hA solution region unbounded to the rightX2

15 – X1 ≥ 5

10 –X2 ≤ 10

5 –Feasible Region

0 –| | | | |5 10 15 X1

X1 + 2X2 ≥ 15

7 – 70

Figure 7.13X1

Four Special Cases in LPFour Special Cases in LP

RedundancyA redundant constraint is one that does not

ff t th f ibl l ti iaffect the feasible solution regionOne or more constraints may be more bindingThis is a very common occurrence in the realThis is a very common occurrence in the real worldIt causes no particular problems, butIt causes no particular problems, but eliminating redundant constraints simplifies the model

7 – 71

Four Special Cases in LPFour Special Cases in LPA bl ith XA problem with a redundant constraint

30 –

X2

25 –

20 –

2X1 + X2 ≤ 30

20 –

15 –Redundant Constraint

X ≤ 25

10 –

X1 ≤ 25

X1 + X2 ≤ 20

5 –

0 | | | | | |

Feasible Region

7 – 72

0 – | | | | | |5 10 15 20 25 30 X1Figure 7.14

Page 19: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Four Special Cases in LPFour Special Cases in LP

Alternate Optimal SolutionsOccasionally two or more optimal solutions may existGraphically this occurs when the objective function’s isoprofit or isocost line runsfunction s isoprofit or isocost line runs perfectly parallel to one of the constraintsThis actually allows management great y g gflexibility in deciding which combination to select as the profit is the same at each alternate solutionalternate solution

7 – 73

Four Special Cases in LPFour Special Cases in LPE l fExample of alternate optimal 8 –

X2

psolutions 7 –

6 –Optimal Solution Consists of All

A

5 –

4 –

Opt a So ut o Co s sts oCombinations of X1 and X2 Along the AB SegmentMaximize: 3X1 + 2X2

Subj. to: 6X1 + 4X2 < 243 –

2 –

Isoprofit Line for $8

j 1 2 X1 < 3

X1, X2 > 0

1 –

0 | | | | | | | |

Feasible Region

Isoprofit Line for $12 Overlays Line Segment AB

B

7 – 74

0 – | | | | | | | |1 2 3 4 5 6 7 8 X1Figure 7.15

Sensitivity AnalysisSensitivity Analysis

Optimal solutions to LP problems thus far have been found under what are called deterministic deterministic assumptionsassumptionsassumptionsassumptionsThis means that we assume complete certainty in the data and relationships of a problemBut in the real world, conditions are dynamic and changingW l h itiiti d t i i tiWe can analyze how sensitivesensitive a deterministic solution is to changes in the assumptions of the modelThis is called sensitivity analysissensitivity analysis, postoptimalitypostoptimalityanalysisanalysis, parametric programmingparametric programming, or optimality optimality

l il i

7 – 75

analysisanalysis

Sensitivity AnalysisSensitivity Analysis

S iti it l i ft i l i fSensitivity analysis often involves a series of what-if? questions concerning constraints, variable coefficients, and the objective function, j

What if the profit for product 1 increases by 10%?What if less advertising money is available?

One way to do this is the trial and error methodOne way to do this is the trial-and-error method where values are changed and the entire model is resolvedThe preferred way is to use an analytic postoptimality analysis

fAfter a problem has been solved, we determine a range of changes in problem parameters that will not affect the optimal solution or change the

7 – 76

not affect the optimal solution or change the variables in the solution

Page 20: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

High Note Sound CompanyThe High Note Sound Company manufactures

High Note Sound CompanyThe High Note Sound Company manufactures quality CD players and stereo receiversProducts require a certain amount of skilledProducts require a certain amount of skilled artisanship which is in limited supplyThe firm has formulated the following product mix LP d l t d t i th b t d ti i fLP model to determine the best production mix of CD players (X1) and stereo receivers (X2).

$ $Maximize profit = $50X1 + $120X2Subject to 2X1 + 4X2 ≤ 80 (weekly hours of

electrician’s time )available)

3X1 + 1X2 ≤ 60 (weekly hours of audio technician’s ti il bl )

7 – 77

time available)X1, X2 ≥ 0

High Note Sound CompanyThe High Note Sound Company graphical solution

High Note Sound CompanyThe High Note Sound Company graphical solution

X2

(receivers)

Optimal Solution at Point aX1 = 0 CD PlayersX = 20 Receivers

60 –

– 3X1 + 1X2 ≤ 60 X2 = 20 ReceiversProfits = $2,400

a = (0 20)

40 –

1 2

b = (16, 12)a = (0, 20)

Isoprofit Line: $2 400 = 50X + 120X

20 –2X1+ 4X2 ≤ 80 Isoprofit Line: $2,400 = 50X1 + 120X210 –

0 – | | | | | |10 20 30 40 50 60

1 2

7 – 78

10 20 30 40 50 60 X1(CD players)c = (20, 0)Figure 7.16

Changes in the Objective Function Coefficient

I l lif bl t ib ti t ( llIn real-life problems, contribution rates (usually profit or cost) in the objective functions fluctuate periodicallyp yGraphically, this means that although the feasible solution region remains exactly the same, the

l f th i fit i t li ill hslope of the isoprofit or isocost line will changeWe can often make modest increases or decreases in the objective function coefficient ofdecreases in the objective function coefficient of any variable without changing the current optimal corner pointWe need to know how much an objective function coefficient can change before the optimal solution would be at a different corner point

7 – 79

would be at a different corner pointBoth QM programs provide the answer

Changes in the Objective Function Coefficient

Changes in the receiver contribution coefficientsChanges in the receiver contribution coefficients

40 –X2

Profit Line for 50X1 + 80X2(Passes through Point b)

40 –

30 –

b20 –

Profit Line for 50X1 + 120X2(Passes through Point a)

ba

10 –Profit Line for 50X1 + 150X2(Passes through Point a)

0 – | | | | | |10 20 30 40 50 60 X

c

7 – 80

10 20 30 40 50 60 X1Figure 7.17

Page 21: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

QM for Windows and Changes in Objective Function Coefficients

Input and sensitivity analysis for High Note SoundInput and sensitivity analysis for High Note Sound data

Program 7 5AProgram 7.5A

7 – 81

Program 7.5B

Excel Solver and Changes in Objective Function Coefficients

Excel spreadsheet analysis of High Note SoundExcel spreadsheet analysis of High Note Sound

7 – 82

Program 7.6A

Excel Solver and Changes in Objective Function Coefficients

Excel sensitivity analysis outputExcel sensitivity analysis output

7 – 83

Program 7.6B

Changes in the Technological Coefficients

Changes in the technological coefficientstechnological coefficients often reflect changes in the state of technologyIf th t f d d t dIf the amount of resources needed to produce a product changes, coefficients in the constraint equations will changeequations will changeThis does not change the objective function, but it can produce a significant change in the shape

f h f ibl iof the feasible regionThis may cause a change in the optimal solution

7 – 84

Page 22: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Changes in the Technological Coefficients

Change in the technological coefficients for the High Note Sound Company(a) Original Problem

X2

60 –

(b) Change in Circled Coefficient

60 –

X2

60 –

X2

(c) Change in Circled Coefficient

3X1 + 1X2 ≤ 60

60

40 –

Rec

eive

rs

2 X1 + 1X2 ≤ 60 3X1 + 1X2 ≤ 60

60

40 –

60

40 –

2X1 + 4X2 ≤ 80

Optimal Solution

20 –

Ster

eo R

2X1 + 4X2 ≤ 80

Still Optimal

2X1 + 5 X2 ≤ 80

Optimal Solutiona

d 20 –16

20 –ab f

g

– | | |0 20 40 X1

CD Players

e – | | |0 20 40 X1

– | | |0 20 40 X1

|30

c c

7 – 85

Figure 7.18

Changes in Resources or gRight-Hand-Side Values

The right-hand-side values of the constraints often represent resources available to the firm

L b h hi ti il blLabor hours, machine time, money available …If additional resources were available, a higher total profit could be realizedhigher total profit could be realizedSensitivity analysis about resources will help answer questions such as:answer questions such as:

How much should the company be willing to pay for additional hours? Is it profitable to have some electricians work overtime? Sh ld b illi t f di

7 – 86

Should we be willing to pay for more audio technician time?

Changes in Resources or gRight-Hand-Side Values

If the right-hand side of a constraint (e.g. 80 hrs) is changed, the feasible region will change (unless the constraint is redundant) (Fig 7-19)(unless the constraint is redundant) (Fig. 7-19)Often the optimal solution will change (Fig. 7-19)The amount of change (increase or decrease) inThe amount of change (increase or decrease) in the objective function value that results from a unit change in one of the resources available is called the dual pricedual price or dual valuedual valuecalled the dual pricedual price or dual valuedual valueThe dual price for a constraint is the improvement (or deterioration) in the objective function value(or deterioration) in the objective function value that results from a one-unit increase (or decrease) in the right-hand side of the constraint

7 – 87

Changes in Resources or gRight-Hand-Side Values

However, the amount of possible increase in the right-hand side of a resource is limitedIf the number of hours increased beyond theIf the number of hours increased beyond the upper bound, then the objective function would no longer increase by the dual price (Fig. 7-19c)g y p ( g )There would simply be excess (slackslack) hours of a resource or the objective function may change by an amount different from the dual pricean amount different from the dual price The dual price is relevant only within limitsIf the dual value of a constraint is zeroIf the dual value of a constraint is zero

The slack is positive, indicating unused resourceAdditional amount of resource will simply increase

7 – 88

p ythe amount of slack

Page 23: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Changes in the Electrician's Time for High Note Sound

60 –X2

If available electrician time is increased by 20 hrs(from 8080 to 100 hrs), the optimum solution will be changed from (0, 20) to (0, 25), and the maximum profit will be changed from $2400

40 –

maximum profit will be changed from $2400to $3000 – an increase of $600 (= 20×30)

C t i t R ti 60 H f

25 – a

Constraint Representing 60 Hours of Audio Technician’s Time Resource

20 –25

b Changed Constraint Representing 100100 Hours of Electrician’s Time Resource

– | | |0 20 40 60

|50 X1

c

7 – 89

Figure 7.19a

Changes in the Electrician's Time for High Note Sound

60 –X2

If available electrician time is decreased by 20 hrs(from 8080 to 60 hrs), the optimum solution will be changed from (0, 20) to (0, 15), and the maximum profit will be changed from $2400

40 –C t i t R ti 60 H f

maximum profit will be changed from $2400to $1800 – an decrease of $600 (= 20×30)

Constraint Representing 60 Hours of Audio Technician’s Time Resource

20 –15 – a

b

Changed Constraint Representing 6060 Hours of Electrician’s Time Resource

– | | |0 20 40 60

|30 X1

b

c

7 – 90

Figure 7.19b

Changes in the Electrician's Time for High Note Sound

60 –X2

Optimum Solution – (0, 60)Maximum Profit – $7200 Originally – (0, 20) and $2400

40 –Changed Constraint Representing 240240 Hours of Electrician’s Time Resource – Originally

Constraint Representing

8080 Hours

20 –p g

60 Hours of Audio Technician’s Time Resource

– | | | | | |0 20 40 60 80 100 120

X1

7 – 91

X1

Figure 7.19c If the number of hours increased beyond 240, the profit would no If the number of hours increased beyond 240, the profit would no longer increase and the optimum solution would still be (0, 60) longer increase and the optimum solution would still be (0, 60)

QM for Windows and Changes in Right-Hand-Side Values

Input and sensitivity analysis for High Note SoundInput and sensitivity analysis for High Note Sound data

Program 7 5AProgram 7.5A

7 – 92

Program 7.5B

Page 24: Chapter 7Chapter 7 - Computer and Information ScienceDzhu/Busn3430/Chapter07.pdfGraphical Representation of a Constraint We need to identify all points (i.e. the region) that satisfy

Excel Solver and Changes in Right-Hand-Side Values

Excel sensitivity analysis outputExcel sensitivity analysis output

Shadow pprice is equuivalent to dual price

7 – 93

Program 7.6B