Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 9 If one would take statistics about which mathematical problem is using most of the computer time in the world (not including data base handling.

Similar presentations


Presentation on theme: "1 Chapter 9 If one would take statistics about which mathematical problem is using most of the computer time in the world (not including data base handling."— Presentation transcript:

1 1 Chapter 9 If one would take statistics about which mathematical problem is using most of the computer time in the world (not including data base handling problems like sorting and searching) the answer would probably be linear programming.—Laslo Lavasz Linear Programming Applications and Computer Solutions

2 2 Product-Mix Selection  Let X E, X L, X R, X S, and X M denote the number of extra-large, large, regular, small, and miniature modules to assemble. Maximize P = 58X E + 43X L + 25X R + 17X S + 28X M Subject to: 58X E + 43X L + 25X R + 17X S + 28X M < 50,000 (PC bd) 25X E + 15X L + 10X R + 5X S + 1X M < 10,000 (res. A) 52X E + 48X L + 40X R + 60X S + 75X M < 25,000 (res. B) 1.50X E +1.25X L + 1.00X R +.75X S + 1.50X M < 2,000 (assem.) X R ≥ 200 (reg. qty) X S ≥ 100 (sm. qty) 2X E < X L (mix 1) X M <.50(X E + X L + X R + X S ) (mix 2) where X E, X L, X R, X S, and X M ≥ 0  The resource constraints all take the form: amt. used < amt. avail.  The quantity constraints take form: number made ≥ minimum quantity.  The mix 1 constraint translates: at least 2 extra-large modules made for every large one.  The mix 2 constraint translates: miniatures cannot exceed half the total of the other sizes combined.

3 3 Product-Mix Selection  The above problem must be solved with the simplex method. That is nearly always done with computer assistance.  The constraint expressions must first be modified so that all Xs appear on the left:  2X E – X L < 0 for mix 1  –.50X E –.50X L –.50X R –.50X S + X M < 0 for mix 2  The Xs should all align vertically.

4 4 Entering Data with QuickQuant  From the QuickQuant menu, select linear programming.  That brings to screen the following.

5 5 Entering Data with QuickQuant  After supplying basic information, the variables are named.

6 6 Entering Data with QuickQuant  Then the objective coefficients are entered. That is followed by entering the constraints.

7 7 Solving the Problem with QuickQuant  After entering the data, Run is pulled down in the menu bar and Quick Solve is selected.

8 8 Product-Mix Selection Solution  QuickQuant provides the following solution.

9 9 Slack and Surplus Variables  QuickQuant automatically assigns slack and surplus variables to the constraints. S1 is the unused quantity (slack) of chips A. S5 is the surplus regular modules beyond the minimum.

10 10 Portfolio Selection  A portfolio manager wants to determine how much to invest in company bonds A, B, C, D, E, or F with respective yields 8.5, 9, 10, 9.5, 8.5 and 9%. Letting X i = the dollar amount invested in company i bonds, she wants to maximize interest income. Her objective is to Maximize P =.085X A +.090X B +.100X C +.095X D +.085X E +.090X F Total available funds are $100,000, and that constraint is: X A + X B + X C + X D + X E + X F = 100,000 (funds) No bond investment can exceed $25,000. For bond A that constraint is: X A < 25,000 (limitation A) Similar but separate constraints apply to the other five bonds. At least half the funds must be placed in longer maturities (B, E, and F): X E + X L + X R ≥ 50,000 (long maturity) No more than 30% of all funds can be place in junk (C and D): X C + X D < 30,000 (junk) Non-negativity conditions apply. The optimal solution is: X A = 20,000 X B = 25,000X C = 25,000 X D = 5,000 X E = 0 X A = 25,000 P = 9,175

11 11 Transportation Problem: Shipment Scheduling  The following capacity, demand, and unit costs apply for plants and warehouses.  The linear program involves one variable for each cell in the above: X ij = quantity shipped from plant i to warehouse j i = J, S, T and j = F, N, P, Y To Warehouse From PlantFrankfurtNew YorkPhoenixYokohamaCapacity Juarez$19$ 7$ 3$21100 Seoul 15 21 18 6300 Tel Aviv 11 14 1522200 Demand150100200150600

12 12 Transportation Problem: Shipment Scheduling  The following objective applies. Minimize C =19X JF + 7X JN + 3X JP +21X JY +15X SF +21X SN +18X SP + 6X SY +11X TF +14X TN +15X TP +22X TY Subject to: X JF + X JN + X JP + X JY = 100 (Juarez Capacity) X SF +X SN + X SP + X SY = 300 (Seoul Capacity) X TF +X TN + X TP + X TY = 200 (Tel Aviv Capacity) X JF + X SF + X TF = 150 (Frankfurt Demand) X JN + X SN + X TN = 100 (New York Demand) X JP + X SP + X TP = 200 (Phoenix Demand) X JY + X SY + X TY = 150 (Yokohama Demand) where all X ij ’s > 0

13 13 Solution to Transportation Problem  The linear program was solved on the computer. The following shipment quantities apply. C = 6,250 To Warehouse From PlantFrankfurtNew YorkPhoenixYokohama Juarez001000 Seoul 500100150 Tel Aviv100 00

14 14 Budgeting Advertising Expenditures  Real Reels is deciding how many ads to place in Playboy (P), True (T), and Esquire (E). Respective costs are $10,000, $5,000, and $6,000.  The respective variables are X P, X T, and X E.  The objective is to Maximize P = 1X P +.9X T +.28X E with the coefficients are the number of exposures (millions of gear users) per ad.

15 15 Budgeting Advertising Expenditures  There is a budget maximum of $100,000. A maximum of 5 ads may be placed in True and minimum of 2 for each other magazine.  The following constraints apply: 10X P + 5X T + 6X E < 100 (budget) 1X T < 5 (True max.) 1X P > 2 (Playboy min.) 1X E > 2 (Esquire min.) all Xs > 0  Solution: X P = 6.3, X T = 5, X E = 2, P = 11.36

16 16 Assignment Problem  The following data apply for persons and jobs.  The linear program involves one variable for each cell in the above: X ij = Fraction of time person i is assigned to job j i = A, B, C and j = D, G, L Time to Complete One Job IndividualDrillingGrindingLathe Ann 5 min.10 min. Bud10515 Chuck15 10

17 17 Assignment Problem  The following objective applies. Minimize C = 5X AD + 10X AG + 10X AL +10X BD + 5X BG + 15X BL +11X CD + 14X CG + 15X CL Subject to: X AD + X AG + X AL = 1 (Ann’s Availability) X BD + X BG + X BL = 1 (Bud’s Availability) X CD + X CG + X CL = 1 (Chuck’s Availability) X AD + X BD + X CD = 1 (drill-press requirement) X AG + X BG + X CG = 1 (grinder requirement) X AL + X BL + X CL = 1 (lathe requirement) whereall X ij ’s > 0  Solution: X AD = 1 (Ann to Drilling) X BG = 1 (Bud to Grinding) X CL = 1 (Chuck to Lathe)C = 20

18 18 Liquid Blending  Chanel 2000 makes aftershave and cologne. The following data apply.  The following data apply to the raw materials.  Let X ij = Volume (liters) of ingredient i used in blending product j with i = O, R, S and j = A, C Product Agents (%) Selling Price Order Quantity EmulsionEvaporatives Aftershave--20$101,500 Cologne30-- 20 500 Ingredient Agents (%) CostAvailable EmulsionEvaporatives Oil 50 0$ 22,000 Rinse10025 30 500 Stabilizer 1050 41,000

19 19 Liquid Blending  Revenue = 10(X OA + X RA + X SA ) + 20(X OC + X RC + X SC ) Cost = 2(X OA + X OC ) + 30(X RA + X RC ) + 4(X SA + X SC ) Using Profit = Revenue – Cost, collecting terms, the objective is to Maximize P = 8X OA  20X RA + 6X SA + 18X OC  10X RC + 16X SC  There are three constraints for resource availabilities: X OA + X OC < 2,000(available oil) X RA + X RC < 500(available rinse) X SA + X SC <1,000(available stabilizer)  There are two constraints for product quantity requirements: X OA + X RA + X SA > 1,500(aftershave volume) X OC + X RC + X SC > 500(cologne volume)  There are two proportional ingredient requirements:.50X OC + 1.00X RC +.10X SC >.30(X OC + X RC + X SC )(emulsions in cologne).25X RA +.50X SA >.20(X OA + X RA + X SA ) (evaps. in aftershave) These simplify to:.20X OC +.70X RC .20X SC > 0(emulsions in cologne) .20X OA +.05X RA +.30X SA > 0(evaporatives in aftershave)  Solution:X OA = 500 X RA = 0 X SA = 1,000 X OC = 1,500 X RC = 0 X SC = 0 P = 37,000

20 20 Solving Linear Programs with a Spreadsheet Step 1: Write out the formulation table. Step 2: Put the formulation table into a spreadsheet. Step 3: Use Excel’s Solver to obtain a solution.

21 21 Step 1: The Formulation Table (Figure 9-1) The formulation table arranges the problem in a tabular format, as shown below for the Microcircuit Production Plan.

22 22 Step 2: The Excel Spreadsheet (Figure 9-2) The numbers in the Excel spreadsheet come from the formulation table.

23 23 Step 3: Expanded Spreadsheet (Figure 9-3) The expanded spreadsheet contains the formulas necessary to use Solver. Put =SUMPRODUCT(B4:F4,$B$15:$F$15) in cell J4 and copy it down to cell J12. Cell J4 gives the value of the objective function. The solution is found here (the values of the decision variables).

24 24 Using Excel’s Solver to Solve Linear Programs Click on Tools on the menu bar, select the Solver option, and the Solver Parameters dialog box shown next appears.

25 25 Solver Parameters Dialog Box (Figure 9-5) 1. Enter the value of the objective function, J4, in the Target Cell line, either with or without the $ sign. 2. The Target Cell is to be maximized so click on Max in the Equal To line. 3. Enter the decision variables in the By Changing Cells line, B15:F15. 4. The constraints are entered in the Subject to Constraints box by using the Add Constraints dialog box shown next (obtained by clicking on the Add button). If a constraint needs to be changed, click on the Change button. The Change and Add Constraint dialog box function in the same manner. NOTE: Normally all these entries appear in the Solver Parameter dialog box so you only need to click on the Solve button. However, you should always check to make sure the entries are correct for the problem you are solving.

26 26 The Add Constraint Dialog Box (Figure 9-6) To represent the constraints in rows 5 - 8: 1. Enter J5:J8 (or $J$5:$J$8) in the Cell Reference line. This is the total amount of these resources used. To represent the constraints in rows 5 - 8: 1. Enter J5:J8 (or $J$5:$J$8) in the Cell Reference line. This is the total amount of these resources used. 3. Enter the amounts of the resources available H5:H8 in the Constraint line (or =$H$5:$H$8). 4. Click Add and repeat Steps 1 - 3 if another constraint is to be added. If this is the last constraint, click OK. Normally, all these entries already appear. You will need to use this dialog box only if you need to add a constraint. If you need to change a constraint, the Change Constraint dialog box functions just like this one. 2. Enter <= as the sign because the resources used must be equal to or less than the amounts available, given next in Step 3. If another sign is needed, see the next slide.

27 27 Dialog Box for Constraint Signs (Figure 9-7) To enter different signs, click on the down arrow and three possibilities are displayed: =,

28 28 The Solver Options Dialog Box (Figure 9-8) Click on the Options button in the Solver Parameters dialog box to check the Solver Options dialog box to ensure that the Assume Linear Model and Assume Non-Negative boxes are checked.

29 29 Solver Results Dialog Box (Figure 9-9) Be sure to check the message in the Solver Results dialog box. In this case it indicates that a solution has been found. What happens when Solver does not find a solution will be discussed latter. Click OK and the spreadsheet with the solution, shown next, is obtained.

30 30 Spreadsheet with Optimal Solution (Figure 9-10) 2. Enter the data: the coefficients of the objective function in cells B4:F4, the right-hand sides in cells H5:H12, and the exchange coefficients in cells B5:F12. 3. To find the solution, click on Tools and Solver to obtain the Solver Parameters dialog box and then click the Solve button. 4. For bigger problems insert additional rows or columns. Insert them in the middle of the table and not at the beginning or the end. Copy the formulas in column J to any new cells created by inserting rows. Check to make sure the ranges of the formulas and signs in the Solver Parameters dialog box are correct. 1. To solve other problems:

31 31 Solver’s Answer Report Solver’s Answer Report gives the values of the: objective function decision variables slack variables

32 32 Solver’s Answer Report To get Solver’s Answer Report, highlight Answer Report in the Report box of the Solver Results dialog box before clicking the OK button.

33 33 Answer Report for Microcircuit Production Plan (Figure 9-11) Objective function Decision variables Slack variables Note: Not binding means the slack variable is positive, binding means it is zero.

34 34 Bond Portfolio Selection (page 319)

35 35 Real Reels (page 323)

36 36 Scent Mixing (page 328)

37 37 Yosemite Ann


Download ppt "1 Chapter 9 If one would take statistics about which mathematical problem is using most of the computer time in the world (not including data base handling."

Similar presentations


Ads by Google