Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-1 Nonlinear Programming & Evolutionary Optimization.

Similar presentations


Presentation on theme: "Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-1 Nonlinear Programming & Evolutionary Optimization."— Presentation transcript:

1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-1 Nonlinear Programming & Evolutionary Optimization Chapter 8

2 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-2 Introduction to Nonlinear Programming (NLP) u An NLP problem has a nonlinear objective function and/or one or more nonlinear constraints. u NLP problems are formulated and implemented in virtually the same way as linear problems. u The mathematics involved in solving NLPs is quite different than for LPs. u Solver tends to mask this difference but it is important to understand the difficulties that may be encountered when solving NLPs.

3 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-3 Possible Optimal Solutions to NLPs (not occurring at corner points) objective function level curve optimal solution Feasible Region linear objective, nonlinear constraints objective function level curve optimal solution Feasible Region nonlinear objective, nonlinear constraints objective function level curve optimal solution Feasible Region nonlinear objective, linear constraints objective function level curves optimal solution Feasible Region nonlinear objective, linear constraints

4 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-4 The GRG Algorithm u Solver uses the Generalized Reduced Gradient (GRG) algorithm to solve NLPs. u GRG can also be used on LPs but is slower than the Simplex method. u The following discussion gives a general (but somewhat imprecise) idea of how GRG works.

5 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-5 An NLP Solution Strategy Feasible Region A (the starting point) B C D E objective function level curves X1X1 X2X2

6 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-6 Local vs. Global Optimal Solutions A C B Local optimal solution Feasible Region D E F G Local and global optimal solution X1X1 X2X2

7 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-7 Comments About NLP Algorithms u It is not always best to move in the direction producing the fastest rate of improvement in the objective. u NLP algorithms can terminate a local optimal solutions. u The starting point influences the local optimal solution obtained.

8 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-8 Comments About Starting Points u The null starting point should be avoided. u When possible, it is best to use starting values of approximately the same magnitude as the expected optimal values.

9 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-9 A Note About “Optimal” Solutions u When solving a NLP problem, Solver normally stops when the first of three numerical tests is satisfied, causing one of the following three completion messages to appear: 1) “Solver found a solution. All constraints and optimality conditions are satisfied.” This means Solver found a local optimal solution, but does not guarantee that the solution is the global optimal solution. Unless you know that a problem has only one local optimal solution (which must also be the global optimal), you should run Solver from several different starting points to increase the chances that you find the global optimal solution to your problem. 2) “Solver has converged to the current solution. All constraints are satisfied.” This means the objective function value changed very slowly for the last few iterations. If you suspect the solution is not a local optimal, your problem may be poorly scaled. In Excel 8.0, the convergence option in the Solver Options dialog box can be reduced to avoid convergence at suboptimal solutions. 3) “Solver cannot improve the current solution. All constraints are satisfied.” This rare message means the your model is degenerate and the Solver is cycling. Degeneracy can often be eliminated by removing redundant constraints in a model.

10 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 5 Steps In Formulating MP Models: 1. Understand the problem. 2. Identify the decision variables. X 1 = number of … X 2 = number of … 3.State the objective function as a combination of the decision variables. MAX: …

11 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 5 Steps In Formulating MP Models (continued) 4. State the constraints as combinations of the decision variables. … 5. Identify any upper or lower bounds on the decision variables. …

12 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. The Steps in Implementing a MP Model in a Spreadsheet 1.Organize the data for the model on the spreadsheet. 2.Reserve separate cells in the spreadsheet to represent each decision variable in the model. 3.Create a formula in a cell in the spreadsheet that corresponds to the objective function. 4.For each constraint, create a formula in a separate cell in the spreadsheet that corresponds to the left- hand side (LHS) of the constraint.

13 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. How Solver Views the Model u Target cell - the cell in the spreadsheet that represents the objective function u Changing cells - the cells in the spreadsheet representing the decision variables u Constraint cells - the cells in the spreadsheet representing the LHS formulas on the constraints

14 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-14 The Economic Order Quantity (EOQ) Problem u Involves determining the optimal quantity to purchase when orders are placed. u Small orders result in: –low inventory levels & carrying costs –frequent orders & higher ordering costs u Large orders result in: –higher inventory levels & carrying costs –infrequent orders & lower ordering costs

15 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-15 Sample Inventory Profiles

16 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-16 The EOQ Model Assumes: –Demand (or use) is constant over the year –New orders are received in full when the inventory level drops to zero. where: D = annual demand for the item C = unit purchase cost for the item S = fixed cost of placing an order i = cost of holding inventory for a year (expressed as a % of C) Q = order quantity

17 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-17 EOQ Cost Relationships 01020304050 0 200 400 600 800 1000 $ Order Quantity Total Cost Carrying Cost Ordering Cost EOQ

18 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-18 An EOQ Example: Ordering Paper For MetroBank u Alan Wang purchases paper for copy machines and laser printers at MetroBank. –Annual demand (D) is for 24,000 boxes –Each box costs $35 (C) –Each order costs $50 (S) –Inventory carrying costs are 18% ( i ) u What is the optimal order quantity (Q)?

19 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-19 The Model (Note the nonlinear objective!)

20 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-20 Implementing the Model See file Fig8-6.xls

21 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-21 Comments on the EOQ Model u Using calculus, it can be shown that the optimal value of Q is: u Numerous variations on the basic EOQ model exist accounting for: –quantity discounts –storage restrictions –backlogging –etc

22 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-22 Location Problems u Many decision problems involve determining optimal locations for facilities or service centers. For example, –Manufacturing plants –Warehouse –Fire stations –Ambulance centers u These problems usually involve distance measures in the objective and/or constraints.  The straight line (Euclidean) distance between two points ( X 1, Y 1 ) and (X 2, Y 2 ) is:

23 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-23 A Location Problem: Rappaport Communications u Rappaport Communications provides cellular phone service in several mid-western states. u The want to expand to provide inter-city service between four cities in northern Ohio. u A new communications tower must be built to handle these inter-city calls. u The tower will have a 40 mile transmission radius.

24 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-24 Graph of the Tower Location Problem Cleveland Akron Youngstown Canton x=5, y=45 x=12, y=21 x=17, y=5 x=52, y=21 0 20 30 40 5060 10 20 30 40 50 X Y 0 10

25 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-25 Defining the Decision Variables X 1 = location of the new tower with respect to the X-axis Y 1 = location of the new tower with respect to the Y-axis

26 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-26 Defining the Objective Function u Minimize the total distance from the new tower to the existing towers MIN:

27 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-27 Defining the Constraints u Cleveland u Akron u Canton u Youngstown

28 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-28 Implementing the Model See file Fig8-10.xls

29 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-29 Analyzing the Solution u The optimal location of the “new tower” is in virtually the same location as the existing Akron tower. u Maybe they should just upgrade the Akron tower. u The maximum distance is 39.8 miles to Youngstown. u This is pressing the 40 mile transmission radius. u Where should we locate the new tower if we want the maximum distance to the existing towers to be minimized?

30 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-30 Implementing the Model See file Fig8-13.xls

31 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-31 Comments on Location Problems u The optimal solution to a location problem may not work: –The land may not be for sale. –The land may not be zoned properly. –The “land” may be a lake. u In such cases, the optimal solution is a good starting point in the search for suitable property. u Constraints may be added to location problems to eliminate infeasible areas from consideration.

32 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-32 A Nonlinear Network Flow Problem: The SafetyTrans Company u SafetyTrans specialized in trucking extremely valuable and extremely hazardous materials. u It is imperative for the company to avoid accidents: –It protects their reputation. –It keeps insurance premiums down. –The potential environmental consequences of an accident are disastrous. u The company maintains a database of highway accident data which it uses to determine safest routes. u They currently need to determine the safest route between Los Angeles, CA and Amarillo, TX.

33 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-33 Network for the SafetyTrans Problem Las Vegas 2 Los Angeles 1 San Diego 3 Phoenix 4 Flagstaff 6 Tucson 5 Albu- querque 8 Las Cruces 7 Lubbock 9 Amarillo 10 0.003 0.004 0.002 0.010 0.002 0.010 0.006 0.002 0.009 0.003 0.010 0.001 0.004 0.005 0.003 0.006 Numbers on arcs represent the probability of an accident occurring +1

34 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-34 Defining the Decision Variables

35 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-35 Defining the Objective Select the safest route by maximizing the probability of not having an accident, MAX: (1-P 12 Y 12 )(1-P 13 Y 13 )(1-P 14 Y 14 )(1-P 24 Y 24 )…(1-P 9,10 Y 9,10 ) where: P ij = probability of having an accident while traveling between node i and node j

36 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-36 Defining the Constraints u Flow Constraints -Y 12 -Y 13 -Y 14 = -1 } node 1 +Y 12 -Y 24 -Y 26 = 0 } node 2 +Y 13 -Y 34 -Y 35 = 0 } node 3 +Y 14 +Y 24 +Y 34 -Y 45 -Y 46 -Y 48 = 0} node 4 +Y 35 +Y 45 -Y 57 = 0 } node 5 +Y 26 +Y 46 -Y 67 -Y 68 = 0 } node 6 +Y 57 +Y 67 -Y 78 -Y 79 -Y 7,10 = 0 } node 7 +Y 48 +Y 68 +Y 78 -Y 8,10 = 0 } node 8 +Y 79 -Y 9,10 = 0 } node 9 +Y 7,10 +Y 8,10 +Y 9,10 = 1 } node 10

37 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-37 Implementing the Model See file Fig8-15.xls

38 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-38 Comments on Nonlinear Network Flow Problems u Small differences in probabilities can mean large differences in expected values: (1 - 0.9900) * $30,000,000 = $300,000 (1 - 0.9626) * $30,000,000 = $1,122,000 u This type of problem is also useful in reliability network problems (e.g., finding the weakest “link” (or path) in a production system or telecommunications network).

39 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-39 A Project Selection Problem: The TMC Corporation u TMC needs to allocate $1.7 million of R&D budget and up to 25 engineers among 6 projects.  The probability of success for each project depends on the number of engineers assigned ( X i ) and is defined as: P i = X i /(X i +  i ) Project123456 Startup Costs$325$200$490$125$710$240 NPV if successful$750$120$900$400$1,110$800 Probability Parameter  i 3.12.54.55.68.28.5 (all monetary values are in $1,000s)

40 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-40 Selected Probability Functions 0.0000 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000 012345678910111213141516171819202122232425 Engineers Assigned Prob. of Success Project 2 -  = 2.5 Project 4 -  = 5.6 Project 6 -  = 8.5

41 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-41 Defining the Decision Variables X i = the number of engineers assigned to project i, i = 1, 2, 3, …, 6

42 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-42 Defining the Objective Maximize the expected total NPV of selected projects

43 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-43 Defining the Constraints u Startup Funds 325Y 1 + 200Y 2 + 490Y 3 + 125Y 4 + 710Y 5 + 240Y 6 <=1700 u Engineers X 1 + X 2 + X 3 + X 4 + X 5 + X 6 <= 25 u Linking Constraints X i - 25Y i <= 0, i= 1, 2, 3, … 6 u Note: The following constraint could be used in place of the last two constraints... X 1 Y 1 + X 2 Y 2 + X 3 Y 3 + X 4 Y 4 + X 5 Y 5 + X 6 Y 6 <= 25 However, this constraint is nonlinear. It is generally better to keep things linear where possible.

44 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-44 Implementing the Model See file Fig8-19.xls

45 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-45 Optimizing Existing Financial Models u It is not necessary to always write out the algebraic formulation of an optimization problem, although doing so ensures a thorough understanding of the problem. u Solver can be used to optimize a host of pre- existing spreadsheet models which are inherently nonlinear.

46 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-46 Finished with Chapter 8


Download ppt "Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 8-1 Nonlinear Programming & Evolutionary Optimization."

Similar presentations


Ads by Google