© Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.

Slides:



Advertisements
Similar presentations
LINEAR PROGRAMMING SENSITIVITY ANALYSIS
Advertisements

Understanding optimum solution
Introduction to Sensitivity Analysis Graphical Sensitivity Analysis
Sensitivity Analysis Sensitivity analysis examines how the optimal solution will be impacted by changes in the model coefficients due to uncertainty, error.
1/53 Slide Linear Programming: Sensitivity Analysis and Interpretation of Solution n Introduction to Sensitivity Analysis n Graphical Sensitivity Analysis.
BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming.
SOLVING LINEAR PROGRAMS USING EXCEL Dr. Ron Lembke.
Operations Management Linear Programming Module B - Part 2
Chapter 2 Linear Programming Models: Graphical and Computer Methods © 2007 Pearson Education.
Chapter 3 Linear Programming: Sensitivity Analysis and Interpretation of Solution MT 235.
Sensitivity analysis BSAD 30 Dave Novak
Chapter 2: Introduction to Linear Programming
An Introduction to Linear Programming : Graphical and Computer Methods
1 1 Slide LINEAR PROGRAMMING Introduction to Sensitivity Analysis Professor Ahmadi.
LINEAR PROGRAMMING: THE GRAPHICAL METHOD
Spreadsheet Modeling & Decision Analysis:
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
Chapter 3 An Introduction to Linear Programming
3 Components for a Spreadsheet Linear Programming Problem There is one cell which can be identified as the Target or Set Cell, the single objective of.
1 1 Slide © 2009 South-Western, a part of Cengage Learning Slides by John Loucks St. Edward’s University.
John Loucks Modifications by A. Asef-Vaziri Slides by St. Edward’s
Linear Programming.
Graphical Solutions Plot all constraints including nonnegativity ones
1 1 Slide LINEAR PROGRAMMING: THE GRAPHICAL METHOD n Linear Programming Problem n Properties of LPs n LP Solutions n Graphical Solution n Introduction.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Kerimcan OzcanMNGT 379 Operations Research1 LP: Sensitivity Analysis and Interpretation of Solution Chapter 3.
Introduction to Mathematical Programming OR/MA 504 Chapter 3.
1 The Role of Sensitivity Analysis of the Optimal Solution Is the optimal solution sensitive to changes in input parameters? Possible reasons for asking.
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
Chapter 19 Linear Programming McGraw-Hill/Irwin
Special Conditions in LP Models (sambungan BAB 1)
Readings Readings Chapter 3
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS ST. EDWARD’S UNIVERSITY.
Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel.
Managerial Decision Making and Problem Solving
1 1 Slide Linear Programming (LP) Problem n A mathematical programming problem is one that seeks to maximize an objective function subject to constraints.
THE GALAXY INDUSTRY PRODUCTION PROBLEM -
1 LINEAR PROGRAMMING Introduction to Sensitivity Analysis Professor Ahmadi.
Chapter 6 Supplement Linear Programming.
Chapter 7 Introduction to Linear Programming
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
1 1 Slide © 2009 South-Western, a part of Cengage Learning Slides by John Loucks St. Edward’s University.
Linear Programming: Sensitivity Analysis and Interpretation of Solution Pertemuan 5 Matakuliah: K0442-Metode Kuantitatif Tahun: 2009.
1/24: Linear Programming & Sensitivity Analysis Review: –LP Requirements –Graphical solutions Using MS Excel for Linear Programming Sensitivity Analysis.
LP: Summary thus far Requirements Graphical solutions Excel Sensitivity Analysis.
QMB 4701 MANAGERIAL OPERATIONS ANALYSIS
1 1 Slide © 2001 South-Western College Publishing/Thomson Learning Anderson Sweeney Williams Anderson Sweeney Williams Slides Prepared by JOHN LOUCKS QUANTITATIVE.
1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or.
A LINEAR PROGRAMMING PROBLEM HAS LINEAR OBJECTIVE FUNCTION AND LINEAR CONSTRAINT AND VARIABLES THAT ARE RESTRICTED TO NON-NEGATIVE VALUES. 1. -X 1 +2X.
Chapter 2 Introduction to Linear Programming n Linear Programming Problem n Problem Formulation n A Maximization Problem n Graphical Solution Procedure.
Professional software packages such as The WinQSB and LINDO provide the following LP information: Information about the objective function: –its optimal.
Linear Programming Models: Graphical and Computer Methods
Sensitivity analysis continued… BSAD 30 Dave Novak Source: Anderson et al., 2013 Quantitative Methods for Business 12 th edition – some slides are directly.
Spreadsheet Modeling & Decision Analysis A Practical Introduction to Management Science 5 th edition Cliff T. Ragsdale.
McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Supplement 6 Linear Programming.
3 Components for a Spreadsheet Optimization Problem  There is one cell which can be identified as the Target or Set Cell, the single objective of the.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming Chapter 2.
Sensitivity Analysis Introduction to Sensitivity Analysis
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Operations Research By: Saeed Yaghoubi 1 Graphical Analysis 2.
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization.
Managerial Decision Modeling with Spreadsheets Chapter 4 Linear Programming Sensitivity Analysis.
1 2 Linear Programming Chapter 3 3 Chapter Objectives –Requirements for a linear programming model. –Graphical representation of linear models. –Linear.
Chapter 2 Linear Programming Models: Graphical and Computer Methods
St. Edward’s University
Presentation transcript:

© Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming

© Copyright 2004, Alan Marshall 2Agenda >Math Programming >Linear Programming Introduction Exercise: Lego Enterprises Terminology, Definitions Possible Outcomes Sensitivity Analysis

© Copyright 2004, Alan Marshall 3 Math Programming >Deals with resource allocation to maximize or minimize an objective subject to certain constraints >Types: Linear, Integer, Mixed, Nonlinear, Goal >Relatively easy to solve using modern computing technology (potentially too easy!)

© Copyright 2004, Alan Marshall 4 Our Focus >Linear, Integer (& Mixed Linear/Integer) >Recognizing when linear/integer/mixed programming is appropriate >Developing basic models >Computer solution Excel >Interpreting results

© Copyright 2004, Alan Marshall 5 Lego Enterprises >Table profit is $16; Chair profit is $10 >Table design 2 large blocks (side by side) 2 small blocks (stacked under, centered) >Chair design 1 large block (seat) 2 small blocks (back, bottom) >Objective: select product mix to maximize profits using available resources

© Copyright 2004, Alan Marshall 6 Understanding Lego Problem > Formulate as LP Decision Variables, Objective Function, Constraints >Graph Constraints, Objective function >Find solution

© Copyright 2004, Alan Marshall 7 LP Formulation >Decision Variables T = # of tables C = # of chairs >Objective Maximize profit = >Constraints For large blocks: For small blocks:

© Copyright 2004, Alan Marshall 8 LP Formulation >Decision Variables T = # of tables C = # of chairs >Objective Maximize profit: Z = 16T + 10C >Constraints For large blocks: For small blocks:

© Copyright 2004, Alan Marshall 9 LP Formulation >Decision Variables T = # of tables C = # of chairs >Objective Maximize profit: Z = 16T + 10C >Constraints For large blocks: 2T + 1C < 6 For small blocks:

© Copyright 2004, Alan Marshall 10 LP Formulation >Decision Variables T = # of tables C = # of chairs >Objective Maximize profit: Z = 16T + 10C >Constraints For large blocks: 2T + 1C < 6 For small blocks: 2T + 2C < 8

© Copyright 2004, Alan Marshall 11 Graphing Lego Example >Draw quadrant & axes use T on x-axis and C on y-axis >Add constraint lines Find intercepts: set T to zero and solve for C, set C to zero and solve for T >Add profit equation Select reasonable value >Move profit equation outwards, as far as feasible

© Copyright 2004, Alan Marshall 12 Graphing Lego Example >Draw quadrant & axes use T on x-axis and C on y-axis

© Copyright 2004, Alan Marshall 13 Graphing Lego Example >Add constraint lines Find intercepts: set T to zero and solve for C, set C to zero and solve for T >Large: Tables: Max = 3 Chairs: Max = 6

© Copyright 2004, Alan Marshall 14 Graphing Lego Example >Add constraint lines Find intercepts: set T to zero and solve for C, set C to zero and solve for T >Large: Tables: Max = 3 Chairs: Max = 6

© Copyright 2004, Alan Marshall 15 Graphing Lego Example >Add constraint lines Find intercepts: set T to zero and solve for C, set C to zero and solve for T >Small: Tables: Max = 4 Chairs: Max = 4

© Copyright 2004, Alan Marshall 16 Graphing Lego Example >Add constraint lines Find intercepts: set T to zero and solve for C, set C to zero and solve for T >Small: Tables: Max = 4 Chairs: Max = 4

© Copyright 2004, Alan Marshall 17 Graphing Lego Example >Add profit equation Select reasonable value >40: Tables: 40/16 = 2.5 Chairs: 40/10 = 4

© Copyright 2004, Alan Marshall 18 Graphing Lego Example >Add profit equation Select reasonable value >40: Tables: 40/16 = 2.5 Chairs: 40/10 = 4

© Copyright 2004, Alan Marshall 19 Graphing Lego Example >Move profit equation outwards, as far as feasible >Solution: T = 2, C = 2 >Profit: 16(2)+10(2)=52

© Copyright 2004, Alan Marshall 20 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are >Variables can assume any fractional value >Decision variables are non-negative >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 21 Characteristics Of LPs >Objective function and constraints are linear functions Lego: All were linear trade-offs >Constraint types are >Variables can assume any fractional value >Decision variables are non-negative >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 22 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are Lego: All Constraints implied maximums (<) >Variables can assume any fractional value >Decision variables are non-negative >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 23 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are >Variables can assume any fractional value Lego: Fractional values can be viewed as work-in-process at the end of the day >Decision variables are non-negative >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 24 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are >Variables can assume any fractional value >Decision variables are non-negative Lego: Cannot produce negative amounts >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 25 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are >Variables can assume any fractional value >Decision variables are non-negative >Maximize or Minimize single objective Lego: Maximizing Profit

© Copyright 2004, Alan Marshall 26 Key Definitions >Feasible solution: one that satisfies all constraints can have many feasible solutions >Feasible region: set of all feasible solutions >Optimal solution: any feasible solution that optimizes the objective function can have ties

© Copyright 2004, Alan Marshall 27 Standard LP Form >All constraints expressed as equalities use slack ( ) variables >All variables are nonnegative >All variables appear on the left side of the constraint functions >All constants appear on the right side of the constraint functions >Formulate Lego problem in standard form

© Copyright 2004, Alan Marshall 28 Lego - Standard Form >Maximize profit: Z = 16T + 10C >Subject to For large blocks: 2T + 1C + S 1 = 6 For small blocks: 2T + 2C + S 2 = 8 Non-negativities:, T, C, S 1, S 2 > 0 >Useful, because of the concept of slack and surplus While we will not formulate this way in Excel, we will still use these concepts

© Copyright 2004, Alan Marshall 29 Possible LP Outcomes >Unique optimal solution >Alternate optimal solutions >Unbounded problem >Infeasible problem

© Copyright 2004, Alan Marshall 30 Example: Unique Optimal Soln >Solve graphically for the optimal solution: Max:z = 6x 1 + 2x 2 s.t.4x 1 + 3x 2 > 12 x 1 + x 2 < 8 x 1, x 2 > 0

© Copyright 2004, Alan Marshall 31 x2x2x2x2 x1x1x1x1 4x 1 + 3x 2 > 12 x 1 + x 2 < Max 6x 1 + 2x 2 Example: Unique Optimal >There is only one point in the feasible set that maximizes the objective function (x 1 = 8, x 2 = 0)

© Copyright 2004, Alan Marshall 32 Example: Alternate Solutions >Solve graphically for the optimal solution: Maxz = 6x 1 + 3x 2 s.t.4x 1 + 3x 2 > 12 2x 1 + x 2 < 8 x 1, x 2 > 0

© Copyright 2004, Alan Marshall 33 x2x2x2x2 x1x1x1x1 4x 1 + 3x 2 > 12 2x 1 + x 2 < Max 6x 1 + 3x 2 Example: Alternate Solutions >There are infinite points satisfying both constraints - objective function falls on a constraint line

© Copyright 2004, Alan Marshall 34 Example: Infeasible Problem >Solve graphically for the optimal solution: Maxz = 2x 1 + 6x 2 s.t.4x 1 + 3x 2 < 12 2x 1 + x 2 > 8 x 1, x 2 > 0

© Copyright 2004, Alan Marshall 35 x2x2x2x2 x1x1x1x1 4x 1 + 3x 2 < 12 2x 1 + x 2 > Example: Infeasible Problem >No points satisfy both constraints no feasible region, no optimal solution

© Copyright 2004, Alan Marshall 36 Example: Unbounded Problem >Solve graphically for the optimal solution: Maxz = 3x 1 + 4x 2 s.t. x 1 + x 2 > 5 3x 1 + x 2 > 8 x 1, x 2 > 0

© Copyright 2004, Alan Marshall 37 x2x2 x1x1 3x 1 + x 2 > 8 x 1 + x 2 > 5 Max 3x 1 + 4x Example: Unbounded Problem >objective function can be moved outward without limit; z can be increased infinitely

© Copyright 2004, Alan Marshall 38 RECAP

© Copyright 2004, Alan Marshall 39 Characteristics Of LPs >Objective function and constraints are linear functions >Constraint types are >Variables can assume any fractional value >Decision variables are non-negative >Maximize or Minimize single objective

© Copyright 2004, Alan Marshall 40Formulation >Define decision variables: x 1, x 2, … >Objective Function (max, min) >s.t., with constraints listed Variables on left side Constants on right side All variables nonnegative >NB: “Standard Form” requires constraints stated as equalities add slack/surplus variables

© Copyright 2004, Alan Marshall 41 Possible LP Outcomes >Unique optimal solution >Alternate optimal solutions >Unbounded problem >Infeasible problem

© Copyright 2004, Alan Marshall 42 Break 15 Minutes

© Copyright 2004, Alan Marshall 43 LP Models: Key Questions >What am I trying to decide? >What is the objective? Is it to be minimized or maximized? >What are the constraints? Are they limitations or requirements? Are they explicit or implicit?

© Copyright 2004, Alan Marshall 44Example A chemical company makes and sells a product in 40-lb. and 80-lb. bags on a common production line. To meet anticipated orders, next week’s production should be at least 16,000 lbs. Profit contributions are $2 per 40- lb. bag, and $4 per 80-lb. bag. The packaging line operates 1500 minutes/week. 40-lb. bags require 1.2 min. of packaging time; 80-lb. bags require 3 min. The company has 6000 square feet of packaging material available. Each 40-lb. bag uses 6 square feet, and each 80-lb. bag uses 10 square feet. How many bags of each type should be produced?

© Copyright 2004, Alan Marshall 45 Model Development >What do we need to decide? What are our decision variables?

© Copyright 2004, Alan Marshall 46 Model Development >What do we need to decide? x 1 = number of 40-lb. bags to produce x 2 = number of 80-lb. bags to produce

© Copyright 2004, Alan Marshall 47 Model Development >What is the objective?

© Copyright 2004, Alan Marshall 48 Model Development >What is the objective? Maximize total profit

© Copyright 2004, Alan Marshall 49 Model Development >What is the objective? Maximize total profit z = 2x 1 + 4x 2

© Copyright 2004, Alan Marshall 50 Check Your Units! >Always be sure that your units are consistent with the problem >Our decision variable is measured in “Bags” >Our profit/objective function is in $

© Copyright 2004, Alan Marshall 51 Model Development >What are the constraints?

© Copyright 2004, Alan Marshall 52 Model Development >What are the constraints? Aggregate production: Packaging time: Packaging materials: Nonnegativity:

© Copyright 2004, Alan Marshall 53 Model Development >What are the constraints? Prod:40x x 2 > 16,000 Time: Mat: NN:

© Copyright 2004, Alan Marshall 54 Model Development >What are the constraints? Prod:40x x 2 > 16,000 Time:1.2x 1 + 3x 2 < 1,500 Mat: NN:

© Copyright 2004, Alan Marshall 55 Model Development >What are the constraints? Prod:40x x 2 > 16,000 Time:1.2x 1 + 3x 2 < 1,500 Mat:6x x 2 < 6,000 NN:

© Copyright 2004, Alan Marshall 56 Model Development >What are the constraints? Prod:40x x 2 > 16,000 Time:1.2x 1 + 3x 2 < 1,500 Mat:6x x 2 < 6,000 NN:x 1, x 2 > 0

© Copyright 2004, Alan Marshall 57 Check The Units! >What are the constraints? Prod:40x x 2 > 16,000lbs/bag x bags Time:1.2x 1 + 3x 2 < 1,500 min/bag x bags Mat:6x x 2 < 6,000 ft 2 /bag x bags NN:x 1, x 2 > 0

© Copyright 2004, Alan Marshall 58 Complete Model x 1 = no. of 40-lb. bags to produce x 2 = no. of 80-lb. bags to produce Maximize z = 2x 1 + 4x 2 subject to 40x x 2 > 16, x 1 + 3x 2 < 1,500 6x x 2 < 6,000 x 1, x 2 > 0

© Copyright 2004, Alan Marshall 59Excel >Model Input Basic model Solver: identify objective function & constraints >Results Answer Report Sensitivity Report Limits Report

© Copyright 2004, Alan Marshall 60 Spreadsheet Model

© Copyright 2004, Alan Marshall 61 Cell Formulas

© Copyright 2004, Alan Marshall 62 Using Solver

© Copyright 2004, Alan Marshall 63 Adding Constraints

© Copyright 2004, Alan Marshall 64 Note Assumptions ticked - essential! Solver Options

© Copyright 2004, Alan Marshall 65 Answer Report

© Copyright 2004, Alan Marshall 66 Sensitivity Report

© Copyright 2004, Alan Marshall 67 Optimal Solution >Three parts: decision variables values of decision variables value of objective function >Decision variables: basic (non-zero value), non-basic (zero) Basic variables are “in the solution”; non- basic are not

© Copyright 2004, Alan Marshall 68 Impact of Possible Changes >Change existing constraint changes slope; may change size of feasible region >Add new constraint may decrease feasible region (if binding) >Remove constraint may increase feasible region (if binding) >Change objective may change optimal solution

© Copyright 2004, Alan Marshall 69 Sensitivity Analysis >The next section will deal with the sensitivity analysis that can be done simply based on the reports generated, without rerunning the solution. >While this can be useful, mastery of this material is not important for the course, or programme as you can always simply run the model again with the changes >However, we will look at this briefly

© Copyright 2004, Alan Marshall 70 Sensitivity Analysis >Used to determine how optimal solution is affected by changes, within specified ranges: objective function or RHS coefficients (only 1 at a time) >Important to managers who must operate in a dynamic environment with imprecise estimates of coefficients >Sensitivity analysis allows us to ask certain what-if questions

© Copyright 2004, Alan Marshall 71 Objective Function Coefficients >If an objective function coefficient changes, slope of objective function line changes. At some threshold, another corner point may become optimal. >Question: How much can objective coefficient change without changing optimal corner point?

© Copyright 2004, Alan Marshall 72 x2x2 x1x1 current optimal solution new optimal solution Geometric Illustration

© Copyright 2004, Alan Marshall 73 Sensitivity Report

© Copyright 2004, Alan Marshall 74 Reduced Costs (Objective Function Coefficients) >Reduced cost for decision variable not in solution (current value is 0) is amount variable's objective function coefficient would have to improve (increase for max, decrease for min) before variable could enter solution >Reduced cost for decision variable in solution is 0

© Copyright 2004, Alan Marshall 75 Sensitivity Report

© Copyright 2004, Alan Marshall 76 Objective Function Ranges >Interval within which original solution remains optimal (same decision variables in solution) while keeping all other data constant >Within this range, associated reduced cost is valid >Value of the objective function might change in this range of optimality

© Copyright 2004, Alan Marshall 77 Sensitivity Report

© Copyright 2004, Alan Marshall 78 RHS Coefficient Changes >When a right-hand-side value changes, the constraint moves parallel to itself >Question: How is the solution affected, if at all? >Two cases: constraint is binding constraint is nonbinding

© Copyright 2004, Alan Marshall 79 x2x2 x1x1 optimal solution Binding constraints Binding constraints have zero slack Nonbinding constraints have positive slack Nonbinding constraint Geometric Illustration

© Copyright 2004, Alan Marshall 80 Binding Constraints

© Copyright 2004, Alan Marshall 81 Tightening & Relaxing Constraints >Tightening a constraint means to make it more restrictive; i.e. decreasing the RHS of a less than constraint, or increasing the RHS of a greater constraint. This compresses the feasible region. >Relaxing a constraint means to make it less restrictive; i.e., expand the feasible region.

© Copyright 2004, Alan Marshall 82 x2x2 x1x1 Original optimal solution New optimal solution (z decreases) Effect of Tightening a Constraint

© Copyright 2004, Alan Marshall 83 x2x2 x1x1 optimal solution Effect of Relaxing a Constraint

© Copyright 2004, Alan Marshall 84 Sensitivity Report

© Copyright 2004, Alan Marshall 85 Dual Prices (RHS Coefficients) >Amount objective function will improve per unit increase in constraint RHS value >Reflects value of an additional unit of resource (if resource cost is sunk); reflects extra value over normal cost of resource (when resource cost is relevant) >Always 0 for nonbinding constraint (positive slack or surplus at optimal solution)

© Copyright 2004, Alan Marshall 86 Sensitivity Report

© Copyright 2004, Alan Marshall 87 Sensitivity Report

© Copyright 2004, Alan Marshall 88 RHS Ranges >As long as the constraint RHS coefficient stays within this range, the associated dual price is valid >For changes outside this range, must resolve

© Copyright 2004, Alan Marshall 89 Shadow vs Dual Prices >Shadow Price: Amount objective function will change per unit increase in RHS value of constraint >For maximization problems, dual prices and shadow prices are the same >For minimization problems, shadow prices are the negative of dual prices

© Copyright 2004, Alan Marshall 90 Next Class >We will look at the two handout exercises To be posted on the website, with solution files >Decision Theory >In Lecture 3, we will do additional problems in both Linear Programming and Decision Theory