Note on Linear Programming

Size: px
Start display at page:

Download "Note on Linear Programming"

Transcription

1 Harvard Business School Rev. November 4, 1992 Note on Linear Programming Linear programming is a mathematical technique that is used by many firms, both large and small, in the planning of efficient operations and the allocation of scarce resources. Among the heaviest users of linear programming are the transportation industry (particularly the airlines), the oil industry, and the chemical industry. Applications are also common in many kinds of manufacturing and, increasingly, in finance. This note aims to give a managerially-oriented overview of the field. What Do We Mean by Programming? Linear programming was invented in the 1940s, at roughly the same time as the electronic digital computer. In those days, the word programming simply meant planning. Programming a computer meant giving specific instructions planning out what the computer was to do, and this meaning of the term has gradually come to dominate common usage. In linear programming, the word has the more specific meaning of optimization, that is, choosing the best plan from a set of possible alternatives. To apply linear programming (or any mathematical optimization technique) to a decision problem requires that one think about the problem that is, model it in a particular way. The model should involve three elements, decision variables, an objective function, and constraints. This kind of modeling doesn t work sensibly in every situation, and some people may find it unnatural to formulate problems this way. However, it is a very useful way of thinking to add to your mental repertoire. Here is an example of a simple linear programming problem. Example 1: Insulation Production. An insulation plant makes two types of insulation called type B and type R. Both types of insulation are produced using the same machine. The machine can produce any mix of output, as long as the total weight is no more than 70 tons per day. Insulation leaves the plant in trucks; the loading facilities can handle up to 30 trucks per day. One truckload of type B insulation weighs 1.4 tons; one truckload of type R weighs 2.8 tons. Each truck can carry type B insulation, type R insulation, or any mixture thereof. The insulation contains a flame retarding agent which is presently in short supply; the plant can obtain at most 65 canisters of the agent per day. One truckload of (finished) type B insulation requires an input of three canisters of the agent, but one truckload of type R insulation requires only one canister. Professor Jonathan Eckstein prepared this note for class discussion. Copyright 1990 by the President and Fellows of Harvard College. To order copies or request permission to reproduce materials, call , write Harvard Business School Publishing, Boston, MA 02163, or go to No part of this publication may be reproduced, stored in a retrieval system, used in a spreadsheet, or transmitted in any form or by any means electronic, mechanical, photocopying, recording, or otherwise without the permission of Harvard Business School. 1

2 Note on Linear Programming Carla Linton, the plant manager, has calculated that, at current prices, the contribution from each truckload of type B is $950, and $1,200 for type R. There appears to be no difficulty in selling the entire output of the plant, no matter what production mix is selected. How much of each kind of insulation should be produced? The first step in the formulation is to identify the decision variables. Each decision variable specifies the level of some activity over which the manager has control, such as the manufacturing of a particular product. There should be enough decision variables to describe all the sensible plans of action available. In this case, it is natural to have two decision variables: the number of truckloads of type B insulation produced per day, which we will call b, and the number of truckloads of type R insulation produced per day, which we will call r. Making a daily production plan involves, essentially, choosing a value for b and a value for r. There is usually more than one valid way to choose your decision variables. For instance, we could alternately have defined our variables in terms of the number of tons produced, rather than the number of truckloads. Next, one must decide what the objective function should be. The objective function is some numerical criterion by which one can evaluate a plan the best plan is the one that maximizes (or in some models, minimizes) the objective function. In this course, we have already seen that managers should generally try to maximize total contribution; so, Carla s objective function should be total contribution, 950b r, which is to be maximized. That is, she wants to choose b and r so that 950b r is as large as possible. (Note that in some other kinds of problems it may be more convenient to think about minimizing total cost, rather than maximizing contribution, so long as these two goals are equivalent.) Finally, we need to understand the constraints of the problem, which are restrictions on the possible choices and combinations of the decision variables. Typically, constraints correspond to limited resources that are consumed by the activities corresponding to the decision variables. Here, one such limited resource is the 70-ton per day capacity of the machine. A truckload of type B weighs 1.4 tons, so the total weight of a day s production of type B insulation is 1.4b tons. Similarly, a truckload of type R weighs 2.8 tons, so a day s production of type R weighs 2.8r tons. The sum of these two weights is not allowed to exceed the 70-ton capacity of the machine, and so we have, mathematically speaking, the constraint 1.4b + 2.8r 70. Another resource limitation is the 30 truck-per-day capacity of the loading dock, which can be expressed as the constraint b + r 30. Finally, there is the limitation on the availability of the flame-retarding agent. If Carla produces b truckloads of type B and r truckloads of type R per day, she will consume 3b + r canisters of the chemical per day. This rate of consumption must not exceed 65 canisters per day, so we have the constraint. 3b + r 65. There are also two other constraints, namely that it does not make any sense to produce a negative amount of either kind of insulation. Mathematically, we require b 0, r 0. 2

3 Note on Linear Programming These last two restrictions might seem obvious to any person reading a description of the problem. However, when feeding linear programming problems into computers, one must include even such obvious constraints, and so it is customary to specify them at all times. In mathematical language, the entire linear programming problem can be written maximize 950b r (total contribution) subject to 1.4b + 2.8r 70 (production capacity) b + r 30 (loading capacity) 3b + r 65 (resource limit) b 0 r 0 We will discuss the solution of this problem shortly. It has become customary for some people to call such problems linear programs, although this practice runs somewhat counter to the original meaning of a program as a plan. What Do We Mean by Linear? So far, we have not explained what is meant by linear programming. Any problem having numerical decision variables and an objective function to be maximized or minimized is called an optimization problem. If there are constraints, the problem is called constrained optimization; otherwise, it s called unconstrained optimization. Linear programs are constrained optimization problems that have certain special characteristics: the objective function must be a linear function, the constraints must be linear, and fractional values of the decision variables must be allowable (we explain below what these stipulations mean). Among all kinds of optimization problems, linear programs are among the best studied and most easily solved, and they arise frequently in business planning situations. What do we mean when we say that the objective function must be a linear function? A linear function of some decision variables is one of the following form: (constant #1) x (decision variable #1) + (constant #2) x (decision variable #2) (last constant) x (last decision variable). By a constant, we mean any number (including 0) that is the same no matter what values are assigned to the decision variables. In the insulation example, the decision variables are b and r, and the objective function, 900b r, certainly fits this description. Any function not fitting this mold is called nonlinear. Some examples of nonlinear functions of two variables x and y are x/y, xy, and x 2 + 4y. The second restriction is that all the constraints be linear. This stipulation means that every constraint must look like (linear function of the decision variables) constant, or (linear function of the decision variables) constant, or (linear function of the decision variables) = constant. For instance, if x and y are decision variables, 2x + 3y = 20 or x - y ³ 0 are both linear constraints (the second means the same things as x y). On the other hand, 7x + xy 8 is not linear. All the constraints of our insulation-production example are of one of the first two types above. Constraints of the third type (those with an = ) often express some sort of fixed relationship between variables, rather than an explicit resource limitation. For instance, in a model with a transfer point 3

4 Note on Linear Programming where goods are sorted but there are no storage facilities, one might want to express the constraint that the total quantity of goods flowing in equals the total quantity flowing out. The final requirement of an optimization problem to be a linear program is that of smooth divisibility: any fractional choice of the decision variables, so long as it satisfies the constraints, must be allowable. Again, this assumption holds true in the insulation example. If, for instance, we were to add the condition that each truck leaving the dock must be completely filled with either type B or type R insulation, and that no partially-filled trucks can be held overnight to be filled out the next day, then only whole-number choices of b and r would be allowable, and the divisibility property would not hold. Optimization problems that require whole-number answers are called integer programming problems, and are usually (but not always) much harder to solve than linear programming problems. They arise very frequently in business, particularly in distribution and transportation contexts. On the other hand, optimization models that do permit fractional answers, but have a nonlinear objective function and/or nonlinear constraints are called nonlinear programming problems. These too can arise in business; in fact, the sorts of pricing decisions we examined at the beginning of this module can be thought of as simple examples of nonlinear programming. By way of illustration, we now formulate a representative pricing decision as a nonlinear program: 4 Example 2 (a small nonlinear program) Company X, an electronics company, has designed two specialty add-on circuit cards for personal computers, and markets them directly to the public. One is a communication card, and the other a video card. Sales of the two cards do not cannibalize one another. Direct production costs are $300 per communication card and $400 per video card. Marketing estimates that demand for communication cards will be 10,000-9p units, where p is the retail price in dollars. Video card demand is similarly estimated to be 12,000-12t units, where t represents the price. Company X has a total production capacity of 7,500 cards per year. Assuming the marketing estimates are correct, how much of each kind of card should Company X produce to maximize this year s contribution? Let the prices p and t be decision variables. Also let c and v be decision variables giving the total production of communication and video cards, respectively. From marketing, we have c = 10,000-9p and v = 12,000-12t, or equivalently c + 9p = 10,000 and v + 12t = 12,000. The manufacturing capacity limitation may be expressed as c + v 7,500. The total contribution from communication cards is (p - 300)c, which is the margin times the quantity sold. Similarly, contribution from video cards is (t - 400)v. Thus, total contribution is (p - 300)c + (t - 400)v, which is a nonlinear function of p, c, t, and v. None of these decision variables can be negative. Thus, we may express Company X s problem as maximize (p - 300)c + (t - 400)v subject to c + 9p = 10,000 (demand for communications card) v + 12t = 12,000 (demand for video card) c + v 7,500 (production capacity) c 0 (positive production of c) p 0 (positive price for c) v 0 (positive production of v) t 0 (positive price for v) We have already studied problems of this sort, although we have not formulated them in such a mathematical way. The purpose of this example is to illustrate how problems as seemingly abstract as nonlinear programming can arise from business situations.

5 Note on Linear Programming It pays to be creative when formulating optimization problems. Suppose that we have some problem where we produce x units of product A, and y units of product B, with a constraint that we must make at least three times as much of product A as of product B. One way to write this constraint would be x y 3, which is not one of the allowable forms for linear programming. However, the constraint x - 3y 0, has exactly the same meaning, and is of the allowed form (linear function) constant. So, if we wanted to use linear programming techniques, we would have to be sure to write the constraint in the second way. In summary, with a few algebraic tricks, you can sometimes use linear programming to solve some problems to which, at first, it might not seem applicable. Solving Linear Programming Problems So far, we have given only a very rough sketch of how to formulate linear programming problems; how do you solve them? For problems with only a few decision variables and constraints, it is often possible to reason your way to a solution that gives the best possible value of the objective function, or at least comes pretty close. This situation holds with some of the simple examples we have used in this course. For problems with only two variables, there are also graphical solution methods, which we have not discussed. But real problems of managing transport, logistics, and complex production processes can involve hundreds to tens of thousands of decision variables, and similar numbers of constraints. To solve such problems optimally, or even to get close to a solution, requires a computer. In the early 1950s, George Dantzig (now at Stanford University) and various co-workers developed the simplex method, a computer algorithm for linear programming, which has proven extraordinarily fast and versatile. We mention this bit of history only because the simplex method was at one time so dominant that many people considered it synonymous with linear programming. In the 1980s, mathematicians and computer scientists began discovering some viable alternative ways to solve linear large programs, prompting a number of front-page stories in the New York Times and Wall Street Journal. To the manager, the important thing is not the mathematical method used by the computer, but the computer software package it comes in. A recent issue of the trade magazine Operations Research/Management Science Today listed 44 linear programming software packages offered on the United States personal computer market alone. Three kinds of linear programming software are currently popular: spreadsheet packages, modeling language packages, and professional computer codes. The spreadsheet packages are add-ins for popular spreadsheets such as Lotus and Excel, and are appropriate for small problems that managers might want to try to formulate and solve themselves. You set up a spreadsheet model of your problem, indicate which cells hold the decision variables, constraints, and objective function value, and the add-in places the optimal values in the decision variable cells. Inexperienced users find spreadsheet-based packages easier to learn than more traditional linear programming software. For very large problems, or ones that must be solved repeatedly, the most common approach is to enlist the services of professional programmer-analysts to build a customized decision support 5

6 Note on Linear Programming system based on one of the professional linear programming codes. Such efforts generally require the participation of a team of managers and technical analysts. The modeling language products, which are a relatively recent development, provide special input languages for succinctly describing linear programs, and are probably best suited to problems of intermediate size. The great majority of managers will need help from an analyst to use one, but the amount of effort needed is much less than for the more traditional professional software. Interpreting Linear Programming Output Figure 1 shows the output a typical linear programming package might produce if fed a description of our insulation-production problem. Figure 1 Linear Programming Output for the Insulation Production Example Objective Value: 33, Variable Value Reduced Cost Truckloads B Truckloads R Constraint Slack Shadow Price Lower Range Upper Range Machine Loading Dock Flame Retardant (infinity) Optimal Values From Figure 1, it is fairly easy to tell that the maximum possible contribution is $33,500 per day, and is obtained by producing 10 truckloads of type B, and 20 truckloads of type R. Note that in some problems, there may be more than one optimal choice of the decision variable values. In such situations, which are more common than you might think, most linear programming software packages will simply choose one of the optimal plans, without giving information on the others. Slack Another typical output from most linear programming packages is the amount of slack in the constraints, in other words, how much of each limited resource remains unused. In the optimal solution (b=10, r=20) of our insulation example, for instance, the total 70-ton capacity of the production machine is being used, as well as the full 30-truck capacity of the loading dock. Thus the machine constraint 1.4b + 2.8r 70 and the loading dock constraint b + r 30 are said to have zero slack. However, only 50 out of the available 65 canisters per day of the fire retardant chemical are being consumed. Thus, the constraint 3b + r 65 is said to have a slack of 15; that is, we could conceivably use an additional 15 canisters before reaching the limit. Machine and loading dock capacity are the bottlenecks in the operation, whereas the anti-flame chemical is not really a scarce resource as far as the factory is concerned, in that we could afford to lose a few more available canisters without any effect on the maximum contribution. Only if availability fell below 50 canisters per day would we have to alter the optimal production plan. 6

7 Note on Linear Programming Shadow Prices, Their Ranges, and Pricing Out Virtually all linear programming software packages provide additional output in the form of shadow prices on all the constraints. The shadow price of a constraint is the rate at which the optimal objective value of the problem would change in response to small alterations in the available amount of the resource corresponding to that constraint. Note that the machine constraint has a shadow price of $ This means that if we could somehow increase the capacity of the machine by one unit (one ton per day, in this case), we could rearrange the production schedule to increase daily contribution by $ Conversely, if something went wrong with the machine and we lost 2 tons per day of capacity, the best production plan we could devise would make 2 x $ = $ less per day than the currently optimal one. Similarly, the shadow price of the loading dock constraint is $700, which means that for every additional unit (truck per day) of dock capacity, we should be able to make an extra $700. For example, we would be willing to pay up to 3 x $700 = $2,100 per day for a 3-truck increase in daily capacity. The shadow price of the anti-flame chemical constraint is zero, which makes sense, since small changes in the availability of the chemical do not affect the optimal production plan. In general, the shadow price of any constraint with nonzero slack must be zero. To gain some insight into why the shadow price of the loading dock is $700, consider what would happen if its capacity were to be increased by one truck per day. We would like to ship another truckload of insulation, but how can we increase the number of truckloads when the machine is already running at capacity? The answer is that if we increase the production of type B by two truckloads, while decreasing production of type R by just one truckload, we use exactly the same tonnage capacity of the production machine. The increase in daily contribution is 2 x $950 - $1200 = $ $1200 = $700, which equals the shadow price of the loading dock constraint. The shadow price thus tracks the way the optimal plan changes as we begin to alter the resources available. The machine capacity shadow price can be understood in much the same way. With a oneton increase in machine capacity without any increase in loading dock availability, we do best by increasing type R production by two tons (which is 2/2.8 = 5/7 of a truckload), and decreasing type B production by one ton (which is also 5/7 of a truckload). The resulting increase in contribution is (5/7) x $ (5/7) x $950 = $ We have said that the shadow prices give the change in the optimal objective value resulting from small changes in resource availability. What do we mean by small changes? The answer lies in the lower and upper ranges that are provided with the shadow prices. The lower range gives the maximum decrease in the amount of the resource for which the shadow price is valid, and the upper range the maximum amount of increase. 1 For example, the loading dock shadow price given above is valid for decreases in capacity of up to five trucks, and for increases of up to three trucks. For changes beyond their ranges, shadow prices always give an optimistic prediction of how the optimal objective will change. Suppose, for example, we were to reduce the loading dock capacity by 7 trucks per day, which is beyond the lower range of 5 for the dock constraint. If you rerun the linear program with this change in the data, it turns out that the maximum contribution is $27,600 per day, or $5,900 less than before. If we were to use the shadow price, we would predict a reduction of only 7 x $700 = 1 This is called the relative description of the ranges. Sometimes one instead gives an absolute description, that is, the limits of total resource availability over which the shadow price is valid. In this alternative format, the lower limit for the loading dock capacity shadow price would be 25, and the upper limit 33. 7

8 Note on Linear Programming $4,900. Incidentally, the lower range is 5 because the best response to a one-truck decrease in loading capacity is to decrease type B production by two truckloads, and increase type R production by one truckload. After a decrease of five truckloads in dock capacity, we can t do this any more, because we will have already decreased type B production from ten units down to zero. Note that the upper range on the anti-flame chemical shadow price is infinite: no matter how much we increase the availability of that resource, the optimal production plan, and thus the optimal contribution level, remains unchanged. We have more flame retardant than we need already, so having still more can t change anything. Shadow prices can give managers real insight into the economics of an enterprise. Aside from letting one know how much one should be prepared to pay for increases in capacity, they also help in pricing out proposed new activities, such as making a new product. By pricing out an activity, we mean comparing the contribution obtained from one unit of the activity to the opportunity cost of diverting to it scarce resources that could be used for other things. To begin with, suppose that the manager of another division approaches our plant manager, Carla, with a request to rent one ton per day of machine time to produce some product of his own. How much should Carla charge him? After having given up this capacity, Carla s best production plan, according to the shadow price data, will result in $ less contribution than the currently optimal plan. So, Carla should charge the other manager at least $ per day. Thus, the shadow price of the machine constraint is the opportunity cost of diverting one ton of production capacity to some other purpose. In a similar vein, now let us suppose that product development devises a new kind of insulation, type X, of which one truckload weighs 1.9 tons, and requires two canisters of flame retardant. A truckload of type X insulation would sell for $1,900, and have a variable cost of $1,075, including all raw materials, chemicals, and direct labor. Would it be profitable for Carla to produce type X insulation? At first glance, you might be tempted to say yes, because the unit price exceeds the direct costs. This reasoning, however, ignores the diversion of scarce resources to the new activity. Suppose that Carla decides to produce exactly one truckload of type X per day, and adjust the type B and R production schedules to obtain the maximum possible contribution with the remaining plant resources. The shipping of type X insulation would divert one truckload of loading dock capacity that would otherwise be available to the type B and R products, which has an opportunity cost of $700, according to the shadow price data. It will also use 1.9 tons of machine capacity, which similarly has an opportunity cost of 1.9 x $ = $ It will also consume two canisters of fire retardant, but since no canisters need be diverted from type B and type R production, this has no consequence other than the direct cost of the canisters, which is already subsumed in the $1,075 variable cost. Thus, by engaging in the production of one truckload of the new insulation, we are forgoing some $700 + $ = $1, of contribution that could have been earned by devoting the same resources to type B and R production. The contribution from producing a truckload of type X is its price, $1,900, minus its direct cost, $1,075, or $825. Comparing this to the lost contribution of $1,039.28, it appears that it would be best not to produce the one unit of type X. By pricing out, we mean comparing the opportunity costs incurred by engaging in one unit of an activity, as indicated by the shadow prices, to the unit contribution of the activity. Because shadow prices give optimistic estimates of the value of the best solution under altered resource availability, the tradeoff may become even worse if we try to produce even larger quantities of X. On the other hand, if we could sell type X insulation for at least $1, $1,075 = $2, per truckload, then it would appear advantageous to make at least a small amount of the new product. This type X example underscores a basic economic principle of this course. When a firm evaluates a new product, it is common practice to test whether the new item is profitable by comparing an estimate of its revenues to its costs, which are defined to include both variable costs and allocated costs to cover overhead. This is a double error. First, some overheads will not change whether or not the project is pursued. Second, the analysis ignores any scarce resources that may 8

9 Note on Linear Programming have to be diverted from other activities. The correct analysis compares the new product revenues to the sum of direct variable costs and the opportunity costs of diverting any required scarce resources. In complex situations where firms are producing many different products using many different resources, it may not be obvious what the opportunity costs really are. The nice thing about linear programming analysis is that, as in the example above, shadow prices allow a very quick, relatively painless assessment of the opportunity costs of diverting resources. Reduced Costs To confirm what we have learned by pricing out type X insulation, let us reformulate the insulation factory example with an additional decision variable x to represent the number of truckloads of type X insulation produced. The machine capacity constraint must now take into account that production of type X insulation will use 1.9x tons of capacity, so we must change the constraint to 1.4b + 2.8r + 1.9x 70. We must change the capacity and flame retardant constraints in much the same way. Inserting the contribution of $825 per truckload of type X into the objective function, we thus have the modified linear program maximize 950b r + 825x subject to 1.4b + 2.8r + 1.9x 70 (capacity constraint) b + r + x 30 (truck loading constraint) 3b + r + 2x 65 (flame retardant constraint) b 0 r 0 x 0 If we feed this problem into the computer, we obtain the output in Figure 2. As expected, the optimal solution does not contain any type X production. What is interesting is the reduced cost output column. The reduced cost of a decision variable is just the unit contribution of the corresponding activity, minus the opportunity costs of the resources one unit of the activity would use. In other words, it s just the difference you calculate when you do pricing out. The reduced cost of the type X variable is $1, $825 = $ because, as we calculated above, making one truckload of type X has an opportunity cost of $1, in diverted resources, but only brings in $825 in contribution. The reduced cost tells us that if we could increase the contribution per truckload of type X by more than $214.28, then its production would become advantageous. Figure 2 Linear Programming Output for Insulation Example with "Type X" Added Objective Value: 33, Variable Value Reduced Cost Truckloads B Truckloads R Truckloads X Constraint Slack Shadow Price Lower Range Upper Range Machine Loading Dock Flame Retardant (infinity) 9

10 Note on Linear Programming Notice also that the reduced costs of type B and R production, the activities we actually engage in under the optimal plan, are both zero. This is no accident. To see why, consider that the reduced cost of a variable is just the cost of requiring that the plan contain at least one unit of the corresponding activity; in fact, we might as well have defined reduced cost that way. 2 That s because, if we were required to make, say, one unit of type X, we would set aside the resources necessary to make a unit of type X, and then follow the optimal plan with the resources that are left. The cost of the requirement is the opportunity cost of the resources set aside, which are given by the same shadow price calculation as above, minus the contribution we get from the one unit of type X. The result is the reduced cost we ve already calculated. Now consider type B insulation. It s already in the optimal plan, so requiring that we make at least one unit has no effect the cost of the requirement is zero. The same goes for type R insulation. Thus, the reduced costs for type B and R must be zero. Shadow Prices and Resource Pricing In order to make a connection with the economics of resource pricing, let s now consider another interpretation of shadow prices. We imagine the firm to be a miniature, self-regulating economic system in which there is a product manager for each type of insulation, one for type B, one for type R, and one for type X. There is also a manager in charge of each resource, so one manager controls the production machine, another is in charge of the loading dock, and one is in charge of disbursing the fire-retardant chemical. Each time he 3 uses a scarce resource, a product manager pays to the associated resource manager the direct cost of the resource, plus a surcharge, or transfer premium, determined by the corresponding resource manager. Each resource manager is supposed to monitor the demand for his resource, raising the price if demand exceeds supply, and lowering it if supply exceeds demand. His performance is evaluated not on how much he collects in surcharges, but by whether the demand for his resource equals its supply. The product managers, on the other hand, continually price out their products, and only try to produce them if they can make a profit or break even. Suppose that the machine manager is charging m dollars per ton-day of machine time, the loading dock manager is charging d dollars per truck loaded, and the fire retardant disburser is charging c dollars per canister. The type B product manager would continually monitor his total surcharges per truckload, 1.4m + d + 3c, comparing this figure to his unit contribution, $950 (which already includes all direct costs). If the transfer costs exceed unit contribution, the type B manager sets his production level at zero. If transfer costs are less than the unit contribution, he attempts to increase his production to the maximum he thinks he can sell. If he exactly breaks even, he does not attempt to change his production level. The type R and X managers behave similarly, only they monitor the costs that are appropriate to their products (the formulas are 2.8m + d + c and 1.9m + d+ 2c, respectively). Now suppose that we set the transfer charges equal to the linear programming shadow prices, that is m = $178.57, d = $700, and c = $0, and the production levels to their optimal values b = 10 and r = 20. If the type B product manager now prices out his product, he will find that he is paying surcharges, per unit produced, of 1.4m + d + 3c = (1.4 x $178.57) + $700 + (3 x $0) = $950, 2 For a variety of technical reasons, this definition is a little bit sloppy. However, it suffices well enough for our purposes. 3 For brevity, and because their superior is female, we will suppose that these hypothetical managers are male. 10

11 Note on Linear Programming which is exactly equal to his contribution per truckload of production. Therefore, he has no incentive to alter his production rate either up or down from the current 10 trucks. The same holds for the type R product manager, who is paying 2.8m + d + c = (2.8 x $178.57) + $700 + $0 = $1,200, which exactly matches his contribution. The type X manager s costs are 1.9m + d + 2c = (1.9 x $178.57) + $700 + $0 = $1,039.28, which exceeds his contribution of $825, so he would like to set his production level to zero. However, type X production is already zero, so he has no desire to change it. Now consider, the production machine manager. Exactly 10 x x 2.8 = 70 tons of capacity are being used, so he has no reason to raise or lower his price of $ per ton. Similarly, the loading dock is being used exactly to capacity, so the loading dock manager does not want to alter his price, either. Finally, the flame retardant manager could supply an additional 15 canisters per day, so he would like to drop his price to stimulate demand, but his price is already zero, so he can drop it no further. In summary, if production is set at the optimum levels and the prices on the resources are set to the linear programming shadow prices, the insulation plant forms a stable economic system where no actor has an incentive to change his behavior. The shadow prices are the prices that clear the market for their respective resources that is, they allow a stable condition in which demand equals supply. Why should the shadow prices have this property? Well, as we argued above, the shadow prices must have the property that the activities participating in the optimal solution must price out at zero. Likewise, activities that are not in the optimal solution price out so that their opportunity costs exceed their contributions, or they would be in the optimal solution. But these conditions are precisely the conditions for stability in our hypothetical economic system! In principle, then, it should be possible to solve any linear programming problem by charging some price for each resource, and experimenting with the prices until you find some configuration that allows demand for each resource to equal supply. In some cases, this approach is actually practical, but usually the search for the right prices is a slow and finicky procedure best left to a computer program. Interestingly, finding the right resource prices can be much easier in some nonlinear programs than in linear ones. A simple search for the right resource prices is actually a viable approach in some nonlinear programming situations. Putting Linear Programming into Practice Linear programming may seem to be of limited applicability because of the many technical conditions a decision model must satisfy in order to be classified as a linear program. Almost any situation, if inspected in fine enough detail, will reveal some feature that runs counter to the requirements of linear constraints, linear objective function, or infinitely divisible decision variables. In many cases, though, one can justifiably ignore such details and still come up with a useful model. For instance, if a product is shipped in discrete units, but thousands of units are shipped per day, it is probably adequate to model its manufacture with a continuous, infinitely divisible decision variable. Even if only a few units are shipped per day, it may still be possible to interpret such a decision variable as an average rate of production: for example, a production level of 1.5 units per day might correspond to shipping one unit on some days, and two units on others. It may also be possible to approximate a nonlinear constraint, say, by a collection of linear ones. 11

12 Note on Linear Programming Another characteristic of linear programming models is their implicit assumption that all the model data are known with certainty, which is often not the case. One remedy for this problem is to perform a sensitivity analysis, that is, trying several different values for uncertain elements of the model, and seeing how the results vary. Sensitivity analysis is a good idea in conjunction with virtually any analytical tool. Sometimes, however, the amount of uncertainty is too great for any reasonable amount of sensitivity analysis. Much of this course will be concerned largely with the basic analysis of decision making under uncertainty. However, the solution of complex optimization problems under significant uncertainty, which is called stochastic programming, is beyond the course s scope. As computers become more powerful, we expect to see gradually increasing use of stochastic programming by industry. Generally, application of a tool like linear programming can be broken down into the following steps: Formulating the model. This is as much an art as a science: if the problem is modeled in excessive detail, the result will be unwieldy; if it is modeled in too little detail, the result will not be of much use. In complex situations, there may be many possible ways to choose the decision variables and to represent the constraints, some of which may be more compact than others. Often, the formulation exercise alone will yield important insights into a firm s operations, as it forces managers to consider things from a different perspective. Collecting the data. This is often the most time-consuming step, depending on the quality of the firm s information support systems. Running the model. An appropriate software tool must be found or built (see the discussion above). Analyzing the results. If a model is to be truly useful, it should not just provide optimal values of the decision variables, but instead provide insight into the problem. Such insight may be gained by inspecting the output, especially the shadow prices, and by doing sensitivity analysis or runs of alternative models. Suppose, for example, that a shadow price turns out very differently from what the manager expected. One possibility is that the model is faulty; another is that the manager s original intuition about the situation was wrong. In either case, the manager has learned something valuable. Implementation. Once you understand the model outputs and are convinced they are sensible and practical, you can put the optimal plan (or one based on it) into effect. Currently, use of linear programming in industry is very uneven. Some enterprises, such as large airlines and oil refiners, solve on a daily basis optimization problems, including linear programs, with thousands of decision variables and constraints. Other organizations fail to avail themselves of linear programming even in the most straightforward contexts. There can be little doubt that the main barrier to applying the analytical tools like linear programming is that many managers do not understand or trust them. It is of the utmost importance that applications of optimization techniques, whether for a one-time analysis, or for a decision support system, be developed in close cooperation with the managers and workers who will be affected. Solutions that are imposed from above may miss important aspects of the problem apparent only to lower-level personnel. Furthermore, even the best analysis will tend to encounter resentment from those who have not been consulted, or who do not understand the model. However, with each successful project, quantitative analysis will become more ingrained in the corporate culture, and each further application should become easier. 12