Download presentation
Presentation is loading. Please wait.
1
Introduction to Management Science
Issue 8. Non-linear programming Introduction to Management Science
2
Table of Contents Chapter 10 (Nonlinear Programming)
The Challenges of Nonlinear Programming NLP with Decreasing Marginal Returns: Wyndor NLP with Decreasing Marginal Returns: Portfolio Selection Separable Programming Difficult Nonlinear Programming Problems Evolutionary Solver and Genetic Algorithms Nonlinear and Separable Programming Evolutionary Solver Issue 8. Non-linear programming Introduction to Management Science
3
Recall - Optimization problems
In an optimization problem, we seek to minimize or maximize a specific quantity (the objective), which depends on a finite number of input variables. These variables may be independent of one another, or They may be related through one or more constraints. Example: minimize: z = x12 + x22 subject to: x1 – x2 = 3 x2 ≥ 3 Issue 8. Non-linear programming Introduction to Management Science
4
A mathematical program
A mathematical program is an optimization problem in which the objective and constraints are given as mathematical functions and functional relationships. optimize: z = f(x1, x2, x3, …, xn) subject to: g1(x1, x2, x3, …, xn) g2(x1, x2, x3, …, xn) g3(x1, x2, x3, …, xn) …. gm(x1, x2, x3, …, xn) b1 b2 b3 … bm = An unconstrained program is one where each function gi is chosen as zero and each constant bi is chosen as zero. Issue 8. Non-linear programming Introduction to Management Science
5
Introduction to Management Science
Linear programs A mathematical program is linear if f(x1, x2, x3, …, xn) and each gi(x1, x2, x3, …, xn), i = (1, 2, …, m) are linear in each of their arguments: f(x1, x2, …, xn) = c1x1 + c2x2 + … + cnxn and gi(x1, x2, …, xn) = ai1x1 + ai2x2 + … + ainxn Where cj and aij (i = 1, 2, …, m; j = 1, 2, …, n) are known constants. Any other mathematical program is non-linear. Issue 8. Non-linear programming Introduction to Management Science
6
Introduction to Management Science
Integer programs An integer program is a linear program with the additional restriction that the input variables be integers. It is not necessary that the coefficients in the arguments f(x) and gi(x) and the constants bi also be integers, but they frequently may be. Issue 8. Non-linear programming Introduction to Management Science
7
Quadratic (non-linear) programs
A quadratic program is an example of a non-linear program in which each constraint is linear, but the objective function has the form: f(x1, x2, …, xn) = i→nj→ncijx1xj + i→ndixi Where cij and di are known constants. Example: minimize: z = x12 + x22 subject to: x1 – x2 = 3 x2 ≥ 3 Quadratic program with linear constraints, quadratic objective function, n = 2 variables, c11 = 1, c12 = c21 = 0, c22 = 1, and d1 = d2 = 0. Issue 8. Non-linear programming Introduction to Management Science
8
Examples of Linear and Nonlinear Formulas
SUMPRODUCT(D4:D6, C4:C6) [(D1 + D2) / D3] * C4 IF(D2 >= 2, 2*C3, 3*C4) SUMIF(D1:D6, 4, C1:C6) SUM(D4:D6) 2*C1 + 3*C4 + C6 C1 + C2 + C3 SUMPRODUCT(C4:C6, C1:C3) [(C1 + C2) / C3] * D4 IF(C2 >= 2, 2*C3, 3*C4) SUMIF(C1:C6, 4, D1:D6) ROUND(C1) MAX(C1, 0) MIN(C1, C2) ABS(C1) SQRT(C1) C1 * C2 C1 / C2 C1 ^2 Data cells are located in D1:D6 and changing cells are in C1:C6. Issue 8. Non-linear programming Introduction to Management Science
9
The Challenges of Nonlinear Programming
Nonlinear programming is used to model nonproportional relationships between activity levels and the overall measure of performance, whereas linear programming assumes a proportional relationship. Constructing the nonlinear formula(s) needed for a nonlinear programming model is considerably more difficult than developing the linear formulas used in linear programming. Solving a nonlinear programming model is often much more difficult (if it is possible at all) than solving a linear programming model. Issue 8. Non-linear programming Introduction to Management Science
10
The Challenge of Nonproportional Relationships
Proportionality Assumption of Linear Programming: The contribution of each activity to the value of the objective function is proportional to the level of the activity. In other words, the term in the objective function involving this activity consists of a coefficient times the decision variable. Nonlinear programming problems arise when any activity has a nonproportional relationship where the contribution of the activity to the measure of performance is not proportional to the level of the activity. Issue 8. Non-linear programming Introduction to Management Science
11
Profit Graphs for Wyndor Glass Co. (Proportional Relationship)
Figure Profit graphs for the Wyndor Glass Co. that show the weekly profit from each product versus the production rate for that product. Issue 8. Non-linear programming Introduction to Management Science
12
Profit Graphs with Nonproportional Relationships
Piecewise Linear with Decreasing Marginal Returns Decreasing Marginal Returns Figure Examples of profit graphs with nonproportional relationships: (a) decreasing marginal returns; (b) piecewise linear with decreasing marginal returns. Issue 8. Non-linear programming Introduction to Management Science
13
Profit Graphs with Nonproportional Relationships
Decreasing Marginal Returns Except for Discontinuities Increasing Marginal Returns Figure Examples of profit graphs with nonproportional relationships: (c) decreasing marginal returns except for discontinuities; (d) increasing marginal returns. Issue 8. Non-linear programming Introduction to Management Science
14
Constructing a Nonlinear Formula
Figure An example of an activity for which prior data are available on the profit versus the level of activity, so Excel’s curve fitting method can be applied. Issue 8. Non-linear programming Introduction to Management Science
15
Add Trendline Dialogue Box
Figure The Add Trendline dialogue box that is used to perform the curve fitting method in Excel. The “Type” tab is used to enter the form of the equation. Issue 8. Non-linear programming Introduction to Management Science
16
Introduction to Management Science
Add Trendline Options Figure The Add Trendline dialogue box that is used to perform the curve fitting method in Excel. The “Options” tab includes the option to display the equation on the chart. Issue 8. Non-linear programming Introduction to Management Science
17
The Trendline (Quadratic Equation)
Figure The quadratic equation found by Excel that most closely matches the profit versus level of activity data for the example introduced in Figure 10.4. Issue 8. Non-linear programming Introduction to Management Science
18
Solving Nonlinear Programming Models
Consider the following model in algebraic form: maximize: Profit = 0.5x5 – 6x x3 – 39x2 + 20x subject to: x ≤ 5 x ≥ 0 Issue 8. Non-linear programming Introduction to Management Science
19
Solver Solution Starting with x = 0
Figure An example of a nonlinear programming model where the Excel Solver obtains three different final solutions when it starts with three different initial solutions. Issue 8. Non-linear programming Introduction to Management Science
20
Solver Solution Starting with x = 3
Figure An example of a nonlinear programming model where the Excel Solver obtains three different final solutions when it starts with three different initial solutions. Issue 8. Non-linear programming Introduction to Management Science
21
Solver Solution Starting with x = 4.7
Figure An example of a nonlinear programming model where the Excel Solver obtains three different final solutions when it starts with three different initial solutions. Issue 8. Non-linear programming Introduction to Management Science
22
Introduction to Management Science
The Profit Graph The profit graph for the example considered in Figure 10.7. Issue 8. Non-linear programming Introduction to Management Science
23
Original Wyndor Glass Co. Spreadsheet
Issue 8. Non-linear programming Introduction to Management Science
24
Wyndor Glass with Marketing Costs
Market research indicates that Wyndor could sell small numbers of doors and windows with no advertising. However, extensive advertising would be required to sell all that could be produced. A curve-fitting procedure was used to estimate the weekly marketing costs required to sustain a production rate of D doors and W windows: Marketing cost for doors = $25D2 Marketing costs for windows = ($662/3)W2 The gross profit per door sold is about $375, and the gross profit per window is about $700. Therefore, the net profits are as follows: Net profit for doors = $375D – $25D2 Net profit for windows = $700W – ($662/3)W2 Thus, the revised objective function is maximize: Profit = $375D – 25D2 + $700W –($662/3)W2 Question: Considering the nonlinear marketing costs, how many doors and windows should Wyndor produce? Issue 8. Non-linear programming Introduction to Management Science
25
Profit Graphs for Doors and Windows
Figure The smooth curves are the profit graphs for Wyndor’s doors and windows for the version of its problem where nonlinear marketing costs must be considered. Issue 8. Non-linear programming Introduction to Management Science
26
Spreadsheet Formulation
Figure A spreadsheet model for the Wyndor nonlinear programming problem with nonlinear marketing costs, where the changing cells Units Produced (C12:D12) show the optimal production rates and the target cell Total Profit (H16) gives the resulting total profit per week. Issue 8. Non-linear programming Introduction to Management Science
27
Graphical Display of Nonlinear Formulation
Figure Graphical display of the nonlinear programming formulation of the Wyndor problem with nonlinear marketing costs. The curves are objective function curves for some sample values of Profit and the one (Profit = $2,708) that passes through the optimal solution, (D, W) = (33/14, 45/28). Issue 8. Non-linear programming Introduction to Management Science
28
Introduction to Management Science
Portfolio Selection It is now common practice for professional managers of large stock portfolios to use computer models based on nonlinear programming to guide them. Investors are concerned about both the expected return and the risk. One way of formulating their approach is as a nonlinear version of a cost-benefit trade-off problem: Minimize: Risk subject to: Expected return ≥ Minimum acceptable level Consider a portfolio with 3 stocks. Question: What is the portfolio that will minimize the risk subject to achieving at least an 18% expected return? Issue 8. Non-linear programming Introduction to Management Science
29
Risk (Standard Deviation) Joint Risk per Stock (Covariance)
Data for Stocks Stock Expected Return Risk (Standard Deviation) Pair of Stocks Joint Risk per Stock (Covariance) 1 21% 25% 1 and 2 0.040 2 30 45 1 and 3 –0.005 3 8 5 2 and 3 –0.010 Table Data for the stocks of the Portfolio Selection example. Issue 8. Non-linear programming Introduction to Management Science
30
Algebraic Formulation
minimize: Risk = (0.25S1)2+(0.45S2)2+(0.05S3)2+2(0.04)S1S2+2(–0.005)S1S3+2(–0.01)S2S3 subject to: (21%)S1 + (30%)S2 + (8%)S3 ≥ 18% S1 + S2 + S3 = 100% and S1 ≥ 0, S2 ≥ 0, S3 ≥ 0. Issue 8. Non-linear programming Introduction to Management Science
31
Portfolio selection spreadsheet model
Figure A spreadsheet model for the portfolio selection example of nonlinear programming, where the changing cells Portfolio (C14:E14) give the optimal portfolio and the target cell Variance (C21) shows the resulting risk. Issue 8. Non-linear programming Introduction to Management Science
32
Introduction to Management Science
Using Solver Table to examine trade-offs between expected return and risk Figure An application of the Solver Table that shows the trade-off between expected return and risk when the model of Figure is altered by varying the minimum acceptable expected return. Issue 8. Non-linear programming Introduction to Management Science
33
Wyndor Glass when overtime is needed
Wyndor Glass has accepted a special order for hand-crafted goods to be made in plants 1 and 2 throughout the next four months. Filling this order will require borrowing certain employees from the work crews of regular products. The remaining workers will need to work overtime to utilize the full production capacity of each plant’s machinery for the regular products. The original constraints of Hours Used ≤ Hours Available are still valid. However, the objective function will need to be modified because of the additional cost of using overtime work. In particular, because of the additional cost, the profit per unit will be reduced for those units that require overtime. Question: Considering overtime costs, how many doors and windows should Wyndor produce? Issue 8. Non-linear programming Introduction to Management Science
34
Data for Wyndor When Overtime is Needed
Maximum Weekly Production Profit per Unit Produced Product Regular Time Overtime Total Doors 3 1 4 $300 $200 Windows 6 500 100 (and 3D + 2W ≤ 18) Table Data for the original Wyndor problem when overtime is needed. Issue 8. Non-linear programming Introduction to Management Science
35
Profit Graphs for Doors and Windows
Figure Profit graphs for the Wyndor Glass Co. that show the total weekly profit from each product versus the production rate for that product when overtime is needed to exceed a production rate of three units per week. At this point, these profit graphs are based on the original estimates of marketing costs rather than the estimates of nonlinear marketing costs developed in Section 10.2. Issue 8. Non-linear programming Introduction to Management Science
36
The Separable Programming Technique
For each activity that violates the proportionality assumption, separate its profit graph into parts, with a line segment in each part. Then, instead of using a single decision variable to represent the level of each such activity, introduce a separate new decision variable for each line segment on that activity’s profit graph. Since the proportionality assumption holds for these new decision variables, formulate a linear programming model in terms of these variables. For the Wyndor problem, these new decision variables are DR = Number of doors produced per week on regular time DO = Number of doors produced per week on overtime WR = Number of windows produced per week on regular time WO = Number of windows produced per week on overtime Issue 8. Non-linear programming Introduction to Management Science
37
Separable programming spreadsheet model
Figure A spreadsheet model for the Wyndor separable programming problem when overtime is needed, where the changing cells Units Produced (C14:D15) give the optimal production rates obtained by the Solver and the target cell Total Profit (D18) shows the resulting total profit per week. This model is based on the profit graphs in Figure and so does not incorporate the nonlinear marketing costs developed in Section 10.2. Issue 8. Non-linear programming Introduction to Management Science
38
Separable Programming with smooth profit graphs
Figure The solid curve shows a profit graph for an activity whose marginal return decreases on a continuous basis. The dashed-line segments display the kind of approximation used by separable programming. Issue 8. Non-linear programming Introduction to Management Science
39
Advantages of Separable Programming
The Excel Solver can readily solve nonlinear problems that have decreasing marginal returns, with the advantage that no approximation is needed. However, the separable programming approach also has certain advantages: Converting the problem into a linear programming problem tends to make it quicker to solve, which can be very helpful for large problems. A linear programming formulation makes available Solver’s Sensitivity Report. Separable programming only requires estimating the profit from each activity at a few points. Therefore, it is not necessary to use a curve fitting method to estimate the formula for the profit graph. Issue 8. Non-linear programming Introduction to Management Science
40
Wyndor Problem with Both Overtime Costs and Nonlinear Marketing Costs
The previous spreadsheet model does not include nonlinear marketing costs. Recall that the curve-fitting procedure was used to estimate the weekly marketing costs required to sustain a production rate of D doors and W windows: Marketing cost for doors = $25D2 Marketing costs for windows = ($662/3)W2 Question: Considering both overtime costs and nonlinear marketing costs, how many doors and windows should Wyndor produce? Issue 8. Non-linear programming Introduction to Management Science
41
Data for Wyndor with Overtime Costs and Nonlinear Marketing Costs
Maximum Weekly Production Gross Unit Profit Product Regular Time Overtime Total Marketing Costs Doors 3 1 4 $375 $275 $25D2 Windows 6 700 300 662/3W2 Table Data for the Wyndor problem with both overtime costs and nonlinear marketing costs. Issue 8. Non-linear programming Introduction to Management Science
42
Weekly Profit from Producing Doors
Gross Profit Marketing Costs Profit Incremental Profit $0 — 1 375 25 350 2 750 100 650 300 3 1,125 225 900 250 4 1,400 400 1,000 Table Calculations of Wyndor’s weekly profit from producing D doors per week. Issue 8. Non-linear programming Introduction to Management Science
43
Weekly Profit from Producing Windows
Gross Profit Marketing Costs Profit Incremental Profit $0 — 1 700 662/3 6331/3 2 1,400 2662/3 1,1331/3 500 3 2,100 600 1,500 3662/3 4 2,400 1,0662/3 1,3331/3 –1662/3 5 2,700 1,6662/3 1,0331/3 –300 6 3,000 –4331/3 Table Calculations of Wyndor’s weekly profit from producing W windows per week. Issue 8. Non-linear programming Introduction to Management Science
44
Separable Programming Spreadsheet Model
Figure A spreadsheet model for the Wyndor separable programming problem when overtime is needed and nonlinear marketing costs also are incorporated into the problem. By summing the columns of the changing cells Units Produced (C17:D20), Total Produced (C21:D21) gives the optimal production rates obtained by the Solver. Due to rounding error, the target cell Total Profit (D23) shows a resulting weekly profit of $2,501 rather than the correct amount of $2,500. Issue 8. Non-linear programming Introduction to Management Science
45
Nonlinear Programming Spreadsheet Model
Figure A spreadsheet model for the Wyndor nonlinear programming problem when overtime is needed and nonlinear marketing costs also are incorporated into the problem. Total Produced (C17:D17) gives the optimal production rates obtained by the Solver and the target cell Total Profit (H20) shows the resulting weekly profit. Note that this nonlinear programming formulation gives the same results (except for the rounding error) as the separable programming formulation in Figure Issue 8. Non-linear programming Introduction to Management Science
46
Difficult Nonlinear Programming Problems
Even if a model has a nonlinear objective function, so long as the model has certain properties (e.g., linear constraints, decreasing marginal returns), the Solver can easily find an optimal solution. In some cases separable programming can be used to model a nonlinear problem in such a way that linear programming can be used. However, if a problem has increasing marginal returns, or nonlinear functions in the constraints, or disconnected profit graphs, finding a solution is often much more difficult. Such problems may have many local optima Solver can get stuck at local optima, rather than finding the global optimum One approach with such problems is to solve the problem many times, each time starting with a different initial solution. Solver Table can be used to do this process more systematically when there are only one or two variables. Issue 8. Non-linear programming Introduction to Management Science
47
Using Solver Table to try different starting points
Figure An application of the Solver Table (an Excel add-in provided in your MS Courseware) to the example considered in Figures 10.7 and 10.8. Issue 8. Non-linear programming Introduction to Management Science
48
Evolutionary Solver and Genetic Algorithms
Evolutionary Solver uses an entirely different approach than the standard Solver to search for an optimal solution for a model. The philosophy of Evolutionary Solver is based on genetics, evolution and the survival of the fittest. Hence, this type of algorithm is sometimes called a genetic algorithm. The standard Solver starts with a single solution, and then moves in directions that will improve this solution. Evolutionary Solver begins by randomly generating a whole population of solutions. After generating the population, Evolutionary Solver creates a new generation by pairing off solutions in the population to create “offspring”, combining some elements from each parent. Issue 8. Non-linear programming Introduction to Management Science
49
Evolutionary Solver and Genetic Algorithms
Among solutions in the population, some will be good (or “fit”) and some will be bad (or “unfit”), as measured by evaluating the objective function. Borrowing from the principles of evolution and survival of the fittest, the “fit” members are allowed to reproduce more frequently than the unfit members. Another key feature is mutation. Like gene mutation in biology, Evolutionary Solver will occasionally make a random change in a member of the population. This helps the algorithm get unstuck if it is getting trapped near a local optimum. Evolutionary Solver keeps creating new generations of solutions until there have been no improvements for several consecutive generations. Issue 8. Non-linear programming Introduction to Management Science
50
Selecting a portfolio to beat the market
A common goal of portfolio managers is to beat the market. If we assume that past performance is somewhat of an indicator of the future, then picking a portfolio that beat the market most often in the past might yield a portfolio that will more than likely beat the market in the future. Consider a portfolio of five large stocks traded on the New York Stock Exchange (NYSE): America Online (AOL) Boeing (BA) Ford (F) Procter & Gamble (PG) McDonald’s (MCD) Question: What mix of these five stocks will yield a portfolio that is likely to beat the market in the future? Issue 8. Non-linear programming Introduction to Management Science
51
Introduction to Management Science
Spreadsheet Model Figure A spreadsheet model (prior to using the Premium Solver dialogue box) for selecting a portfolio that beat the market most frequently in recent quarters. A starting solution has been entered in the changing cells Portfolio (D31:H31). The target cell is Number of Quarters Beating the Market (J36). Issue 8. Non-linear programming Introduction to Management Science
52
Premium Solver Dialogue Box
Figure The Premium Solver dialogue box that is used to complete the spreadsheet model introduced in Figure Selecting Standard Evolutionary from the dropdown menu specifies that Evolutionary Solver will be used to solve the problem. Issue 8. Non-linear programming Introduction to Management Science
53
Solver Options Dialogue Box
Figure This Solver Options dialogue box for Premium Solver provides several parameters for Evolutionary Solver. The default values shown here are reasonable choices for most small applications. Issue 8. Non-linear programming Introduction to Management Science
54
Limit Options Dialogue Box
Figure This Limit Options dialogue box provides additional control over when the search conducted by Evolutionary Solver should be terminated. Issue 8. Non-linear programming Introduction to Management Science
55
Evolutionary Solver Spreadsheet Solution
Figure After clicking the Solve button in the Premium Solver dialogue box, Evolutionary Solver found the solution shown in the changing cells Portolio (D31:H31) for the model formulated in Figures and The target cell Number of Quarters Beating the Market (J36) indicates that this portfolio beat the market in 18 of these 24 quarters. Clicking Solve again probably would lead to at least a slightly different solution for the portfolio. Issue 8. Non-linear programming Introduction to Management Science
56
Advantages and Disadvantages of Evolutionary Solver
Evolutionary Solver has two significant advantages over the standard Solver for solving difficult nonlinear programming problems: The complexity of the objective function does not matter. As long as the function can be evaluated for a given candidate solution (to determine the level of fitness), it does not matter if the function has kinks, discontinuities, or many local optima. By evaluating whole populations of candidate solutions, Evolutionary Solver keeps from getting trapped at a local optimum. Even if the whole population evolves toward a locally optimal solution, mutation allows the possibility of getting unstuck. However, Evolutionary Solver is not a panacea… It can take much longer that standard Solver to find a final solution. Evolutionary Solver does not perform well on models that have many constraints. Evolutionary Solver is a random process. Running it again on the same model usually will yield a different solution. The best solution found is typically not optimal (although it may be very close). Issue 8. Non-linear programming Introduction to Management Science
57
Nonlinear Programming
Consider the following model for a nonlinear programming problem: maximize: Profit = 0.5x5 – 6x x3 – 39x2 + 20x subject to: 0 ≤ x ≤ 5 Slides 10.51–10.66 are based upon a lecture from the MBA elective course “Modeling with Spreadsheets” at the University of Washington (as taught by one of the authors). The topics of nonlinear and separable programming are covered. Issue 8. Non-linear programming Introduction to Management Science
58
Solver Solution Starting with x = 0
With a starting point of x = 0, the optimal solution is x = 0.371, Profit = $3.19. This is only a local maximum. Issue 8. Non-linear programming Introduction to Management Science
59
Solver Solution Starting with x = 3
With a starting point of x = 3, the solution is x = 3.126, Profit = $6.13. This is the global maximum. Issue 8. Non-linear programming Introduction to Management Science
60
Solver Solution Starting with x = 4.7
With a starting point of x = 4.7, the solution is x = 5, Profit = $0. This is only a local maximum. Issue 8. Non-linear programming Introduction to Management Science
61
Introduction to Management Science
The Profit Graph Solver behaves like a “near-sighted mountain climber”. It only looks locally for improved solutions, and moves in the direction of improvement. Solver can get trapped at local optima (such as x = 5, x = 0.371) when there is a nonlinear objective. One approach: try a variety of starting points. However, you may still miss the globally optimal solution. Issue 8. Non-linear programming Introduction to Management Science
62
Problems that Solver will solve correctly
A maximization problem with linear constraints and a concave objective function. Line joining any two points is on or below the curve With a concave function (diminishing returns), there can be only one local maximum. Any local maximum is a global maximum. A Concave Function Issue 8. Non-linear programming Introduction to Management Science
63
Problems that Solver will solve correctly
A minimization problem with linear constraints and a convex objective function. Line joining any two points is on or above the curve With a convex function (diminishing returns), there can be only one local minimum. Any local minimum is a global minimum. A Convex Function Issue 8. Non-linear programming Introduction to Management Science
64
Quality Furniture Corporation
The Quality Furniture Corporation manufactures two products: benches and tables. They employ three carpenters. During the next week, 120 hours of labor are available at regular wages ($8 per hour). Up to 30 hours of overtime can be used at a wage rate of $12 per hour. Up to 30 hours of weekend time can be utilized at a wage rate of $16 per hour. 540 pounds of wood is available at a cost of $2 per pound. Each bench requires 3 labor hours and 12 pounds of wood. Each table requires 6 labor hours and 38 pounds of wood. Completed benches sell for $80 each, and tables sell for $200 each. Question: How many benches and how many tables should be produced? Issue 8. Non-linear programming Introduction to Management Science
65
Outdoor Furniture Labor Costs
Nonlinear labor costs Issue 8. Non-linear programming Introduction to Management Science
66
Nonlinear Programming Spreadsheet
Don’t check the “Assume Linear Model” checkbox in Solver, since this is a nonlinear model. Issue 8. Non-linear programming Introduction to Management Science
67
Outdoor Furniture Labor Costs
Although the labor costs are nonlinear, they are piecewise linear. Separate into 3 variables (regular labor, overtime labor, and weekend labor). Each of these variables has linear costs. Issue 8. Non-linear programming Introduction to Management Science
68
Separable Programming Spreadsheet
This time we can check the “Assume Linear Model” checkbox in the Solver options, because the separable program is linear. An advantage of this formulation is that the sensitivity report is available. Issue 8. Non-linear programming Introduction to Management Science
69
Introduction to Management Science
Advertising Example This example is based upon the UW lecture in the Chapter 1 Powerpoint file. There are additional slides there that flesh out the example. Issue 8. Non-linear programming Introduction to Management Science
70
Introduction to Management Science
The Sales Function Issue 8. Non-linear programming Introduction to Management Science
71
Approximating a Nonlinear Function
This spreadsheet takes the sales level at advertising levels of $0, $50,000, $100,000, $150,000, and $200,000. To approximate the sales function with a piecewise linear function, we assume that the sales level will be linear between these points. The corresponding slope (marginal increase in sales per unit advertising) is calculated between the corresponding points in column C. Issue 8. Non-linear programming Introduction to Management Science
72
Advertising Example Using Separable Programming
This spreadsheet uses separable programming, based upon the approximate sales function (piecewise linear) calculated on the previous slide. Note: this approach only works for objective functions with diminishing returns. The approximation can be improved by using more breakpoints (e.g., every $25,000 rather than $50,000). Issue 8. Non-linear programming Introduction to Management Science
73
Introduction to Management Science
Evolutionary Solver The standard Solver has difficulty with problems that are Highly nonlinear Are not smooth (have “kinks” in the objective) Have discontinuities (the objective jumps in value) Have many local optima (many hills and valleys) Excel functions like IF, MAX, ABS, ROUND, etc., tend to cause one or more of these problems. Slides 10.67–10.78 are based upon a lecture from the MBA elective course “Modeling with Spreadsheets” at the University of Washington (as taught by one of the authors). This lecture covers the Evolutionary Solver and genetic algorithms. Issue 8. Non-linear programming Introduction to Management Science
74
Introduction to Management Science
Premium Solver Included on the textbook CD is the “Premium Solver”. After installing, a new button (“Premium”) is added to Solver. Issue 8. Non-linear programming Introduction to Management Science
75
Introduction to Management Science
Premium Solver Clicking on the “Premium” button switches to Premium Solver, which gives the option of three different solvers. Standard GRG Nonlinear is equivalent to the regular Solver without choosing “Assume Linear Model”. Standard Simplex LP is equivalent to the regular Solver with choosing “Assume Linear Model”. Standard Evolutionary uses a genetic evolutionary algorithm that is only available with Premium Solver. Issue 8. Non-linear programming Introduction to Management Science
76
How Genetic Algorithms (Evolutionary Solver) Work
Genetic algorithms (such as Evolutionary Solver) use principles from the theory of evolution. The Population: a large set of random solutions is generated. Level of fitness: each member of the population (solution) is evaluated to determine its level of “fitness” (value of objective). Evolution: a new generation (set of solutions) is created as follows: Reproduction: pairs reproduce and create new solutions that share some properties of each. Survival of the Fittest: more “fit” solutions reproduce more frequently, less “fit” solutions are allowed to die out. Mutation: occasionaly random “mutations” are introduced. Issue 8. Non-linear programming Introduction to Management Science
77
Inventory Ordering Policy with Quantity Discounts
Consider a manufacturer that orders a given part from a supplier. They require 10,000 parts per year. There is a cost associated with each order (due to processing, receiving costs, fixed shipping costs, etc.) of $20. The cost of holding a part in inventory is estimated at $4 per year. The supplier of this part offers quantity discounts on the purchasing cost of this part according to the following schedule. Order Quantity Purchase Price (per unit) 1–99 $10.00 100–499 9.80 500–999 9.70 1,000–9,999 9.60 10,000+ 9.50 Issue 8. Non-linear programming Introduction to Management Science
78
Introduction to Management Science
Total Annual Cost Recall from Operations Management class that the total annual cost (including purchasing, ordering, and holding costs) is: Total Annual Cost = Dp + (Q / 2)H + (D / Q)S where D = Annual demand p = purchase cost Q = order size H = annual holding cost per unit S = ordering cost Issue 8. Non-linear programming Introduction to Management Science
79
Introduction to Management Science
Spreadsheet Model Issue 8. Non-linear programming Introduction to Management Science
80
Attempts with Standard Solver
Various “solutions” provided by the standard Solver, depending on the starting point: Starting Point (Q) Solution (Q*) Cost 1 1,000 $194,400 200 500 195,800 400 447 197,789 600 1,200 194,400 11,000 10,000 210,040 12,000 The standard Solver does not deal well with the discontinuities in this function. Depending on where it starts, it can get trapped at various local minima. Issue 8. Non-linear programming Introduction to Management Science
81
Cost Function with Quantity Discounts
The standard Solver does not deal well with the discontinuities in this function. Depending on where it starts, it can get trapped at various local minima. Issue 8. Non-linear programming Introduction to Management Science
82
Solving with the Evolutionary Solver
The Evolutionary Solver finds the globally optimal solution of Q = 1,000. Total annual cost = $194,400. Issue 8. Non-linear programming Introduction to Management Science
83
Tips on Using Evolutionary Solver
Bounding all of the variables greatly aids the Evolutionary Solver by decreasing the search space. The limit options should be increased (Max Time, Max Subproblems, and Max Feasible Sols) for challenging problems. Setting Tolerance to and Max Time Without Improvements to 30 will ensure the algorithm will stop if the Target Cell value has improved less than 0.05% in the last 30 seconds. Experiment with different populations sizes and mutation rates to see what works well. I have found that higher than default mutation rates can be helpful in problems with many local optima. The Evolutionary Solver can take a very long time, but it will usually find a good solution. Issue 8. Non-linear programming Introduction to Management Science
84
Tips on Using Evolutionary Solver
There is no guarantee that Evolutionary Solver will find the best solution. The Evolutionary Solver performs well even with nasty objective functions, but is not very efficient at handling constraints. Much of the solution process is driven by random numbers that direct the search. Thus, two people running Evolutionary Solver on the same model may get different results. Once Evolutionary Solver has found a good solution, you can use GRG Nonlinear Solver (the nonlinear algorithm that is included with the Premium Solver software) to try to find a slightly better solution. Issue 8. Non-linear programming Introduction to Management Science
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.