Introduction to Optimization and Linear Programming (LP)

Slides:



Advertisements
Similar presentations
Linear Programming Problem
Advertisements

Lesson 08 Linear Programming
LIAL HORNSBY SCHNEIDER
Linear Programming Problem
Chapter 2: Modeling with Linear Programming & sensitivity analysis
CCMIII U2D4 Warmup This graph of a linear programming model consists of polygon ABCD and its interior. Under these constraints, at which point does the.
Linear Programming Models: Graphical Methods
Managerial Decision Modeling with Spreadsheets
Chapter 2 Linear Programming Models: Graphical and Computer Methods © 2007 Pearson Education.
Chapter 8: Linear Programming
1 Spreadsheet Modeling & Decision Analysis: A Practical Introduction to Management Science 3d edition by Cliff Ragsdale.
Spreadsheet Modeling & Decision Analysis A Practical Introduction to Management Science 6 th edition Cliff T. Ragsdale © 2011 Cengage Learning. All Rights.
Chapter 2: Introduction to Linear Programming
LINEAR PROGRAMMING: THE GRAPHICAL METHOD
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.
FORMULATION AND GRAPHIC METHOD
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.
Linear Programming Models: Graphical and Computer Methods
1-1 Introduction to Optimization and Linear Programming Chapter 1.
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Chapter 19 Linear Programming McGraw-Hill/Irwin
1 Chapter 8 Linear programming is used to allocate resources, plan production, schedule workers, plan investment portfolios and formulate marketing (and.
Linear Systems Two or more unknown quantities that are related to each other can be described by a “system of equations”. If the equations are linear,
Special Conditions in LP Models (sambungan BAB 1)
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS ST. EDWARD’S UNIVERSITY.
Operations Management
1 1 Slide Linear Programming (LP) Problem n A mathematical programming problem is one that seeks to maximize an objective function subject to constraints.
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.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
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.
Linear Programming (LP) Problems MAX (or MIN): c 1 X 1 + c 2 X 2 + … + c n X n Subject to:a 11 X 1 + a 12 X 2 + … + a 1 n X n
Spreadsheet Modeling & Decision Analysis A Practical Introduction to Management Science 5 th edition Cliff T. Ragsdale.
Chapter 1 Introduction n Introduction: Problem Solving and Decision Making n Quantitative Analysis and Decision Making n Quantitative Analysis n Model.
McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Supplement 6 Linear Programming.
1 Optimization Techniques Constrained Optimization by Linear Programming updated NTU SY-521-N SMU EMIS 5300/7300 Systems Analysis Methods Dr.
© 2009 Prentice-Hall, Inc. 7 – 1 Decision Science Chapter 3 Linear Programming: Maximization and Minimization.
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 Geometrical solution of Linear Programming Model.
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.
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.
Supply Chain Management By Dr. Asif Mahmood Chapter 9: Aggregate Planning.
Chapter 2 Linear Programming Models: Graphical and Computer Methods
Spreadsheet Modeling & Decision Analysis:
An Introduction to Linear Programming
Linear Programming.
GENERAL MATHS – UNIT TWO
Decision Support Systems
An Introduction to Linear Programming Pertemuan 4
Chapter 2 An Introduction to Linear Programming
Chapter 5 Linear Inequalities and Linear Programming
Linear Programming Dr. T. T. Kachwala.
prepared by Imran Ismail
Introduction to linear programming (LP): Minimization
GENERAL MATHS – UNIT TWO
Spreadsheet Modeling & Decision Analysis
Modeling and Solving LP Problems in a Spreadsheet
Linear Programming Problem
Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation.
College Algebra Sixth Edition
Spreadsheet Modeling & Decision Analysis:
Presentation transcript:

Introduction to Optimization and Linear Programming (LP) Chapter 2 Introduction to Optimization and Linear Programming (LP)

Introduction We all face decisions about how to use limited resources such as: Machines Land Time Money Workers

Mathematical Programming... Mathematical Programming is a field of management science that finds the optimal or best way of using limited resources to achieve the objectives of a business. a.k.a. Optimization. In this course we will use a powerful tool called Linear Programming (LP) to help us find the best (i.e., optimal) solutions.

Applications of Optimization Determining Product Mix Manufacturing Logistics Financial Planning

Characteristics of Optimization Problems Decisions Variables (e.g., what is unknown). Constraints (e.g., limited availability of money, employees, or machines) Objectives (e.g., maximize profit or minimize cost). How about some examples!

Example 1: Determining Product Mix A manager needs to know how many TV’s, VCR’s, and Radios to produce in the next production period to maximize total profit. Decision variables: how many TV’s, VCR’s, and Radios to produce. Constraints: manager has a limited budget, number of employees and machines. Objective: Maximize profit.

See next slide for the solution! Example 2: Logistics Assume that Wal-Mart has 10 distribution centers and 50 retail stores in the state of Pennsylvania. Every retail outlet has a given demand for a given product that must be met. Also, every distribution center has a limited supply quantity of each product. We want to determine the optimal shipping strategy that will minimize total shipping cost. What are the decision variables, constraints, and objective function? See next slide for the solution!

Example 2 Solution Decision Variables: How many units of each product to ship from each distribution center to each retail outlet. Constraints: We’ll have 2 sets of constraints. Set 1 will ensure that each distribution center does not ship more that its capacity (i.e., supply constraints), while set 2 will ensure that the demand requirements of each retail outlet is satisfied (i.e., demand constraints). Objective: Minimize total shipping cost.

An Example LP Problem Blue Ridge Hot Tubs produces two types of hot tubs: Aqua-Spas & Hydro-Luxes. Aqua-Spa Hydro-Lux Pumps 1 1 Labor 9 hours 6 hours Tubing 12 feet 16 feet Unit Profit $350 $300 There are 200 pumps, 1566 hours of labor, and 2880 feet of tubing available.

5 Steps In Formulating LP Models: 1. Understand the problem. 2. Identify the decision variables. X1=number of Aqua-Spas to produce X2=number of Hydro-Luxes to produce 3. State the objective function as a linear combination of the decision variables. MAX: 350X1 + 300X2

5 Steps In Formulating LP Models (continued) 4. State the constraints as linear combinations of the decision variables. 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing 5. Identify any upper or lower bounds on the decision variables. X1 >= 0 X2 >= 0

5 Steps In Formulating LP Models (continued) The non-negativity constraint X1>=0 and X2>=0 basically ensures us that we will not get an optimal solution that will mathematically satisfy the constraints and objective function but will yield a negative solution (i.e., negative values for X1 and X2).

Example (continued) Note that the sign of the inequalities for all constraints are “<=“. Why don’t we express the inequalities as “=“ instead? The reason is that an optimal solution may not necessarily exhaust or consume all the available resources.

LP Model for Blue Ridge Hot Tubs MAX: 350X1 + 300X2 Subject to: 1X1 + 1X2 <= 200 9X1 + 6X2 <= 1566 12X1 + 16X2 <= 2880 X1 >= 0 X2 >= 0

Solving LP Problems: An Intuitive Approach Idea: Each Aqua-Spa (X1) generates the highest unit profit ($350), so let’s make as many of them as possible! How many would that be? Let X2 = 0 1st constraint: 1X1 <= 200 2nd constraint: 9X1 <=1566 or X1 <=174 3rd constraint: 12X1 <= 2880 or X1 <= 240 If X2=0, the maximum value of X1 is 174 and the total profit is $350*174 + $300*0 = $60,900 This solution is feasible, but is it optimal? No!

What Does “feasible” Mean? A feasible solution is one that satisfies all the constraints imposed on the problem. Note that a given linear programming problem may have many different feasible solutions. However, we are interested in only the “best” (i.e., optimal) feasible solution that will either maximize or minimize the objective function.

A Linear Programming Formulation Example Problem #22 page 43 1. Always start by identifying the decision variables in the problem. The decision variables are what we are trying to solve for. In this problem, note that we would like to determine how many laptops and how many desktops to produce. Therefore, we can identify the decision variables as:

Formulation (continued): Let X1 = no. of laptops to produce and Let X2 = no. of desktops to produce. 2. Next, you need to identify the objective function which will always be to minimize (e.g., cost, distance traveled, etc.) or maximize (e.g., profit, productivity, etc.) a given objective. This is typically stated in the content of the problem itself. Note in this problem the objective is to maximize profit.

Formulation (continued): Do we know the profit per unit for each desktop and each laptop? Yes, this is given as $600 and $900, respectively. Now we can mathematically formulate the objective function as: Maximize: $900X1 + $600X2

Formulation (continued): 3. Next, you need to identify all relevant constraints. Constraints are typically conveyed as limited resources such as limited labor hours, limited budget, limited machine hours, etc. All constraints need to be expressed mathematically as a function of the decision variables. Let us identify the constraints one by one.

From the content of the problem, it is stated that “This manufacturer has a special order to fill for another customer and cannot ship more than 80 desktop computers and….” Clearly, this statement constitutes a constraint. In other words, the optimal solution to this problem is restricted to producing a maximum of 80 desktops. Therefore, we can express this constraint mathematically as: X2 ≤ 80

Similarly, the problem also states that we cannot ship more than 75 laptops next month. So, we have another constraint that can be expressed mathematically as: X1 ≤ 75 The problem also states that the company spends “2 hours installing software and checking each desktop and 3 hours to complete the same process for laptops.”

Note that the consumption of hours incurred by producing the desktops and laptops (note that we currently do not know these optimal values and that is why we designate them as decision variables X1 and X2) can mathematically be expressed as: 3X1 + 2X2 So, this part of the constraint (i.e., the left hand side part) conveys the consumption of resources.

The first part of the above equation, 3X1, gives us the total number of hours that are consumed in producing the laptops while the second part of the equation, 2X2, gives us the total number of hours that are consumed in producing the desktops. The only thing that is missing from our equation is a right-hand side. Do we know how many hours we have available for installation and checking next month?

Yes we do as the problem states that we have 300 total hours available Yes we do as the problem states that we have 300 total hours available. So, let’s add this to our prior constraint which can now be expressed mathematically as: 3X1 + 2X2 ≤ 300

Finally, we typically add our non-negativity constraint that basically says that to ensure we do not get a mathematical solution that calls for producing negative amounts of desktops and laptops, we add: X1≥0 and X2≥0

Solving LP Problems: A Graphical Approach The constraints of an LP problem defines its feasible region. The best point in the feasible region is the optimal solution to the problem. For LP problems with 2 variables, it is easy to plot the feasible region and find the optimal solution.

Guidelines on Plotting Constraints All constraints are represented as straight lines as long as they are linear in nature. So, first ignore the sign of the inequality and replace it with an equality “=“ sign. Next, to find where a constraint intercepts the X1 axis, plug X1=0 and solve for X2. This will give us the coordinates (0,X2) Now to find where the constraint intercepts the X2 axis, plug X2=0 and solve for X1.This will give us the coordinates of the second point (X1,0)

Plotting Constraints Guidelines (continued) Now you have 2 points that the straight line equation goes through, so connect the 2 points. Finally, let’s put back the original inequality sign. In general, “<=“ constraints span a region that points toward the origin (i.e., coordinates (0,0)). Also, in general, “>=“ constraints span a region that points in the opposite direction of the origin. This notion is explained in more detail in the two animated videos that you will be watching shortly.

Summary of Graphical Solution to LP Problems 1. Plot the boundary line of each constraint 2. Identify the feasible region 3. Locate the optimal solution by using either: a. The level curves, or b. The corner points approach

boundary line of pump constraint Plotting the First Constraint X2 X1 250 200 150 100 50 (0, 200) (200, 0) boundary line of pump constraint X1 + X2 = 200

boundary line of labor constraint Plotting the Second Constraint X2 X1 250 200 150 100 50 (0, 261) (174, 0) boundary line of labor constraint 9X1 + 6X2 = 1566

boundary line of tubing constraint Plotting the Third Constraint X2 X1 250 200 150 100 50 (0, 180) (240, 0) boundary line of tubing constraint 12X1 + 16X2 = 2880 Feasible Region

Some Thoughts Note that the feasible region is the shaded area that is dictated by the constraints. Any point inside this feasible region is a possible solution to the problem. However, note that there are thousands or perhaps millions of feasible solutions. So, how do we pinpoint the optimal solution?

Determining the Optimal Solution In general, there are 2 methods that can be employed to find the optimal solution: The Level Curves approach. The Corner-Point enumeration.

Level Curves Approach Assume any value for the objective function. Next, plot this straight line equation on the same graph where you identified the feasible region. Using a straight edge, move this line (keeping it parallel, upward if maximizing and downward if minimizing) until you hit/touch the last point of the feasible region. This point will be your optimal solution!

Level Curves (continued) But how do you determine the coordinates of this optimal point? In general, you will have to solve simultaneously the two equations, that is the two constraints, that formed this point. Also, note that in general, the optimal solution occurs at a corner point.

Corner Point Enumeration In general the optimal solution will lie at a corner point of the feasible region. So, this method will identify the coordinates of each corner point. Plug each coordinate point into the objective function. If the objective function is maximization, then you are looking for the corner point with the highest value. If the objective function is minimization, you are looking for the corner point that will minimize the objective function.

Now let’s go back to the Hot Tubs example! Which Method is Better? The level curves approach is more efficient because you will typically solve for only one set of simultaneous equations rather than many. However, regardless of the approach used, both methods will yield identical results. Now let’s go back to the Hot Tubs example!

Plotting A Level Curve of the Objective Function X2 Plotting A Level Curve of the Objective Function X1 250 200 150 100 50 (0, 116.67) (100, 0) objective function 350X1 + 300X2 = 35000 Any value!

A Second Level Curve of the Objective Function X2 X1 250 200 150 100 50 (0, 175) (150, 0) objective function 350X1 + 300X2 = 35000 350X1 + 300X2 = 52500

Using A Level Curve to Locate the Optimal Solution X2 X1 250 200 150 100 50 objective function 350X1 + 300X2 = 35000 350X1 + 300X2 = 52500 optimal solution, Last point we touch

Level Curves Method So, let’s recap what we have done so far. First we assumed any value for the objective function which is 35000. Next we plotted this line (i.e., 350X1 + 300X2 = 35000). Now, since the objective function is a maximization one, we would like to push this line that we have just plotted upward until we touch the last corner point of the feasible region. This last point will be the optimal point.

Calculating the Optimal Solution The optimal solution occurs where the “pumps” and “labor” constraints intersect. Solve them simultaneously! This occurs where: X1 + X2 = 200 (1) and 9X1 + 6X2 = 1566 (2) From (1) we have, X2 = 200 -X1 (3) Substituting (3) for X2 in (2) we have, 9X1 + 6 (200 -X1) = 1566 which reduces to X1 = 122 So the optimal solution is, X1 = 122, X2 = 200-X1 = 78 Total Profit = $350*122 + $300*78 = $66,100

Corner Point Method This method is quite simple. Compute the coordinates of all the corner points of the feasible region. Next, plug the coordinates of each corner point into the objective function. Since our problem is a maximization one, the corner point with the highest objective function value will be the optimal solution.

Enumerating The Corner Points X2 X1 250 200 150 100 50 (0, 180) (174, 0) (122, 78) (80, 120) (0, 0) obj. value = $54,000 obj. value = $64,000 obj. value = $66,100 obj. value = $60,900 obj. value = $0

Enumerating The Corner Points Once again, how do we know in the prior slide the coordinates for each corner point? If you recall we need to solve simultaneously for the two constraints (i.e., the two straight lines) that formed each corner.

Practice Example on Solving Two Simultaneous Equation Solve these two simultaneous equations: 2X1 + 3X2 = 12 (1) 1X1 + 2X2 = 8 (2) From (2): X1 = 8 – 2X2 (3) Plug (3) into (1) and solve for X2: 2(8 – 2X2) + 3X2 = 12 or X2 = 4 Plug X2 = 4 into either (1) or (2) and solve for X1: Plugging X2 = 4 into (1): 2X1 + 3(4) = 12, or X2 = 0.

Another Graphical Solution Example Max: 3X1 + 4X2 Subject to: X1<= 12 X2 <= 10 4X1 + 6X2 <= 72 X1, X2 >=0 Solve this problem graphically using both the corner-point and level curves approach. Try it before you view the solution on the next slide.

Solution Assume an initial value of 12 using the level curves approach

Graphical Solution Method Video Clips Now will be a good time to view the two video clips that I have prepared for you in order to enhance/aid your understanding of the graphical solution method, so please view them from Week 1 Multimedia, under the heading Animation.

Special Conditions in LP Models A number of “anomalies” can occur in LP problems where we will just refer to them as “Special Cases”: Alternate Optimal Solutions Redundant Constraints Unbounded Solutions Infeasibility

alternate optimal solutions Example of Alternate Optimal Solutions X2 X1 250 200 150 100 50 450X1 + 300X2 = 78300 objective function level curve alternate optimal solutions

Alternate Optimal Solutions (continued) As the previous graphical example shows, when the final level curve is parallel to one of the constraints, this is a signal that alternate optimal solutions are present. This basically implies that all points along that edge will yield the same objective function value.

Example of a Redundant Constraint 250 200 150 100 50 boundary line of tubing constraint Feasible Region boundary line of pump constraint boundary line of labor constraint

Redundant Constraints (continued) As noted in the previous slide, the pump constraint is a redundant constraint and has no impact on the feasible region. In other words, we can usually eliminate the redundant constraint as it has no role in determining the feasible region.

Redundant Constraints (continued) Consider the following 2 constraints: X1 >= 20 (1) X1 >= 10 (2) Are these 2 constraints redundant? Yes, constraint (2) is redundant. It is identical to a scenario whereby I tell you must spend at least 20 dollars and add another statement you must spend at least 10 dollars. Which statement is binding? Clearly the first statement. Statement 2 is redundant.

Example of an Unbounded Solution 1000 800 600 400 200 X1 + X2 = 400 X1 + X2 = 600 objective function X1 + X2 = 800 -X1 + 2X2 = 400

Unbounded Solution (continued) As the previous graph shows, we can technically make infinite profit as we can keep on pushing the level curve further and further. This situation came about due to the fact that the feasible solution has no boundary. Such problems should not arise in real life applications. If they do, this may signal an error in formulating the problem.

Example of Infeasibility 250 200 150 100 50 X1 + X2 >= 200 X1 + X2 <= 150 feasible region for second constraint feasible region for first constraint

Infeasibility (continued) As the previous graph shows, there is no way of being able to simultaneously satisfy both constraints. If that occurs in a real life application, this is a signal that the problem was formulated incorrectly.

Special Conditions in LP Problems Video Clip Now will be a good time to view the video clip titled “Special Conditions in LP Problems”.

Practice Problems Under Week 1 Multimedia, there is a link under the heading Practice Problems that will provide you with further solutions to problems from your textbook using the graphical solution method.

End of Chapter 2