Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. Optimization problems using excel solver.

Similar presentations


Presentation on theme: "McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. Optimization problems using excel solver."— Presentation transcript:

1 McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. Optimization problems using excel solver

2 LAB 3 Linear Programming Using the Excel Solver

3 Linear Programming Basics A Maximization Problem A Minimization Problem OBJECTIVES 2A-3

4 Linear Programming Essential Conditions Is used in problems where we have limited resources or constrained resources that we wish to allocate The model must have an explicit objective (function) –Generally maximizing profit or minimizing costs subject to resource- based, or other, constraints 2A-4

5 Linear Programming Essential Conditions (Continued) Limited Resources to allocate Linearity is a requirement of the model in both objective function and constraints Homogeneity of products produced (i.e., products must the identical) and all hours of labor used are assumed equally productive Divisibility assumes products and resources divisible (i.e., permit fractional values if need be) 2A-5

6 Common Applications Aggregate sales and operations planning Service/manufacturing productivity analysis Product planning Product routing Vehicle/crew scheduling Process control Inventory control 2A-6

7 Objective Function C j is a constant that describes the rate of contribution to costs or profit of (X j ) units being produced Z is the total cost or profit from the given number of units being produced Maximize (or Minimize) Z = C 1 X 1 + C 2 X C n X n 2A-7

8 Constraints A ij are resource requirements for each of the related (X j ) decision variables B i are the available resource requirements Note that the direction of the inequalities can be all or a combination of , , or = linear mathematical expressions A 11 X 1 + A 12 X A 1n X n  B 1 A 21 X 1 + A 22 X A 2n X n  B 2 : A M1 X 1 + A M2 X A Mn X n = B M A 11 X 1 + A 12 X A 1n X n  B 1 A 21 X 1 + A 22 X A 2n X n  B 2 : A M1 X 1 + A M2 X A Mn X n = B M 2A-8

9 Non-Negativity Requirement All linear programming model formulations require their decision variables to be non-negative While these non-negativity requirements take the form of a constraint, they are considered a mathematical requirement to complete the formulation of an LP model X 1,X 2, …, X n  0 2A-9

10 Excel solver 2A-10 The Excel Solver is a tool for solving linear and nonlinear optimization problems. –For linear optimization problems: Simplex method, with branch and bound algorithm for integer design variables. –For nonlinear optimization problems: Generalized reduced gradient method. Solver is an Add-In for Microsoft Excel which can solve optimization problems, including multiple constraint problems. Launching the Excel Solver: Start the Excel program. Tools > Solver…

11 Installing Excel solver 2A-11 On Excel Menu, choose –Tools Add-Ins... –Put a Check in the Box Next to ‘Solver Add-in’

12 Using Excel solver 2A-12 On Excel Menu, choose –Tools Solver –This brings up the Solver Parameters box which will be discussed next.

13 Excel solver 2A-13

14 Excel solver 2A-14

15 An Example of a Maximization Problem LawnGrow Manufacturing Company must determine the unit mix of its commercial riding mower products to be produced next year. The company produces two product lines, the Max and the Multimax. The average profit is $400 for each Max and $800 for each Multimax. Fabrication hours and assembly hours are limited resources. There is a maximum of 5,000 hours of fabrication capacity available per month (each Max requires 3 hours and each Multimax requires 5 hours). There is a maximum of 3,000 hours of assembly capacity available per month (each Max requires 1 hour and each Multimax requires 4 hours). Question: How many units of each riding mower should be produced each month in order to maximize profit? Now let’s formula this problem as an LP model… 2A-15

16 The Objective Function If we define the Max and Multimax products as the two decision variables X 1 and X 2, and since we want to maximize profit, we can state the objective function as follows: 2A-16

17 Constraints Given the resource information below from the problem: We can now state the constraints and non-negativity requirements as: Note that the inequalities are less-than-or-equal since the time resources represent the total available resources for production 2A-17

18 Solution Produce 715 Max and 571 Multimax per month for a profit of $742,800 Produce 715 Max and 571 Multimax per month for a profit of $742,800 2A-18

19 The Excel Solver Formulation 2A-19

20 An Example of a Minimization Problem HiTech Metal Company is developing a plan for buying scrap metal for its operations. HiTech receives scrap metal from two sources, Hasbeen Industries and Gentro Scrap in daily shipments using large trucks. Each truckload of scrap from Hasbeen yields 1.5 tons of zinc and 1 ton of lead at a cost of $15,000. Each truckload of scrap from Gentro yields 1 ton of zinc and 3 tons of lead at a cost of $18,000. HiTech requires at least 6 tons of zinc and at least 10 tons of lead per day. Question: How many truckloads of scrap should be purchased per day from each source in order to minimize scrap metal costs to HiTech? Now let’s formula this problem as an LP model… 2A-20

21 The Objective Function Minimize Z = 15,000 X ,000 X 2 Where Z = daily scrap cost X 1 = truckloads from Hasbeen X 2 = truckloads from Gentro Minimize Z = 15,000 X ,000 X 2 Where Z = daily scrap cost X 1 = truckloads from Hasbeen X 2 = truckloads from Gentro Hasbeen Gentro If we define the Has been truckloads and the Gentro truckloads as the two decision variables X 1 and X 2, and since we want to minimize cost, we can state the objective function as follows: 2A-21

22 Constraints 1.5X 1 + X 2 > 6(Zinc/tons) X 1 + 3X 2 > 10(Lead/tons) X 1, X 2 > 0 (Non-negativity) 1.5X 1 + X 2 > 6(Zinc/tons) X 1 + 3X 2 > 10(Lead/tons) X 1, X 2 > 0 (Non-negativity) Given the demand information below from the problem: We can now state the constraints and non-negativity requirements as: Note that the inequalities are greater-than-or- equal since the demand information represents the minimum necessary for production. 2A-22

23 Solution Order 2.29 truckloads from Hasbeen and 2.57 truckloads from Gentro for daily delivery. The daily cost will be $80,610. Order 2.29 truckloads from Hasbeen and 2.57 truckloads from Gentro for daily delivery. The daily cost will be $80,610. Note: Do you see why in this solution that “integer” linear programming methodologies can have useful applications in industry? Note: Do you see why in this solution that “integer” linear programming methodologies can have useful applications in industry? 2A-23

24 The Excel Solver solution 2A-24

25 Question 2A-25 Find x 1, x 2, x 3, x 4, y 1, y 2, y 3, y 4 to maximize f = 10x x 2 + 6x 3 + 5x 4  2y y 2 + 5y 3 + 4y 4 subject to x 1 + y 1 = 25 x 2 + y 2 = 45 x 3 + y 3 = 50 x 4 + y 4 = 60 x 1 + x 2 + x 3 + x 4  50 y 1 + y 2 + y 3 + y 4  1000 x 1, x 2, x 3, x 4, y 1, y 2, y 3, y 4  0.

26 Answer 2A-26 Using the Excel Solver: Design variables: A1 = x 1, A2 = x 2, A3 = x 3, A4 = x 4 B1 = y 1, B2 = y 2, B3 = y 3, B4 = y 4 Objective function: C1 = 10*A1+6.5*A2+6*A3+5*A4  2*B1+5.5*B2+5*B3 +4*B4 Constraints: D1 = A1+B1, D2 = A2+B2, D3 = A3+B3, D4 = A4+B4 D5 = A1+A2+A3+A4, D6 = B1+B2+B3+B4

27 Answer 2A-27 (…continued) Set Target Cell: C1 Equal To: Max By Changing Cells: A1 to B4 Subject to the Constraints: Add D1 = 25Add D2 = 45Add D3 = 50Add D4 = 60Add D5 <= 50Add D6 <= 1000OK Options > Assume Non-Negative > OK Solve Keep Solver Solution > OK

28 Answer 2A-28 (…continued) Solutions in A1 to A4 and B1 to B4: (x 1, x 2, x 3, x 4 ) = (25, 0, 10, 15) (y 1, y 2, y 3, y 4 ) = (0, 45, 40, 45) Maximum profit in C1 = Note that the solution is not unique. Verify that another solution is given by (x 1, x 2, x 3, x 4 ) = (25, 0, 0, 25) (y 1, y 2, y 3, y 4 ) = (0, 45, 50, 35)

29 End 2A-29


Download ppt "McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. Optimization problems using excel solver."

Similar presentations


Ads by Google