math programming models

61
1 Linear and Linear and Integer Integer Programming Programming Models Models Chapter 2

Upload: dentistryinfo

Post on 16-May-2015

1.392 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Math Programming Models

1

Linear and Integer Linear and Integer Programming ModelsProgramming Models

Linear and Integer Linear and Integer Programming ModelsProgramming Models

Chapter 2

Page 2: Math Programming Models

2

• A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints.

• The linear model consists of the followingcomponents:– A set of decision variables, xj.– An objective function, cj xj.– A set of constraints, aij xj < bi.

2.1 Introduction to Linear Programming2.1 Introduction to Linear Programming

Page 3: Math Programming Models

3

The format for an LP modelThe format for an LP model

Max or min cj xj = c1 x1 + c2 x2 + …. + cn xn

Subject to aij xj < bi , i = 1,,,,,m

Non-negativity conditions: all xj > 0, j = 1, ,n

• Here n is the number of decision variables• Here m is the number of constraints• (There is no relation between n and m)

Page 4: Math Programming Models

4

The methodology of linear The methodology of linear programmingprogramming• Define decision variables• Hand-write objective• Formulate math model of objective function• Hand-write each constraint• Formulate math model for each constraint• Add non-negativity conditions

Page 5: Math Programming Models

5

Introduction to Linear ProgrammingIntroduction to Linear Programming

• The Importance of Linear Programming– Many real world problems lend themselves to linear programming modeling. – Many real world problems can be approximated by linear models.– There are well-known successful applications in:

• Operations• Marketing• Finance (investment)• Advertising• Agriculture

Page 6: Math Programming Models

6

• The Importance of Linear Programming– There are efficient solution techniques that solve linear

programming models.– The output generated from linear programming packages

provides useful “what if” analysis.

Introduction to Linear ProgrammingIntroduction to Linear Programming

Page 7: Math Programming Models

7

Introduction to Linear ProgrammingIntroduction to Linear Programming

• Assumptions of the linear programming model– The parameter values are known with certainty.– The objective function and constraints exhibit

constant returns to scale.– There are no interactions between the decision

variables (the additivity assumption).– The Continuity assumption: Variables can take on

any value within a given feasible range.

Page 8: Math Programming Models

8

The Galaxy Industries Production Problem – The Galaxy Industries Production Problem – A Prototype ExampleA Prototype Example

• Galaxy manufactures two toy doll models:– Space Ray. – Zapper.

• Resources are limited to– 1000 pounds of special plastic.– 40 hours of production time per week.

Page 9: Math Programming Models

9

• Marketing requirement– Total production cannot exceed 700 dozens.

– Number of dozens of Space Rays cannot exceed number of dozens of Zappers by more than 350.

• Technological input– Space Rays requires 2 pounds of plastic and 3 minutes of labor per dozen.– Zappers requires 1 pound of plastic and 4 minutes of labor per dozen.

The Galaxy Industries Production Problem – The Galaxy Industries Production Problem – A Prototype ExampleA Prototype Example

Page 10: Math Programming Models

10

• The current production plan calls for: – Producing as much as possible of the more profitable product,

Space Ray ($8 profit per dozen).– Use resources left over to produce Zappers ($5 profit

per dozen), while remaining within the marketing guidelines.

• The current production plan consists of:

Space Rays = 450 dozenZapper = 100 dozenProfit = $4100 per week

The Galaxy Industries Production Problem –The Galaxy Industries Production Problem – A Prototype Example A Prototype Example

8(450) + 5(100)

Page 11: Math Programming Models

11

Management is seeking a production schedule that will increase the company’s profit.

Page 12: Math Programming Models

12

A linear programming model can provide an insight and an intelligent solution to this problem.

Page 13: Math Programming Models

13

• Decisions variables::

– X1 = Weekly production level of Space Rays (in dozens)

– X2 = Weekly production level of Zappers (in dozens).

• Objective Function:

– Weekly profit, to be maximized

The Galaxy Linear Programming ModelThe Galaxy Linear Programming Model

Page 14: Math Programming Models

14

Max 8X1 + 5X2 (Weekly profit)subject to2X1 + 1X2 1000 (Plastic)

3X1 + 4X2 2400 (Production Time)

X1 + X2 700 (Total production)

X1 - X2 350 (Mix)

Xj> = 0, j = 1,2 (Nonnegativity)

The Galaxy Linear Programming ModelThe Galaxy Linear Programming Model

Page 15: Math Programming Models

15

It’s your turnIt’s your turn

• A dentist is faced with deciding how best to split his practice between the two services he offers—general dentistry and pedodontics (children’s dental care). Given his resources, how much of each service should he provide to maximize his profits?

Page 16: Math Programming Models

16

The Dentist problemThe Dentist problem

• The dentist employs three assistants and uses two operatories. Each pedodontic service requires .75 hours of operatory time, 1.5 hours of an assistant’s time and .25 hours of the dentist’s time. A general dentistry service requires .75 hours of an operatory, 1 hour of an assistant’s time and .5 hours of the dentist’s time. Net profit for each service is $10 for each pedodontic service and $7.50 for each general dental service. Since the dentist’s office is open eight hours a day, there are eight hours of dentist’s time each day, 16 hours of operatory time, and 24 hours of assistants’ time.

Page 17: Math Programming Models

17

2.3 2.3 The Graphical Analysis of Linear The Graphical Analysis of Linear ProgrammingProgramming

The set of all points that satisfy all the constraints of the model is called

a

FEASIBLE REGIONFEASIBLE REGION

Page 18: Math Programming Models

18

Using a graphical presentation

we can represent all the constraints,

the objective function, and the three

types of feasible points.

Page 19: Math Programming Models

19

The non-negativity constraints

X2

X1

Graphical Analysis – the Feasible RegionGraphical Analysis – the Feasible Region

Page 20: Math Programming Models

20

1000

500

Feasible

X2

Infeasible

Production Time3X1+4X2 2400

Total production constraint: X1+X2 700 (redundant)

500

700

The Plastic constraint2X1+X2 1000

X1

700

Graphical Analysis – the Feasible RegionGraphical Analysis – the Feasible Region

Page 21: Math Programming Models

21

1000

500

Feasible

X2

Infeasible

Production Time3X1+4X22400

Total production constraint: X1+X2 700 (redundant)

500

700

Production mix constraint:X1-X2 350

The Plastic constraint2X1+X2 1000

X1

700

Graphical Analysis – the Feasible RegionGraphical Analysis – the Feasible Region

• There are three types of feasible pointsInterior points. Boundary points. Extreme points.

Page 22: Math Programming Models

22

Solving Graphically for an Solving Graphically for an Optimal SolutionOptimal Solution

Page 23: Math Programming Models

23

The search for an optimal solutionThe search for an optimal solution

Start at some arbitrary profit, say profit = $2,000...Then increase the profit, if possible...

...and continue until it becomes infeasible

Profit =$4360

500

700

1000

500

X2

X1

Page 24: Math Programming Models

24

Summary of the optimal solution Summary of the optimal solution

Space Rays = 320 dozen Zappers = 360 dozen Profit = $4360

– This solution utilizes all the plastic and all the production hours.

– Total production is only 680 (not 700).

– Space Rays production does not exceed Zappers production at

all.

Page 25: Math Programming Models

25

– If a linear programming problem has an optimal solution, an extreme point is optimal.

Extreme points and optimal solutionsExtreme points and optimal solutions

Page 26: Math Programming Models

26

• For multiple optimal solutions to exist, the objective function must be parallel to one of the constraints

Multiple optimal solutionsMultiple optimal solutions

•Any weighted average of optimal solutions is also an optimal solution.

Page 27: Math Programming Models

27

2.4 The Role of Sensitivity Analysis 2.4 The Role of Sensitivity Analysis of the Optimal Solutionof the Optimal Solution

• Is the optimal solution sensitive to changes in input parameters?

• Possible reasons for asking this question:– Parameter values used were only best estimates.– Dynamic environment may cause changes.– “What-if” analysis may provide economical and

operational information.

Page 28: Math Programming Models

28

• Range of Optimality– The optimal solution will remain unchanged as long as

• An objective function coefficient lies within its range of

optimality • There are no changes in any other input parameters.

– The value of the objective function will change if the

coefficient multiplies a variable whose value is nonzero.

Sensitivity Analysis of Sensitivity Analysis of Objective Function Coefficients.Objective Function Coefficients.

Page 29: Math Programming Models

29

500

1000

500 800

X2

X1Max 8X

1 + 5X2

Max 4X1 + 5X

2

Max 3.75X1 + 5X

2

Max 2X1 + 5X

2

Sensitivity Analysis of Sensitivity Analysis of Objective Function Coefficients.Objective Function Coefficients.

Page 30: Math Programming Models

30

500

1000

400 600 800

X2

X1

Max8X1 + 5X

2

Max 3.75X1 + 5X

2

Max 10 X

1 + 5X2

Range of optimality: [3.75, 10]

Sensitivity Analysis of Sensitivity Analysis of Objective Function Coefficients.Objective Function Coefficients.

Page 31: Math Programming Models

31

• Reduced costAssuming there are no other changes to the input parameters, the reduced cost for a variable Xj that has a value of “0” at the optimal solution is:

– The negative of the objective coefficient increase of the variable Xj (-Cj) necessary for the variable to be positive in the optimal solution

– Alternatively, it is the change in the objective value per unit increase of Xj.

• Complementary slackness At the optimal solution, either the value of a variable is zero, or its reduced cost is 0.

Page 32: Math Programming Models

32

• In sensitivity analysis of right-hand sides of constraints we are interested in the following questions:– Keeping all other factors the same, how much would the

optimal value of the objective function (for example, the profit) change if the right-hand side of a constraint changed by one unit?

– For how many additional or fewer units will this per unit change be valid?

Sensitivity Analysis of Sensitivity Analysis of Right-Hand Side ValuesRight-Hand Side Values

Page 33: Math Programming Models

33

• Any change to the right hand side of a binding constraint will change the optimal solution.

• Any change to the right-hand side of a non-binding constraint that is less than its slack or surplus, will cause no change in the optimal solution.

Sensitivity Analysis of Sensitivity Analysis of Right-Hand Side ValuesRight-Hand Side Values

Page 34: Math Programming Models

34

Shadow PricesShadow Prices

• Assuming there are no other changes to the input parameters, the change to the objective function value per unit increase to a right hand side of a constraint is called the “Shadow Price”

Page 35: Math Programming Models

35

1000

500

X2

X1

500

2X1 + 1x

2 <=1000

When more plastic becomes available (the plastic constraint is relaxed), the right hand side of the plastic constraint increases.

Production timeconstraint

Maximum profit = $4360

2X1 + 1x

2 <=1001 Maximum profit = $4363.4

Shadow price = 4363.40 – 4360.00 = 3.40

Shadow Price – graphical demonstrationShadow Price – graphical demonstrationThe Plastic constraint

Page 36: Math Programming Models

36

Range of FeasibilityRange of Feasibility

• Assuming there are no other changes to the input parameters, the range of feasibility is– The range of values for a right hand side of a constraint, in

which the shadow prices for the constraints remain unchanged.

– In the range of feasibility the objective function value changes as follows:Change in objective value = [Shadow price][Change in the right hand side value]

Page 37: Math Programming Models

37

Range of FeasibilityRange of Feasibility

1000

500

X2

X1

500

2X1 + 1x

2 <=1000

Increasing the amount of plastic is only effective until a new constraint becomes active.

The Plastic constraint

This is an infeasible solutionProduction timeconstraint

Production mix constraintX1 + X2 700

A new activeconstraint

Page 38: Math Programming Models

38

Range of FeasibilityRange of Feasibility

1000

500

X2

X1

500

The Plastic constraint

Production timeconstraint

Note how the profit increases as the amount of plastic increases.

2X1 + 1x

2 1000

Page 39: Math Programming Models

39

Range of FeasibilityRange of Feasibility

1000

500

X2

X1

5002X1 + 1X2 1100

Less plastic becomes available (the plastic constraint is more restrictive).

The profit decreases

A new activeconstraint

Infeasiblesolution

Page 40: Math Programming Models

40

– Sunk costs: The shadow price is the value of an extra unit of the resource, since the cost of the resource is not included in the calculation of the objective function coefficient.

– Included costs: The shadow price is the premium value above the existing unit value for the resource, since the cost of the resource is included in the calculation of the objective function coefficient.

The correct interpretation of shadow prices The correct interpretation of shadow prices

Page 41: Math Programming Models

41

Other Post - Optimality Changes Other Post - Optimality Changes

• Addition of a constraint.

• Deletion of a constraint.

• Addition of a variable.

• Deletion of a variable.

• Changes in the left - hand side coefficients.

Page 42: Math Programming Models

42

2.5 Using Excel Solver to Find an 2.5 Using Excel Solver to Find an Optimal Solution and Analyze ResultsOptimal Solution and Analyze Results

• To see the input screen in Excel click Galaxy.xls• Click Solver to obtain the following dialog box.

Equal To:By Changing cells

These cells containthe decision variables

$B$4:$C$4

To enter constraints click…

Set Target cell $D$6This cell contains the value of the objective function

$D$7:$D$10 $F$7:$F$10

All the constraintshave the same direction, thus are included in one “Excel constraint”.

Page 43: Math Programming Models

43

Using Excel SolverUsing Excel Solver

• To see the input screen in Excel click Galaxy.xls• Click Solver to obtain the following dialog box.

Equal To:

$D$7:$D$10<=$F$7:$F$10

By Changing cellsThese cells containthe decision variables

$B$4:$C$4

Set Target cell $D$6This cell contains the value of the objective function

Click on ‘Options’and check ‘Linear Programming’ and‘Non-negative’.

Page 44: Math Programming Models

44

• To see the input screen in Excel click Galaxy.xls• Click Solver to obtain the following dialog box.

Equal To:

$D$7:$D$10<=$F$7:$F$10

By Changing cells$B$4:$C$4

Set Target cell $D$6

Using Excel SolverUsing Excel Solver

Page 45: Math Programming Models

45

Space Rays ZappersDozens 320 360

Total LimitProfit 8 5 4360

Plastic 2 1 1000 <= 1000Prod. Time 3 4 2400 <= 2400

Total 1 1 680 <= 700Mix 1 -1 -40 <= 350

GALAXY INDUSTRIES

Using Excel Solver – Optimal SolutionUsing Excel Solver – Optimal Solution

Page 46: Math Programming Models

46

Space Rays ZappersDozens 320 360

Total LimitProfit 8 5 4360

Plastic 2 1 1000 <= 1000Prod. Time 3 4 2400 <= 2400

Total 1 1 680 <= 700Mix 1 -1 -40 <= 350

GALAXY INDUSTRIES

Using Excel Solver – Optimal SolutionUsing Excel Solver – Optimal Solution

Solver is ready to providereports to analyze theoptimal solution.

Page 47: Math Programming Models

47

Using Excel Solver –Answer ReportUsing Excel Solver –Answer ReportMicrosoft Excel 9.0 Answer ReportWorksheet: [Galaxy.xls]GalaxyReport Created: 11/12/2001 8:02:06 PM

Target Cell (Max)Cell Name Original Value Final Value

$D$6 Profit Total 4360 4360

Adjustable CellsCell Name Original Value Final Value

$B$4 Dozens Space Rays 320 320$C$4 Dozens Zappers 360 360

ConstraintsCell Name Cell Value Formula Status Slack

$D$7 Plastic Total 1000 $D$7<=$F$7 Binding 0$D$8 Prod. Time Total 2400 $D$8<=$F$8 Binding 0$D$9 Total Total 680 $D$9<=$F$9 Not Binding 20$D$10 Mix Total -40 $D$10<=$F$10 Not Binding 390

Page 48: Math Programming Models

48

Using Excel Solver –Sensitivity Using Excel Solver –Sensitivity ReportReport

Microsoft Excel Sensitivity ReportWorksheet: [Galaxy.xls]Sheet1Report Created:

Adjustable CellsFinal Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease$B$4 Dozens Space Rays 320 0 8 2 4.25$C$4 Dozens Zappers 360 0 5 5.666666667 1

ConstraintsFinal Shadow Constraint Allowable Allowable

Cell Name Value Price R.H. Side Increase Decrease$D$7 Plastic Total 1000 3.4 1000 100 400$D$8 Prod. Time Total 2400 0.4 2400 100 650$D$9 Total Total 680 0 700 1E+30 20$D$10 Mix Total -40 0 350 1E+30 390

Page 49: Math Programming Models

49

• Infeasibility: Occurs when a model has no feasible point.

• Unboundness: Occurs when the objective can become

infinitely large (max), or infinitely small (min).

• Alternate solution: Occurs when more than one point

optimizes the objective function

2.7 Models Without Unique Optimal 2.7 Models Without Unique Optimal SolutionsSolutions

Page 50: Math Programming Models

50

1

No point, simultaneously,

lies both above line and

below lines and

.

1

2 32

3

Infeasible ModelInfeasible Model

Page 51: Math Programming Models

51

Solver – Infeasible ModelSolver – Infeasible Model

Page 52: Math Programming Models

52

Unbounded solutionUnbounded solution

The feasible

region

Maximize

the Objective Function

Page 53: Math Programming Models

53

Solver – Unbounded solutionSolver – Unbounded solution

Page 54: Math Programming Models

54

• Solver does not alert the user to the existence of alternate optimal solutions.

• Many times alternate optimal solutions exist when the allowable increase or allowable decrease is equal to zero.

• In these cases, we can find alternate optimal solutions using Solver by the following procedure:

Solver – An Alternate Optimal SolutionSolver – An Alternate Optimal Solution

Page 55: Math Programming Models

55

• Observe that for some variable Xj the Allowable increase = 0, orAllowable decrease = 0.

• Add a constraint of the form:Objective function = Current optimal value.

• If Allowable increase = 0, change the objective to Maximize Xj

• If Allowable decrease = 0, change the objective to Minimize Xj

Solver – An Alternate Optimal SolutionSolver – An Alternate Optimal Solution

Page 56: Math Programming Models

56

2.8 Cost Minimization Diet Problem 2.8 Cost Minimization Diet Problem

• Mix two sea ration products: Texfoods, Calration.• Minimize the total cost of the mix. • Meet the minimum requirements of Vitamin A, Vitamin D, and Iron.

Page 57: Math Programming Models

57

• Decision variables– X1 (X2) -- The number of two-ounce portions of

Texfoods (Calration) product used in a serving.

• The ModelMinimize 0.60X1 + 0.50X2Subject to

20X1 + 50X2 100 Vitamin A 25X1 + 25X2 100 Vitamin D 50X1 + 10X2 100 Iron X1, X2 0

Cost per 2 oz.

% Vitamin Aprovided per 2 oz.

% required

Cost Minimization Diet Problem Cost Minimization Diet Problem

Page 58: Math Programming Models

58

10

2 44 5

Feasible RegionFeasible Region

Vitamin “D” constraint

Vitamin “A” constraint

The Iron constraint

The Diet Problem - Graphical solutionThe Diet Problem - Graphical solution

Page 59: Math Programming Models

59

• Summary of the optimal solution

– Texfood product = 1.5 portions (= 3 ounces)Calration product = 2.5 portions (= 5 ounces)

– Cost =$ 2.15 per serving. – The minimum requirement for Vitamin D and iron are met with

no surplus. – The mixture provides 155% of the requirement for Vitamin A.

Cost Minimization Diet Problem Cost Minimization Diet Problem

Page 60: Math Programming Models

60

• Linear programming software packages solve large linear models.

• Most of the software packages use the algebraic technique called the Simplex algorithm.

• The input to any package includes:– The objective function criterion (Max or Min).– The type of each constraint: .– The actual coefficients for the problem.

Computer Solution of Linear Programs With Computer Solution of Linear Programs With Any Number of Decision VariablesAny Number of Decision Variables

, ,

Page 61: Math Programming Models

61

Copyright John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that named in Section 117 of the United States Copyright Act without the express written consent of the copyright owner is unlawful. Requests for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. Adopters of the textbook are granted permission to make back-up copies for their own use only, to make copies for distribution to students of the course the textbook is used in, and to modify this material to best suit their instructional needs. Under no circumstances can copies be made for resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.