Session 5b Overview Evolutionary Solver (Genetic Algorithm) • Advertising Example • Product Design Example – Conjoint Analysis Decision Models -- Prof. Juran 2 Nonlinear Problems Some nonlinear problems can be formulated in a linear fashion (i.e. some network problems). Other nonlinear functions can be solved with our basic methods (i.e. smooth, continuous functions that are concave or convex, such as portfolio variances). However, there are many types of nonlinear problems that pose significant difficulties. Decision Models -- Prof. Juran 3 Nonlinear Problems The linear solution to a nonlinear (say, integer) problem may be infeasible. The linear solution may be far away from the actual optimal solution. Some functions have many local minima (or maxima), and Solver is not guaranteed to find the global minimum (or maximum). Decision Models -- Prof. Juran 4 3 Solvers • Simplex LP Solver • GRG Nonlinear Solver • Evolutionary Solver Decision Models -- Prof. Juran 5 Radio Advertising Example Music radio WABC has commercials of the following lengths (in seconds): 15, 15, 20, 25, 30, 35, 40, 57 The commercials must be assigned to 60-second breaks. What is the fewest number of breaks that are needed to air all of the commercials? Decision Models -- Prof. Juran 6 Managerial Problem Definition Decision Variables Which commercials get assigned to which programming breaks. Objective Minimize the total number of breaks. Constraints Every advertisement must be aired. No break can be longer than 60 seconds. Decision Models -- Prof. Juran 7 Formulation Decision Variables Define xi to be an integer variable identifying the break to which commercial i is assigned. For example, if commercial 1 is assigned to break 4, then x1 = 4. It should be clear that we won’t need any more than eight breaks, because there are only eight commercials. These eight x variables are the decision variables. Decision Models -- Prof. Juran 8 Formulation Define yj to be a binary variable, such that yj = 0 if no commercials are assigned to break j, and yj = 1 if any commercials are assigned to break j. Define vij to be a binary variable such that vij = 1 if commercial i is assigned to break j, and vij = 0 otherwise. Define wi to be the duration of commercial i. Decision Models -- Prof. Juran 9 Formulation 8 Note that the duration of break j is equal to w v i 1 i ij Let tj be the amount of “overtime” in break j. That is, 8 t j max w i v ij 60 , 0 i 1 Decision Models -- Prof. Juran 10 Formulation Objective Our objective, then, is to: 8 Minimize Z = y j 1 8 j m t j j 1 where m is a “large number”. Decision Models -- Prof. Juran 11 Formulation This is a good example of an advanced optimization trick: taking a constraint and building it into the objective function. It doesn’t really matter what value we use for m, as long as it is sufficiently large as to prevent any tj > 0. As it happens, in this problem m = 100 works fine. Decision Models -- Prof. Juran 12 Formulation Constraints For all xi, 1≤ xi ≤ 8. For all xi, xi is an integer. For all yj, yj is binary. Decision Models -- Prof. Juran 13 Solution Methodology E D C B A 60 1 Length of break (seconds) 2 Assignments of commercials to breaks Lengths of commercials 3 Break Commercial Length Commercial 4 1 1 15 1 5 1 2 15 2 6 1 3 20 3 7 1 4 25 4 8 1 5 30 5 9 1 6 35 6 10 1 7 40 7 11 1 8 57 8 12 13 =SUMIF($E$5:$E$12,A16,$B$5:$B$12) Information on breaks 14 Amt over max Used? Seconds Break 15 177 1 237 1 16 0 0 0 2 17 0 0 0 3 18 0 0 0 4 19 0 0 0 5 20 0 0 0 6 21 0 0 0 7 22 0 0 0 8 23 24 =IF(B23>0,1,0) 17701 Total "cost" 25 =MAX(B23-$B$1,0) 26 =SUM(C16:C23)+100*SUM(D16:D23) 27 Decision Models -- Prof. Juran 14 Solution Methodology The objective function is in B25, including a penalty of 100 units per second if any breaks go over 60 seconds. The decision variables (xi) are in the range E5:E12 (in the spreadsheet shown, all commercials are assigned to break 1, so xi = 1 for all i). The range B5:B12 contains the durations of each commercial (wi), and the range B16:B23 uses the Excel SUMIF function to calculate the duration of each commercial break. Decision Models -- Prof. Juran 15 Solution Methodology The range C16:C23 keeps track of which breaks have any assignments (the yi variables), while the range D16:D23 keeps track of how much the breaks go over the maximum limit (the tj variables). Recall that the yi and tj variables are the basic ingredients of the productive function. Notice how the use of the IF function in C16:C23 precludes the need to have an explicit binary constraint in Solver for the yi variables. Decision Models -- Prof. Juran 16 Solution Methodology The standard simplex algorithm (Solver’s default method) won’t work on this problem. The GRG Nonlinear algorithm will make an honest effort, but is likely to give up without finding the optimal solution. This is because of our use of MAX, IF, and SUMIF functions, resulting in discontinuities in our productive function and constraints as functions of the decision variables. However, the Evolutionary Solver, a genetic algorithm, can do a good job with a problem like this. Decision Models -- Prof. Juran 17 Decision Models -- Prof. Juran 18 Solution Methodology The Evolutionary Solver operates in a completely different way from the other types. Instead of searching in a structured way guaranteed to reach the optimal solution, genetic algorithms operate somewhat like biological evolutionary processes, with some degree of randomness in the steps taken from one solution to the next. In a finite period of time, the Evolutionary Solver is not guaranteed to find the optimal solution, but it will find very good solutions and try to improve upon them. Decision Models -- Prof. Juran 19 Optimal Solution 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 A Length of break (seconds) B 60 Lengths of commercials Commercial 1 2 3 4 5 6 7 8 Length 15 15 20 25 30 35 40 57 Information on breaks Break 1 2 3 4 5 6 7 8 Seconds 0 0 57 60 60 60 0 0 Total "cost" 4 Decision Models -- Prof. Juran C D E Assignments of commercials to breaks Commercial Break 1 5 2 5 3 4 4 6 5 5 6 6 7 4 8 3 Used? 0 0 1 1 1 1 0 0 Amt over max 0 0 0 0 0 0 0 0 20 Conclusions The solution indicates that commercials 1, 2, and 5 should go in one break, 3 and 7 should go in another, 4 and 6 should go in another, and 8 should go by itself. A reasonably bright person could solve this problem in their head, of course. The trick here was to set it up so that a computer could solve it, providing a method for the solution of much larger problems with the same basic structure. Decision Models -- Prof. Juran 21 Product Design Example Conjoint Analysis is a multivariate technique used specifically to understand how respondents develop preferences for products or services. It is based on the simple premise that consumers evaluate the value or utility of a product (real or hypothetical) by combining the utility provided by each attribute characterizing the product. -- Prof. Pradeep Chintagunta, Univ. of Chicago Decision Models -- Prof. Juran 22 Conjoint Analysis Conjoint Analysis is a decompositional method. Respondents provide overall evaluations of products that are presented to them as combinations of attributes. These evaluations are then used to infer the utilities of the individual attributes comprising the products. In many situations, this is preferable to asking respondents how important certain attributes are, or to rate how well a product performs on each of a number of attributes. Decision Models -- Prof. Juran 23 Conjoint Analysis After determining the contribution of each attribute to the consumer’s overall evaluation, one could 1.Define the product with the optimal combination of features 2.Predict market shares of different products with different sets of features 3.Isolate groups of customers who place differing importances on different features 4.Identify marketing opportunities by exploring the market potential for feature combinations not currently available 5.Show the relative contributions of each attribute and each level to the overall evaluation of the product Decision Models -- Prof. Juran 24 Product Design Example Decision Models -- Prof. Juran 25 Product Design Example Assume that a consumer's purchase decision on an electric razor is based on four attributes, each of which can be set at one of three levels (1, 2, or 3). Using conjoint analysis, our analysts have divided the market into five segments (labeled as customers 1, 2, 3, 4, and 5) and have determined the "partworth" that each customer gives to each level of each attribute. Decision Models -- Prof. Juran 26 We assume here that all customers within a particular segment view electric razors more or less the same in terms of which levels of which attributes constitute an attractive product. We also assume that customers in a segment conduct a sort of mathematical analysis (perhaps unconsciously) in which they weigh the various attributes of a product to come up with an overall value with respect to competing products. Conjoint analysis usually assumes the customer buys the product yielding the highest total part-worth. Decision Models -- Prof. Juran 27 Part-Worths Segment 1 Segment 2 Segment 3 Segment 4 Segment 5 Levels 4 4 1 1 1 1 (Slim) Attribute 1 4 3 4 1 1 2 (Wide) (Handle) 3 3 3 4 2 3 (Long) 4 2 3 1 4 1 (Rubber) Attribute 2 3 1 4 4 1 2 (Textured Plastic) (Grip) 1 1 3 1 4 3 (Smooth Plastic) 1 3 3 1 4 1 (Blue) Attribute 3 1 3 4 4 1 2 (Black) (Color) 4 4 2 2 3 3 (Red) 4 4 3 4 4 1 (Aloe) Attribute 4 3 2 2 2 2 2 (Lube) (Strip) 4 2 2 2 2 3 (None) Decision Models -- Prof. Juran 28 For example, consider Segment 1 and these two products: Attribute 1 (Handle) Attribute 2 (Grip) Attribute 3 (Color) Attribute 4 (Strip) Razor A 1 (Slim) 1 (Rubber) 1 (Blue) 1 (Aloe) Razor B 2 (Wide) 2 (Textured Plastic) 2 (Black) 2 (Lube) We assume that customers in Segment 1 will not buy Product B, because they value Product A at 1 + 4 + 4 + 4 = 13 and Product B at 1 + 1 + 1 + 2 = 5. Decision Models -- Prof. Juran 29 Attribute 1 (Handle) Attribute 2 (Grip) Attribute 3 (Color) Attribute 4 (Strip) Razor A Levels 1 (Slim) 2 (Wide) 3 (Long) 1 (Rubber) 2 (Textured Plastic) 3 (Smooth Plastic) 1 (Blue) 2 (Black) 3 (Red) 1 (Aloe) 2 (Lube) 3 (None) Total Decision Models -- Prof. Juran Seg. 1 1 1 2 4 1 4 4 1 3 4 2 2 13 Razor B Levels 1 (Slim) 2 (Wide) 3 (Long) 1 (Rubber) 2 (Textured Plastic) 3 (Smooth Plastic) 1 (Blue) 2 (Black) 3 (Red) 1 (Aloe) 2 (Lube) 3 (None) Seg. 1 1 1 2 4 1 4 4 1 3 4 2 2 5 30 Currently there is a single product in the market that sets all four attributes equal to 1 (call it Razor 0). We want to introduce two new types of electric razors, and capture as much of the market as possible. We want to design a two-product line that maximizes the number of market segments that will buy one of our two products. Assume that in the case of a tie, the consumer does not purchase our product. Decision Models -- Prof. Juran 31 Managerial Formulation Decision Variables Which levels of each attribute to design into each of our two products. Objective Maximize the number of customer segments who will buy one of our products. Constraints There are only four attributes, each of which must be assigned to one of three existing levels for each product. (In other words, no product can have more or less than one level per attribute.) Decision Models -- Prof. Juran 32 Formulation: Preliminaries There are five customer segments, and we will index them from 1 to 5 with the subscript letter i. There are three products (the existing Razor 0, plus our Razors 1 and 2 to be designed), and we will index them from 1 to 3 with the subscript letter j. There are four product attributes, and we will index them from 1 to 4 with the subscript letter k. There are three possible levels for each attribute, and we will index them from 1 to 3 with the subscript letter l. Decision Models -- Prof. Juran 33 Symbol Variable Description x ij A binary variable; 1 if segmenti will buy product j, 0 otherwise. v ij The total “value” that segmenti places on productj. For our two products (j = 1, 2), x ij 1 if v ij > v i products not j a jkl A binary variable; 1 if productj has level l of attribute k, 0 otherwise. There are 12 of these per product; 36 total in this problem. b ikl The “value” placed by segmenti on level l of attribute k. There are 12 of these per segment; 60 total for this problem (as shown in the table onslide 27). Decision Models -- Prof. Juran 34 Example: Using the example on slide 28, consider Segment 1’s evaluation of Razors A and B. For Razor A: v1A 4 3 a Akl b 1 kl k 1 l 1 a A , 1 , 1 b 1 , 1 , 1 a A ,1 , 2 b 1 , 1 , 2 a A ,1 , 3 b 1 , 1 , 3 a A , 2 ,1 b 1 , 2 , 1 a A , 2 , 2 b 1 , 2 , 2 a A , 2 , 3 b 1 , 2 , 3 ... a A , 4 , 3 b 1 , 4 , 3 1 1 0 1 0 2 1 4 0 1 0 4 ... 0 2 100 400 400 400 13 Decision Models -- Prof. Juran 35 For Razor B: v1B 4 3 a Bkl b 1 kl k 1 l 1 a B , 1 , 1 b 1 , 1 , 1 a B , 1 , 2 b 1 , 1 , 2 a B , 1 , 3 b 1 , 1 , 3 a B , 2 , 1 b 1 , 2 , 1 a B , 2 , 2 b 1 , 2 , 2 a B , 2 , 3 b 1 , 2 , 3 ... a B , 4 , 3 b 1 , 4 , 3 0 1 1 1 0 2 0 4 1 1 0 4 ... 0 2 010010010020 5 Since v 1 A > v 1 B , x 1 A 1 , and x 1 B 0 . In English, customer segment 1 will buy Razor A and not buy Razor B. Decision Models -- Prof. Juran 36 Formulation Decision Variables We need to set 12 a jkl variables (attribute levels) for each of our two products. Objective Maximize Z = 5 2 x i 1 j 1 ij Constraints 3 For each attribute k in product j, a l 1 jkl 1 All a jkl are binary. Decision Models -- Prof. Juran 37 Solution Methodology 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 A Razor 1 Attributes B C D E F G H J K L Number buying ours =SUM(M6:Q6) 2 Level 2 2 2 2 Part-worths for segments 1 2 3 =VLOOKUP($B5,$K$16:$Q$19,E$21+2) 4 5 Wide 1 1 4 3 4 Textured Plastic 1 4 4 1 3 Maximums Black 1 4 4 3 1 Buy ours? Lube 2 2 2 2 3 =SUM(E4:E7) 5 11 14 9 11 Level 3 3 3 3 Part-worths for segments 1 2 3 4 5 Long 2 4 3 3 3 Smooth Plastic 4 1 3 1 1 Red 3 2 2 4 4 None 2 2 2 2 4 11 9 10 10 12 Attribute Level 1 1 1 1 Part-worths for segments 1 2 3 4 5 Slim 1 1 1 4 4 Rubber 4 1 3 2 4 Blue 4 1 3 3 1 Aloe 4 4 3 4 4 13 7 10 13 13 Attribute Handle Grip Color Strip Totals Razor 2 Attributes Attribute Handle Grip Color Strip Totals Razor 0 Attributes Handle Grip Color Strip Totals I M 13 0 Attribute Level Handle 1 Slim 2 Wide 3 Long N O P =MAX(D26,D8,D17) 11 14 13 =IF(D26<M5,1,0) 1 1 0 Q 13 0 Sgmt 1 Sgmt 2 Sgmt 3 Sgmt 4 Sgmt 5 1 1 1 4 4 1 1 4 3 4 2 4 3 3 3 Grip 1 Rubber 2 Textured Plastic 3 Smooth Plastic 4 1 4 1 4 1 3 4 3 2 1 1 4 3 1 1 Blue 2 Black 3 Red 4 1 3 1 4 2 3 4 2 3 3 4 1 1 4 1 Aloe 2 Lube 3 None 4 2 2 4 2 2 3 2 2 4 2 2 4 3 4 Color Decision Models -- Prof. Juran Strip 38 Solution Methodology We have used an elegant Excel trick to make the model more manageable, mainly through the use of VLOOKUP functions in the ranges D4:H7, D13:H16, and D22:H25. This lets us reduce the complete 5 x 12 matrix of b ikl “part-worth” values (see slide 27) down to a 5 x 4 matrix relevant to the attribute levels actually used by a given product. This lets us collapse the 24a jkl decision variables down to 8 changing cells (B4:B7 and B13:B16). Instead of being binary, these are now integers between 1 and 3. The use of MAX and IF functions makes this a good problem for the Evolutionary Solver. Decision Models -- Prof. Juran 39 Decision Models -- Prof. Juran 40 Optimal Solution 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 A Razor 1 Attributes B C D E F G H Level 1 1 3 1 Part-worths for segments 1 2 3 4 5 Slim 1 1 1 4 4 Rubber 4 1 3 2 4 Red 3 2 2 4 4 Aloe 4 4 3 4 4 12 8 9 14 16 Level 3 1 1 1 Part-worths for segments 1 2 3 4 5 Long 2 4 3 3 3 Rubber 4 1 3 2 4 Blue 4 1 3 3 1 Aloe 4 4 3 4 4 14 10 12 12 12 Attribute Level 1 1 1 1 Part-worths for segments 1 2 3 4 5 Slim 1 1 1 4 4 Rubber 4 1 3 2 4 Blue 4 1 3 3 1 Aloe 4 4 3 4 4 13 7 10 13 13 Attribute Handle Grip Color Strip Totals Razor 2 Attributes Attribute Handle Grip Color Strip Totals Razor 0 Attributes Handle Grip Color Strip Totals I J K L Number buying ours 5 M N O P Q Maximums Buy ours? 14 1 10 1 12 1 14 1 16 1 Attribute Level Handle 1 Slim 2 Wide 3 Long Sgmt 1 Sgmt 2 Sgmt 3 Sgmt 4 Sgmt 5 1 1 1 4 4 1 1 4 3 4 2 4 3 3 3 Grip 1 Rubber 2 Textured Plastic 3 Smooth Plastic 4 1 4 1 4 1 3 4 3 2 1 1 4 3 1 1 Blue 2 Black 3 Red 4 1 3 1 4 2 3 4 2 3 3 4 1 1 4 1 Aloe 2 Lube 3 None 4 2 2 4 2 2 3 2 2 4 2 2 4 3 4 Color Decision Models -- Prof. Juran Strip 41 Conclusions It turns out that there is a line of two products that can capture all five segments! Razor 1, with attribute levels (1, 1, 3, 1), captures segments 4 and 5. Razor 2, with attribute levels (3, 1, 1, 1), captures segments 1, 2, and 3. Decision Models -- Prof. Juran 42 Summary Evolutionary Solver (Genetic Algorithm) • Advertising Example – Integer and Binary tricks – Moving Constraints into the productive Function – MAX, IF, SUMIF • Product Design Example – Conjoint Analysis – VLOOKUP, MAX, IF Decision Models -- Prof. Juran 43