Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Optimization and Linear Programming (LP)

Similar presentations


Presentation on theme: "Introduction to Optimization and Linear Programming (LP)"— Presentation transcript:

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

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

3 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.

4 Applications of Optimization
Determining Product Mix Manufacturing Logistics Financial Planning

5 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!

6 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.

7 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!

8 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.

9 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.

10 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: 350X X2

11 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

12 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).

13 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.

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

15 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 <= or X1 <=174 3rd constraint: 12X1 <= 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!

16 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.

17 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:

18 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.

19 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

20 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.

21 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

22 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.”

23 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.

24 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?

25 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

26 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

27 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.

28 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)

29 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.

30 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

31 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

32 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

33 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

34 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?

35 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.

36 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!

37 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.

38 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.

39 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!

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

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

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

43 Level Curves Method So, let’s recap what we have done so far. First we assumed any value for the objective function which is Next we plotted this line (i.e., 350X X2 = 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.

44 Calculating the Optimal Solution
The optimal solution occurs where the “pumps” and “labor” constraints intersect. Solve them simultaneously! This occurs where: X1 + X2 = (1) and 9X1 + 6X2 = (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

45 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.

46 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

47 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.

48 Practice Example on Solving Two Simultaneous Equation
Solve these two simultaneous equations: 2X1 + 3X2 = (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.

49 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.

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

51 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.

52 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

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

54 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.

55 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

56 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.

57 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.

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

59 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.

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

61 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.

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

63 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.

64 End of Chapter 2


Download ppt "Introduction to Optimization and Linear Programming (LP)"

Similar presentations


Ads by Google