Download presentation
Presentation is loading. Please wait.
Published byTobias Jonas McDonald Modified over 9 years ago
1
1 Chapter 8 Linear programming is used to allocate resources, plan production, schedule workers, plan investment portfolios and formulate marketing (and military) strategies. The versatility and economic impact of linear programming in today’s industrial world is truly awesome.--Eugene Lawler Linear Programming
2
2 What is a Linear Program? A linear program is a mathematical model that indicates the goal and requirements of an allocation problem. It has two or more non-negative variables. Its objective is expressed as a mathematical function. The objective function plots as a line on a two-dimensional graph. There are constraints that affect possible levels of the variables. In two dimensions these plot as lines and ordinarily define areas in which the solution must lie.
3
3 Redwood Furniture Problem Formulation Let X T and X C denote the number of tables and chairs to be made. (Define variables) Maximize P = 6X T + 8X C (Objective function) Subject to: (Constraints) 30X T + 20X C < 300 (wood) 5X T + 10X C < 110 (labor) where X T and X C > 0 (non-negativity conditions) Letting X T represent the horizontal axis and X C the vertical, the constraints and non-negativity conditions define the feasible solution region.
4
4 Feasible Solution Region for Redwood Furniture Problem
5
5 Graphing to Find Feasible Solution Region For an inequality constraint (with ), first plot as a line: 30X T + 20X C = 300. Get two points. Intercepts are easiest: Set X C = 0, solve for X T for horizontal intercept: 30X T + 20(0) = 300 => X T = 300/30 = 10 Set X T = 0, solve for X C for vertical intercept: 30(0) + 20X C = 300 => X C = 300/20 = 15 Above gets wood line. Do same for labor. Mark valid sides and shade feasible solution region. Any point there satisfies all constraints and non-negativity conditions.
6
6 Graphing to Find Feasible Solution Region To establish valid side, pick a test point (usually the origin). If that point satisfies the constraint, all points on same side are valid. Otherwise, all points on other side are instead valid. Equality constraints have no valid side. The solution must be on the line itself. Some constraint lines are horizontal or vertical. These involve only one variable and one intercept.
7
7 Finding Most Attractive Corner The optimal solution will always correspond to a corner point of the feasible solution region. Because there can be many corners, the most attractive corner is easiest to find visually. That is done by plotting two P lines for arbitrary profit levels. Since the P lines will be parallel, just hold your pencil at the same angle and role it in from the smaller P’s line toward the bigger one’s That is the direction of improvement. Continue rolling until only one point lies beneath the pencil. That is the most attractive corner. (Problems can have two most attractive corners.)
8
8 Most Attractive Corner for Redwood Furniture Problem
9
9 Finding the Optimal Solution The coordinates of the most attractive corner provide the optimal levels. Because reading from graph may be inaccurate, it is best to solve algebraically. Simultaneously solving the wood and labor equations, the optimal solution is: X T = 4 tables X C = 9 chairs P = 6(4) + 8(9) = 96 dollars Note: supply the computed level of the objective in reporting the optimal solution.
10
10 Advice for Solving Linear Programs The most attractive corner need not be where the two lines cross. Verify by doubling the table profit. Then the P lines will be steeper, and (X T = 10, X C = 0) would be best. doubling instead the chair profit. The P lines will be flatter, and (X T = 0, X C = 11) is best. Problems can have more than 2 constraints. The objective function can involve negative coefficients. Therefore, the better Ps may not lie to the right. Use 2 lines to guarantee getting right direction.
11
11 Minimizing Cost: Feed-Mix Problem Let X B and X S denote pounds of buckwheat and sunflower in mixture. Minimize C=.18X B +.10X S Subject to:.04X B +.06X S > 480 (fat).12X B +.10X S > 1,200 (prot.).10X B +.15X S > 1,500 (rough.) where X B, X S > 0 The optimal solution is: X B = 3,750 pounds X S = 7,500 pounds C =.18(3,750) +.10(7,500) = 1,425 dollars
12
12 Minimizing Cost: Feed-Mix Problem
13
13 Other Constraint Types Resources: amount used < available level. Requirements: quan. > minimum (< max.). X T > 5 (demand) X C < 5 (capacity) Mixture: product > (or <) multiple of other. X C > 4X T (at least 4 chairs per table made) X B <.5X S (buckw. not exceed 1/2 wt of sunfl.) Transform before plotting: X C 4X T > 0 X B .5X S < 0 Equality: X T + X C = 10 (exactly 10 items)
14
14 Special Problem Types Infeasible Problems: These arise from contradictions among the constraints. No solution possible until conflict is resolved. Ties for optimal solution: Multiple optimal solutions can exist. Any linear combination of two optimal corners is also optimal. Unbounded problems: Feasible solution regions may be open-ended, and the direction of improvement coincides. Mathematically, any profit is possible. Generally nonsensical, possibly due to a missing constraint. Fix and solve again.
15
15 Graphing Linear Programs Using Spreadsheets The Redwood Furniture Company Maximize P = 6X T + 8X C (objective) Subject to 30X T + 20X C < 300 (wood) 5X T + 10X C < 110 (labor) where X T, X C > 0
16
16 First Step The Formulas The first step is to solve the objective function and each constraint for one of the variables. In this case, solving for X C gives X C = (P - 6X T )/8 (objective) X C = (300 - 30X T )/20 (wood) X C = (110 - 5X T )/10 (labor) These formulas are entered on the following spreadsheet.
17
17 Second Step The Spreadsheet (Figure 8-18) For example, Cell B9: X C = ($B$4 - 30X T )/20 = ($B$4-30*A9)/20 Cell B10: X C = ($B$5 - 5X T )/10 = ($B$5-5*A9)/10 Cell B11: X C = ($B$3 - 30X T )/20 = ($B$3-30*A9)/20
18
18 Third Step Graphing with the Chart Wizard Highlight cells B8:D19 and click on the chart icon. Step 1 - Chart Type Step 2 - Chart Source Data Step 3 - Chart Options Step 4 - Chart Location
19
19 Chart Wizard Chart Type Select Line as the Chart type and pick the first Chart sub- type (Line) and click Next.
20
20 Chart Wizard Sources of Data, Series Tab Enter the horizontal axis values by clicking on the Series tab and entering the range of numbers to be on the horizontal axis, cells A:9:A19, in the Category (X) axis labels line. Alternately, click in the Category (X) axis labels line and then highlight cells A9:A19. Click Next.
21
21 Chart Wizard Chart Options In the Chart title line type Redwood Furniture Company, in the Category (X) axis put Tables, T, and in the Value (Y) axis line write Chairs, C. Click Next.
22
22 Chart Wizard Chart Location Click on Finish and the Chart shown next appears.
23
23 Step Four The Final Graph (Figure 8-19) The final graph (after making formatting changes).
24
24 The Graph with P = 96 (Figure 8-20) Increasing the number in cell B3 moves the objective function line up and to the right. This graph show the objective function for P = 96.
25
25 The Graph with P = 96 and 80 Hours of Labor (Figure 8-21) To see what happens when the amount of wood or labor vary, change the numbers in cells B4 (for wood) or B5 (for labor) and the corresponding line will move. This graph show the result when 80 is entered in cell B5 (and P = 96).
26
26 Drawing Horizontal and Vertical Lines Drawing two types of lines with Excel require special attention: horizontal and vertical lines. The constraint Y = 3 is a horizontal line and the constraint X = 7 is a vertical line. Figure 9-21 shows what an Excel spreadsheet looks like for these two constraints.
27
27 Spreadsheet for Horizontal and Vertical Lines (Figure 8-22) Vertical Line Equation: Y = 100,000 – (100,000/7)X The vertical line equation has an Y- intercept of 100,000 and a slope of - (100,000/7). Thus, it is not exactly vertical but it is sufficiently close to vertical for our purposes.
28
28 Graphing Horizonal and Vertical Lines (Figure 8-23) To change the position of the vertical line, change the 7 in the denominator of all the formulas in column C to the desired number.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.