Introduction to linear programming (LP): Minimization

Slides:



Advertisements
Similar presentations
Using Solver to solve a minimization LP + interpretation of output BSAD 30 Dave Novak Source: Anderson et al., 2013 Quantitative Methods for Business 12.
Advertisements

Linear Programming Problem
BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or.
Optimization Models Module 9. MODEL OUTPUT EXTERNAL INPUTS DECISION INPUTS Optimization models answer the question, “What decision values give the best.
SOLVING LINEAR PROGRAMS USING EXCEL Dr. Ron Lembke.
Managerial Decision Modeling with Spreadsheets
Sensitivity analysis BSAD 30 Dave Novak
Chapter 2: Introduction to Linear Programming
An Introduction to Linear Programming : Graphical and Computer Methods
1 Linear Programming Using the software that comes with the book.
LINEAR PROGRAMMING: THE GRAPHICAL METHOD
LINEAR PROGRAMMING INTRODUCTION
Chapter 3 An Introduction to Linear Programming
1 1 Slide © 2009 South-Western, a part of Cengage Learning Slides by John Loucks St. Edward’s University.
1 1 Slides by John Loucks St. Edward’s University Modifications by A. Asef-Vaziri.
Readings Readings Chapter 2 An Introduction to Linear Programming.
FORMULATION AND GRAPHIC METHOD
1 1 Slide LINEAR PROGRAMMING: THE GRAPHICAL METHOD n Linear Programming Problem n Properties of LPs n LP Solutions n Graphical Solution n Introduction.
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Introduction to Mathematical Programming OR/MA 504 Chapter 3.
Chapter 19 Linear Programming McGraw-Hill/Irwin
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS ST. EDWARD’S UNIVERSITY.
1 1 Slide Linear Programming (LP) Problem n A mathematical programming problem is one that seeks to maximize an objective function subject to constraints.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
Chapter 7 Introduction to Linear Programming
1 1 Slide © 2005 Thomson/South-Western Chapter 2 Introduction to Linear Programming n Linear Programming Problem n Problem Formulation n A Maximization.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Introduction to Linear Programming BSAD 141 Dave Novak.
LP: Summary thus far Requirements Graphical solutions Excel Sensitivity Analysis.
QMB 4701 MANAGERIAL OPERATIONS ANALYSIS
Linear Programming Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
1 1 Slide © 2001 South-Western College Publishing/Thomson Learning Anderson Sweeney Williams Anderson Sweeney Williams Slides Prepared by JOHN LOUCKS QUANTITATIVE.
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.
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.
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.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Linear Programming Models: Graphical and Computer Methods 7 To accompany Quantitative Analysis for Management, Twelfth Edition, by Render, Stair, Hanna.
1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization.
MIT and James Orlin © The Geometry of Linear Programs –the geometry of LPs illustrated on GTC.
1 1 Slide Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an.
1 2 Linear Programming Chapter 3 3 Chapter Objectives –Requirements for a linear programming model. –Graphical representation of linear models. –Linear.
An Introduction to Linear Programming
Linear Programming for Solving the DSS Problems
Linear Programming.
Decision Support Systems
An Introduction to Linear Programming Pertemuan 4
Linear Programming: Sensitivity Analysis and Duality
Chapter 2 An Introduction to Linear Programming
St. Edward’s University
Chapter 5 Linear Inequalities and Linear Programming
Chapter 19 – Linear Programming
Chapter 3 The Simplex Method and Sensitivity Analysis
Linear Programming SIMPLEX METHOD.
Systems of Equations and Inequalities
Linear Programming.
Linear Programming Problem
Optimization Models Module 9.
Solving Linear Optimization Problems Using the Solver Add-in
Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation.
BUS-221 Quantitative Methods
Introduction to Linear Programming
Linear Programming.
Presentation transcript:

Introduction to linear programming (LP): Minimization BSAD 30 Dave Novak Fall 2018 Source: Anderson et al., 2015 Quantitative Methods for Business 13th edition – some slides are directly from J. Loucks © 2013 Cengage Learning

Overview Focus on section 7.5 Graphing a minimization problem The process is IDENTICAL to the maximization problem, so this material provides a review of Lecture #7 New material related to slack and surplus variables

Review: The LP Model 1) Decision variables (x1, x2,… xn) Typically represent quantities of something We are trying to mathematically determine the “optimal” quantities of x1, x2,… xn 2) Objective Function (OF): the linear equation describing the mathematical relationship between the decision variables There is ONLY ONE OF! The expression we are maximizing or minimizing

The LP Model 3) Constraints: linear equations expressing values the decision variables (x1, x2) can or cannot take on Restrictions or conditions that apply For example, resource limitations like labor, materials, production capacity, etc. Nonnegativity constraints

Discussion Consider the question of how many pickup trucks should be made by Ford to maximize quarterly profits What are possible decision variables? What is a problem definition or objective? What are some constraints? If profit increases based on the number of trucks sold, Ford would want to make an unlimited number of trucks… We have to impose realistic constraints based on actual limitations

When to use LP The decision involves minimizing or maximizing something The decision involves questions about how much? or how many? You have constraints on the decision variables Labor Input materials Production limitations

Example 2: minimization LP formulation Objective Function Min 5x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints

Graph the 3 constraints Constraint 1: Figure out the end points of the equation 2x1 + 5x2 = 10 using x (x1) and y (x2) coordinates If we set x1 = 0, and solve for x2 , then x2 = 2 the point (0, 2) If we set x2 = 0, and solve for x1 , then x1 = 5 the point (5, 0) Connect (5,0) and (0,2) The ">" side is above this line

Graph the 3 constraints Constraint 1:

Graph constraint #1 x2 x1 6 5 4 3 2 1 #1) 2x1 + 5x2 > 10 1 2 3 4 5 6

Graph the 3 constraints Constraint 2: If we set x2 = 0, then x1 = 3; but setting x1 = 0 will yield x2 = -12, which is not on the graph Thus, to get a second point on this line with a positive value, set x1 to any number larger than 3 and solve for x2 If we set x1 = 4, then x2 = 4 Connect (3,0) and (4,4) The ">“ side is to the right, away from the origin

Graph the 3 constraints Constraint 2:

Graph the 3 constraints Constraint 2:

Graph constraint #2 x2 6 5 4 3 2 1 #2) 4x1 - x2 > 12 x1 1 2 3 4 5 6

Graph the 3 constraints Constraint 3: If we set x1 = 0, then x2 = 4; Connect (4,0) and (0,4) The ">" side is above this line

Graph the 3 constraints Constraint 3:

Graph constraint #3 x2 6 5 4 3 2 1 #3) x1 + x2 > 4 x1 1 2 3 4 5 6

Combine 3 constraints on the graph x2 6 5 4 3 2 1 Feasible Region extends infinitely outward #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1 1 2 3 4 5 6

Graph the OF The OF is NOT a constraint on the problem It is a mathematical representation of the profit or cost function We are solving the problem with respect to minimizing the value of the OF All feasible combinations of decision variables (x1 and x2) will yield a profit or a cost that falls on the OF line Our optimal solution is determined based on the specific OF

Graph the OF Set the RHS of the objective function equation equal to an arbitrary constant OF is Min: 5x1 + 2x2 = RHS Set RHS = 20 (for example) Calculate endpoints of the line 5x1 + 2x2 = 20 If we set x1 = 0, then x2 = 10 If we set x2= 0, then x1 = 4 Connect (4,0) and (0,10)

Graph the OF

Graph the OF x2 x1 6 5 4 3 2 1 Objective Function: 5x1 + 2x2 = 20 1 2 3 4 5 6

Graph the OF We want to “move” the OF line in towards the origin (bc minimization problem) If you change the RHS value from 20 to something smaller, we can shift the OF line toward the origin The SLOPE does NOT change Move the OF in the direction which lowers its value (down), since we are minimizing, until it touches the last point of the feasible region, determined by the last two constraints

Graph the OF x2 x1 Objective function 6 5 4 3 2 1 #2) 4x1 - x2 > 12 Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1 1 2 3 4 5 6

Graph the OF x2 x1 Objective function 6 5 4 3 2 1 #2) 4x1 - x2 > 12 Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1 1 2 3 4 5 6

Magnified view of extreme points #3) x1 + x2 > 4 #2) 4x1 - x2 > 12 A (?, ?) #1) 2x1 + 5x2 > 10 B (?, ?) Objective Function (OF)

Identify and graph extreme points Solve for the two extreme points at the intersection of constraints #2 and #3, and the intersection of constraints #1 and #3 Why these? By looking at the OF and understanding that this is a MINIMIZATION problem, we know that the cost minimizing solution involves “sliding” the OF towards the origin (0,0) We need to solve the coordinates or the (x1, x2) values for those points

Evaluate extreme point A Intersection of constraints #2 and #3

Evaluate extreme point A Intersection of constraints #2 and #3

Evaluate extreme point A Intersection of constraints #2 and #3

Evaluate extreme point B Intersection of constraints #1 and #3

Evaluate extreme point B Intersection of constraints #1 and #3

Evaluate extreme point B Intersection of constraints #1 and #3

Magnified view of extreme points #3) x1 + x2 > 4 #2) 4x1 - x2 > 12 A (3.2, 0.8) #1) 2x1 + 5x2 > 10 B (3.33, 0.67)

Calculate optimal solution Plug each set of extreme point values (x1, x2) into OF and select the SMALLEST

Optimal solution x2 x1 6 5 4 3 2 1 #2) 4x1 - x2 > 12 Objective Function: 5x1 + 2x2 x2 6 5 4 3 2 1 Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 Optimal Solution is Point A: x1 = 16/5, x2 = 4/5, 5x1 + 2x2 = 17.6 1 2 3 4 5 6 x1 #1) 2x1 + 5x2 > 10

Graphing procedure (Min) Graph each of the constraints Determine the feasible region that satisfies all constraints simultaneously Draw an objective function line Move parallel OF lines toward smaller extreme point values without entirely leaving the feasible region The feasible solution on the objective function line with the smallest value is an optimal solution

Minimization example We just solved this graphically Min 5x1 + 2x2 Objective Function Min 5x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints

Minimization problem x2 x1 Objective function 6 5 4 3 2 1 Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1 1 2 3 4 5 6

Setting up the problem Download, save, and then open the Excel template file from the URL on the course schedule

Setting up the problem in Solver Go to Excel  choose the “Data” tab and then click on Solver The Solver Screen pops up and we will need to reference the cells for our problem: Set Objective refers to the OF in B4 Click the Min Radio button as this is a minimization problem

Setting up the problem By Changing Variable Cells refers to our two variables (cells B1 and B2) Subject to the Constraints: refers to our constraints for the problem. We will add each one separately. Select “Add”  in the Add Constraint Menu choose cell B8 for the left-hand-side “Cell Reference” for constraint #1 and choose cell C8 for the right-hand-side “Cell Reference” for constraint #1

Setting up the problem Make sure the Make Unconstrained Variables non-negative check box is checked (this ensures that X1 and X2 are non-negative). We cannot produce a negative number of either decision variable And using the Pull-down menu make sure that Select Solving Method is Simplex LP Select SOLVE

Setting up the problem The cells in your spreadsheet model should change and cell B1 should now = 3.2, cell B2 should now = 0.8, and cell B4 should = 17.6 Using the Solver Results Menu that pops up on your screen highlight both “Answer” and “Sensitivity” on the right-hand-side under Reports and click OK

Answer report (16/5) (4/5)

Answer Report Excel Solver uses the term “slack” when referring to any non-binding ≥ or ≤ constraints Non-binding constraints do not restrict the feasible region at the optimal solution point The optimal solution does not directly involve or lie on a non-binding constraint

Answer Report Binding constraints let us know that all the resources associated with those specific constraints are used (there is no excess and there is no shortage) The constraint “binds” the problem, and all resources are used – there is no slack or surplus

Answer Report Constraint #1 is a non-binding constraint and has “surplus” = 0.4 (although Excel uses the term slack for both ≥ and ≤) Constraint #1 does not directly affect the optimal solution – it is a non-binding constraint Because this is a minimization problem, and the constraints are ≥, this lets us know that at the optimal point (3.2, 0.8) we exceed the RHS of constraint #1 by 0.4 units

Magnified view of extreme points #3) x1 + x2 > 4 #2) 4x1 - x2 > 12 Surplus in non-binding constraint #1 at optimal point Optimal  A (3.2, 0.8) This point is bound by constraints #2 and #3, but NOT by constraint #1 #1) 2x1 + 5x2 > 10 B (3.33, 0.67)

Standard form of the LP Standard form of the LP involves adding slack or surplus variables to the mathematical model so the problem can be solved using strict equalities

Slack and surplus variables Surplus variables describe EXCESS quantity or the amount over the RHS of the constraint that is being used (associated with ≥) It is feasible to use less Slack variables describe IDLE resources or the amount of the RHS of the constraint that is not being used (associated with ≤) It is feasible to use more

Slack and surplus variables Slack and surplus variables become a variable in the standard form LP whenever there is an inequality constraint Less-than or equal to constraints ≤ require a SLACK variable that is added to the LHS of the constraint so that we can set the LHS = the RHS

Slack and surplus variables Greater-than or equal to constraints ≥ require a SURPLUS variable that is subtracted from the LHS of the constraint so that we can set the LHS = the RHS Equality constraints do not require either a slack or surplus variable in standard form

Standard form of the LP Standard form of the LP involves changing mathematical model so the problem can be solved using strict equalities For each ≤ (less than or equal to) constraint, there should be a “slack” variable (denoted by Si) added to the LHS For each ≥ (greater than or equal to) constraint, there should be a “surplus” variable (denoted by Si) subtracted from the LHS

Standard form of the LP Standard form Slack / Surplus variables have a coefficient of 0 in the OF Slack / Surplus variables have a coefficient of 1 in the constraints

Standard form of the LP Reformulate the minimization problem Min 5x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0

Standard form of the LP Reformulate the minimization problem

Standard form of the LP Solve for s1, s2, s3

Standard form of the LP Reformulate the maximization problem (Lecture #7) Max 5x1 + 7x2 s.t. x1 < 6 2x1 + 3x2 < 19 x1 + x2 < 8 x1 > 0 and x2 > 0

Standard form of the LP Reformulate the maximization problem (Lecture #7)

Slack or surplus? (I just randomly created this to illustrate slack and surplus) Objective Function Min 10x1 + 25x2 s.t. #1) 2x1 + 5x2 > 15 #2) 4x1 - x2 > 20 #3) x1 + x2 ≤ 7 #4) 2x1 = 15 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints

Standard Form?

Standard form of the LP You could think of slack/surplus variables as “placeholder” variables that hold the numeric difference between the LHS and RHS of any inequality In an equality constraint, the RHS MUST EQUAL the LHS, so there are no slack/surplus variables

Summary Minimization problem Graph constraints solving for end point coordinates Graph OF solving for end point coordinates Identify extreme points and solve for interior extreme points Evaluate potential optimal solution values by plugging extreme point values into OF and solving Solving the minimization LP using MS Solver

Summary Answer report summary Formulate Standard Form LP Define surplus variable in context of any minimization problem Formulate Standard Form LP