Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Programming Applications and Computer Solutions

Similar presentations


Presentation on theme: "Linear Programming Applications and Computer Solutions"— Presentation transcript:

1 Linear Programming Applications and Computer Solutions
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 Product-Mix Selection
Let XE, XL, XR, XS, and XM denote the number of extra-large, large, regular, small, and miniature modules to assemble. Maximize P = 58XE XL XR + 17XS XM Subject to: 58XE XL XR + 17XS XM < 50, (PC bd) 25XE XL XR + 5XS XM < 10,000 (res. A) 52XE XL XR + 60XS XM < 25,000 (res. B) 1.50XE +1.25XL XR +.75XS XM < 2,000 (assem.) XR ≥ (reg. qty) XS ≥ (sm. qty) 2XE < XL (mix 1) XM < .50(XE + XL + XR + XS) (mix 2) where XE, XL, XR, XS, and XM ≥ 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. The text lists examples of the listed applications.

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: 2XE – XL < 0 for mix 1 –.50XE –.50XL –.50XR –.50XS + XM < 0 for mix 2 The Xs should all align vertically. The text lists examples of the listed applications.

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

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

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

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

8 Product-Mix Selection Solution
QuickQuant provides the following solution. The text lists examples of the listed applications.

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. The text lists examples of the listed applications.

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 Xi = the dollar amount invested in company i bonds, she wants to maximize interest income. Her objective is to Maximize P = .085XA XB XC XD XE XF Total available funds are $100,000, and that constraint is: XA + XB + XC + XD + XE + XF = 100, (funds) No bond investment can exceed $25,000. For bond A that constraint is: XA < 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): XE + XL + XR ≥ 50,000 (long maturity) No more than 30% of all funds can be place in junk (C and D): XC + XD < 30, (junk) Non-negativity conditions apply. The optimal solution is: XA = 20,000 XB = 25,000 XC = 25,000 XD = 5,000 XE = 0 XA = 25,000 P = 9,175 The text lists examples of the listed applications.

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: Xij = quantity shipped from plant i to warehouse j i = J, S, T and j = F, N, P, Y To Warehouse From Plant Frankfurt New York Phoenix Yokohama Capacity Juarez $19 $ 7 $ 3 $21 100 Seoul 15 21 18 6 300 Tel Aviv 11 14 22 200 Demand 150 600

12 Transportation Problem: Shipment Scheduling
The following objective applies. Minimize C = 19XJF + 7XJN + 3XJP +21XJY + 15XSF +21XSN +18XSP + 6XSY + 11XTF +14XTN +15XTP +22XTY Subject to: XJF + XJN + XJP + XJY = (Juarez Capacity) XSF +XSN + XSP + XSY = (Seoul Capacity) XTF +XTN + XTP + XTY = (Tel Aviv Capacity) XJF + XSF + XTF = (Frankfurt Demand) XJN + XSN + XTN = (New York Demand) XJP + XSP + XTP = (Phoenix Demand) XJY + XSY + XTY = (Yokohama Demand) where all Xij’s > 0

13 Solution to Transportation Problem
The linear program was solved on the computer. The following shipment quantities apply. C = 6,250 To Warehouse From Plant Frankfurt New York Phoenix Yokohama Juarez 100 Seoul 50 150 Tel Aviv

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 XP, XT, and XE. The objective is to Maximize P = 1XP + .9XT + .28XE with the coefficients are the number of exposures (millions of gear users) per ad.

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: 10XP + 5XT + 6XE < (budget) 1XT < (True max.) 1XP > (Playboy min.) 1XE > (Esquire min.) all Xs > 0 Solution: XP = 6.3, XT = 5, XE = 2, P = 11.36

16 Time to Complete One Job
Assignment Problem The following data apply for persons and jobs. The linear program involves one variable for each cell in the above: Xij = Fraction of time person i is assigned to job j i = A, B, C and j = D, G, L Time to Complete One Job Individual Drilling Grinding Lathe Ann 5 min. 10 min. Bud 10 5 15 Chuck

17 Assignment Problem The following objective applies.
Minimize C = 5XAD + 10XAG + 10XAL + 10XBD + 5XBG + 15XBL + 11XCD + 14XCG + 15XCL Subject to: XAD + XAG + XAL = 1 (Ann’s Availability) XBD + XBG + XBL = 1 (Bud’s Availability) XCD + XCG + XCL = 1 (Chuck’s Availability) XAD + XBD + XCD = 1 (drill-press requirement) XAG + XBG + XCG = 1 (grinder requirement) XAL + XBL + XCL = 1 (lathe requirement) where all Xij’s > 0 Solution: XAD = 1 (Ann to Drilling) XBG = 1 (Bud to Grinding) XCL = 1 (Chuck to Lathe) C = 20

18 Liquid Blending Chanel 2000 makes aftershave and cologne. The following data apply. The following data apply to the raw materials. Let Xij = 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 Emulsion Evaporatives Aftershave -- 20 $10 1,500 Cologne 30 500 Ingredient Agents (%) Cost Available Emulsion Evaporatives Oil 50 $ 2 2,000 Rinse 100 25 30 500 Stabilizer 10 4 1,000

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

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 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 Step 2: The Excel Spreadsheet (Figure 9-2)
The numbers in the Excel spreadsheet come from the formulation table.

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 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 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. Solver Parameters Dialog Box (Figure 9-5) 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. 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.

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. Normally, all these entries already appear. You will need to use this dialog box only if you need to add a constraint. 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 if another constraint is to be added. If this is the last constraint, click OK. 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. If you need to change a constraint, the Change Constraint dialog box functions just like this one.

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

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 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 Spreadsheet with Optimal Solution (Figure 9-10)
1. To solve other problems: 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.

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

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 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 Bond Portfolio Selection (page 319)

35 Real Reels (page 323)

36 Scent Mixing (page 328)

37 Yosemite Ann


Download ppt "Linear Programming Applications and Computer Solutions"

Similar presentations


Ads by Google