scan0008

24
Module 5 Simulation Contents 5.1 Introduction 5.2 Applying Simulation to a Distribution System 5.2.1 Problem 5.2.2 Simulation 5.3 Types of Simulation 5.4 Monte Carlo Technique 5.5 Flowcharts 5.6 How the Simulation Works 5.7 Interpreting the Output 5.8 Risk Analysis 5.8.1 Problem 5.8.2 Simulation 5.9 Concluding Remarks Review Questions Case Study 5.1 Case Study 5.2 Case Study 5.3 Case Study 5.4 5/1 5/3 5/3 5/4 5/5 5/6 5/8 5/10 5/13 5/15 5/16 5/16 5/17 5/19 5/21 5/22 5/22 5/23 By the end of the module the reader should knowwhat asimulationis,whatthe keyfactorsin its useareand whatits drawbacksare.Severaltypical applications are described. Themodule is about using, not constructing, simulations. The latter almost certainly would require computer programming expertise. Simulation means imitating the operation of a system. Outside the business world,simulations may be encountered as wind tunnels for estimating the performance ofanewly designed aircraft and flight simulators for testing the reactionsof aircraftpilots; inbusiness asimulation mayreplicatecashflowsin a company to demonstrate theimpact onprofitability of changing circumstances oritmayimitatean inventory systemtoshow how differentpoliciesmayaffect costsand the likelihoodofbeing out ofstock. In the case of awind tunnel, the simulation is based on a small-scale physicalmodel. Physical models may

Upload: erwin-peniones

Post on 12-Mar-2016

221 views

Category:

Documents


1 download

DESCRIPTION

Module 5 By the end of the module the reader should know what a simulation is, what the key factors in its use are and what its drawbacks are. Several typical applications are described. The module is about using, not constructing, simulations. The latter almost certainly would require computer programming expertise. 5/3 5/3 5/4 5/5 5/6 5/8 5/10 5/13 5/15 5/16 5/16 5/17 5/19 5/21 5/22 5/22 5/23 Contents 5/1

TRANSCRIPT

Page 1: scan0008

Module 5

Simulation

Contents

5.1 Introduction

5.2 Applying Simulation to a Distribution System5.2.1 Problem5.2.2 Simulation

5.3 Types of Simulation

5.4 Monte Carlo Technique

5.5 Flowcharts

5.6 How the Simulation Works

5.7 Interpreting the Output

5.8 Risk Analysis5.8.1 Problem5.8.2 Simulation

5.9 Concluding Remarks

Review Questions

Case Study 5.1

Case Study 5.2

Case Study 5.3

Case Study 5.4

5/1

5/35/35/4

5/5

5/6

5/8

5/10

5/13

5/155/165/16

5/17

5/19

5/21

5/22

5/22

5/23

By the end of the module the reader should know what a simulation is, what thekey factors in its use are and what its drawbacks are. Several typical applicationsare described. The module is about using, not constructing, simulations. Thelatter almost certainly would require computer programming expertise.

Simulation means imitating the operation of a system. Outside the businessworld, simulations may be encountered as wind tunnels for estimating theperformance of a newly designed aircraft and flight simulators for testing thereactions of aircraft pilots; in business a simulation may replicate cash flows in acompany to demonstrate the impact on profitability of changing circumstancesor it may imitate an inventory system to show how different policies may affectcosts and the likelihood of being out of stock. In the case of a wind tunnel,the simulation is based on a small-scale physical model. Physical models may

Page 2: scan0008

also be used in business applications (for example, a model will help to planthe layout of a new supermarket); but more usually the simulation is based ona series of mathematical equations. Large simulations of this second type areusually computerised.A simple example of a mathematical simulation might be the calculation of

present values so that one of three capital expenditure projects presented toa board of directors can be selected. Suppose the projects have the followingcharacteristics in common:

(a) Turnover generated in first year = £2 million.(b) Operating costs = 60%of turnover.(c) Overheads p.a. = £500000.(d) Length of projects = 10 years.(e) Discount rate = 7%.

On the other hand, the three projects differ in the initial capital outlay and therate at which turnover is estimated to' increase over the ten years of the project.Given these figures, a present value for each project can be calculated. Thecalculation process is called a model; using the model is a simulation (Figure5.1). Given the capital cost and the turnover increase percentages, the modelimitates the cash flows of the company to produce an overall present value foreach project.

Turnoverincrease

-------.

For eachProfit = Turnover - Operating costsPresent value = Discounted profit

At the end of 10 years:

Total PV = Sum of PVs - Capital cost

The purpose of a simulation is to test the effect of different decisions anddifferent assumptions. In the above example the different decisions are the threeprojects; the different assumptions are the first year turnover, the relationshipbetween costs and turnover, the level of overheads, etc.Once a simulation has been constructed different decisions and assumptionscan be tested quickly and without the expense or danger (in the case of aflight simulator) of carrying out the decision in reality. For example, we cansee whether the best project is still the best project when the operating costsare slightly more than 60% and the project's lifespan is eight years instead often. Simulation is a method of contributing to decision making that differs from

Page 3: scan0008

optimisation techniques such as linear programming and decision analysis. Insome situations it will be preferable, in others not.The main shortcoming of the simulation approach is that, like a large calcu-

lator, it merely measures the effect of a decision defined by the operator. The'best' decision means the best of those that have been tested. There may wellbe other, better, decisions that the operators of the simulation have not thoughtof. In the capital project example above, there may be another project superiorto any of the three tested. The simulation will not of course indicate that sucha project exists. It will merely measure the present value of the projects fed intoit. Compare this with the optimisation techniques which themselves define thebest decision. LP or decision analysis will come up with the optimal decisions;in simulation, the decision maker must not only model the problem accurately(just as in optimisation methods) but also propose the whole range of possibledecisions.The great advantage of simulation is that it is capable of a wide range of

applications. The optimisation techniques can only be applied in particular well-defined circumstances. For instance, LP applies only when the problem can beformulated with an objective function and constraints expressed linearly in termsof continuous variables; decision analysis is applicable only when the problemcan be formulated as a series of sub-decisions and chance events representedby a decision tree. No such restrictions limit the uses of simulation. Indeed,the widespread use of simulation models stems from the fact that there are somany situations which cannot be contained within the underlying assumptionsof optimisation techniques (or rather the situations must be approximated andsimplified to an unrealistic extent), but which can be explored using simulation.

Because it is not restricted to problems with particular characteristics, simula-tion has a wide range of applications, including corporate planning models,business games and models of operations. The application described here is thedistribution of steel throughout a country.

A new large steelworks was being built on a large South-East Asian island (seeFigure 5.2). At the time all steel was imported, but upon completion of theplant all steel required on the island was to be supplied by it. Demand could bethought of as arising at 120 centres on the island. The problem was to decidethe best distribution network for the steel products. Three modes of transportwere available. Sea routes for longer distances were viable because of the lackof road and rail infrastructure, although suitable facilities were available at onlyone or two harbours; rail routes existed but they were radial as a result of theiroriginal purpose which was (and is) the transport of tea from the growing areasin the mountainous centre to the population and harbours of the coast; roadroutes covered most of the island but few of them had a tarmac surface.

Page 4: scan0008

Road•.•..•.• Rail

Sea

The size of the problem (different products, different modes of transport, 120demand centres), the fact that some possible solutions required large capitalexpenditures (in harbour facilities, transit warehouses) and the many uncertain-ties (not least the levels of demand) meant that no optimisation technique wasable to provide a solution. Instead, a simulation was used. It specified all thelinks in the network and the costs associated with transporting steel productsacross the links by each of the transport modes. It calculated the total tonnagemoving along each link, checked that this did not exceed capacity and thencalculated the total cost of supplying demand under a given distribution policy.A distribution policy was a set of routes by which the centres of demand were

to be supplied, together with the associated capital investments. By combiningdifferent modes of transport for the different demand centres it was possible todefine a great many policies. Only a few could be tested, however. Therefore,as with all simulations, the policy finally selected was at best an approximationto the optimum. Because there were so many possible policies it was essentialto adopt a structured approach to selecting a 'best' policy. At each stage of theinvestigations the range of possibilities had to be narrowed down. The policiestried out first were:

(a) Supply all demand by road.(b) Supply all demand possible by rail, the remainder by road.(c) Supply all demand possible by sea, the remainder by road.(d) Supply all centres more than 1000miles away by sea; between 500 and 1000

miles away by rail; less than 500 miles away by road.

The results from these four policies, together with the costs associated withindividual links, indicated the types of policy worthy of further investigation.

Page 5: scan0008

The process of narrowing down continued. At each stage some policies wererejected, others amended and refined until, finally, a satisfactory policy wasevolved.The purpose of a simulation is to evaluate decisions and assumptions. In this

case the decisions are the different distribution policies, the assumptions are thelevels of demand in the 120centres, the capital costs, the transportation costs andcapacities of the individual links. By varying the assumptions, it is possible toinvestigate the ability of the chosen policy to stand up to changing circumstance.A 'best' policy which remains 'best' for a wide range of circumstances is calledrobust.

The steel distribution application is a large one requiring a considerable com-puter program to make the calculations. It is an example of the simulation ofa physical system. Although the end result is financial, the simulation is basedon volume flows down the various links. Contrast this with a simulation ofa financial system based purely on cash flows, for example the capital projectcomparison described earlier.As well as having a physical or financial application, simulations are also

classified as deterministic or stochastic (see Figure 5.3). Deterministic means thatthe inputs and assumptions are fixed and known: none is subject to probabilitydistributions. The simulation acts as a large calculating mechanism. It is usedbecause of the number and complexity of the relationships involved. Corporateplanning models are often examples of this type. The impact on profit ofdifferent assumptions concerning, say, the growth of sales, is calculated bythe simulation model. Associated decisions relating to, perhaps, productioncapacity or advertising can also be tried out and eventually plans for the futureformulated.

~~Deterministic

1\Stochastic (using

Monte Carlo technique)

I \Physical Financial

(known asrisk analysis)

Page 6: scan0008

Stochasticmeans that some of the inputs, assumptions or variables are subjectto probability distributions. For example, the capital cost of building a newmanufacturing plant is not likely to be known exactly at the outset. Insteadit may be specified as a distribution centred at, say, £5 million but covering arange from £4million to £6million with varying probabilities over this range. Insuch a case the simulation is run many times (hence the need for a computer),with the capital cost taking on different values for each run. But it is done in ,----,'such a way that the different values used have a distribution which is the sameas the specified distribution for that capital cost. This technique is known asMonte Carlo simulation. Stochastic financial simulations are often known asrisk analyses. An application will be described later.

The Monte Carlo technique will be illustrated in the context of the followingsimple problem.Raw materials and sub-assemblies -used in a manufacturing process are stored

in a warehouse. Each day the foreman of the process requisitions items from thewarehouse. The demand for each item varies from day to day. If the warehousecan supply the items, it does. If there is an item which is out of stock theforeman has to improvise in order to keep the manufacturing process going. Inspite of the foreman's lonE experience as an improviser, this is usually done atsome cost to the company. On the other hand it also costs the company moneyto hold stock. For this reason, the warehouse does not keep vast stocks, butfrom time to time, when the stock is low, that item is reordered from suppliers.The time taken for the replenishment to arrive varies from item to item andfrom order to order.

Demand distributionProbability

0.100.150.250.250.150.10

1.00

1

234

56

Total

Average demand = 3.5

The company is now trying to define its best inventory policy. It is startingby looking at one item, data about which have been selected from stores recordsand from the accounting department. Table 5.1 shows the demand for the itemvaries from one to six per day, with an average of 3.5. The demand is one on ~10% of days, two on 15% of days and so on. Table 5.2 shows that when theitem is reordered it takes from four to seven days to arrive at the warehouse.The cost of holding an item of stock for one day is £1 and the cost of not beingable to supply an item requisitioned is £20.

Page 7: scan0008

The company is trying to find the best inventory policy for this item. Byinventory policy is meant the reorder quantity and the reorder level (the level ofstock which triggers a replenishment order). A simulation is to be used whichwill model the operation of the warehouse over 40 days and calculate the costof running a particular inventory policy over that time.Obviously, the daily demand is an input to the simulation. The average value

of demand (3.5 units/ day) cannot be used because this may mask the peak andtrough effects. A different level of demand must be used each day, but at theend of the period the distribution of daily demand must be almost the sameas in Table 5.1. A second characteristic of the process is that the different dailydemands must occur in random order. For example, a simulation over 100dayswhich had a demand of one/day for the first ten days, a demand of two/day forthe next 15 days, etc., would ensure that the distributions matched but wouldnot be in accord with what would happen in practice, and therefore would notadequately test alternative inventory policies.

Table 5.2 Order lead timeLead time

(days) Probability

4 0.15 0.46 0.47 0.1

--Total 1.0

Table 5.3 Random numbers97 51 88 70 96 77 96 76 18 5480 94 76 58 70 12 58 63 05 1314 02 38 66 86 96 91 42 60 6322 52 78 18 24 77 87 24 08 0696 44 82 84 70 10 08 86 90 7649 15 57 51 92 14 67 83 42 07

The Monte Carlo technique is a method of providing inputs to the simulationwhich satisfy both characteristics. But first some random numbers are required(see Table 5.3). Random numbers are just what they appear: a series of numbersin random order. They may come from a computer-based generating procedureor from a table found at the back of an operational research textbook. Second,numbers are associated with the different levels of demand, as in Table 5.4. Allthe random numbers in Table 5.3 have two digits. The ten numbers (00-09) areassociated with a demand of one unit/day, 15 numbers (10-24) with a demandof two units/day, 25 numbers (25--49) with a demand of three units/day, etc.Whenever a demand level is required in the simulation a random number istaken and the associated demand level is used in the simulation. Going throughthe random number table each demand level has the same chance of occurringas in the original distribution, e.g. there is a 10% chance of using a demand of

Page 8: scan0008

one unit/ day in the simulation. Moreover, the demands used will be in randomorder.The first random number is 97, so the demand for Day 1 of the simulation

will be six since 97 is in the range 90-99 which is associated with a demand forsix. The second random number is 51 so the second day's demand will be four.In this way a stream of daily demands are provided for the simulation which,over a long run, will match what happens in practice.

Table 5.4 Demand distributionAssociated

Demand Probability randomnumbers

1 0.10 00-092 0.15 10-243 0.25 25-494 0.25 50-745 0.15 75-896 0.10 90-99

--1.00

The inventory control simulation involves a fairly simple process. In practice,situations such as the steel distribution problem are likely to be very complex.A flowchart is an intermediate stage which helps transform a verbal descriptionof a problem into a simulation. It is merely a diagrammatic representation ofthe steps that have to be followed in the simulation. It includes the decisionsand actions carried out in operating the actual inventory system as well as theextra steps of recording information during the simulation.In a flowchart, the following symbols are generally used:

<> A question

o A file for recording

Solid lines show the flow of events through time; dotted lines represent move-ments of information. Figure 5.4 shows the flowchart for the inventory problem.

Page 9: scan0008

The first step each day is to see whether new supplies will arrive that day.This requires information from the replenishment file which stores details oforders which are in the system but have yet to arrive. If new supplies are toarrive then the replenishment file and the inventory file (showing the currentlevel of stock) must be updated; if not the simulation moves on to the next step,which is to generate the day's demand by the Monte Carlo method.

Page 10: scan0008

The question is then asked: is the demand greater than current inventory?This requires information from the inventory file. If demand can be supplied,parts are moved from the store and the inventory file is updated; if not, as muchof the demand as possible is supplied and the rest is recorded as lost demandin the lost demand file.The next step is to calculate costs. In this example there are just two kinds

of cost, the cost of holding inventory and the cost of lost demand. Both arecalculated from the appropriate file information.Then, the end-of-day inventory level is inspected to see if it has reached

the point at which a new order should be placed. If so, the replenishment filerecords the place of the new order. Last, the simulation advances to a new day.A flowchart, therefore, describes the logic of the simulation and the way in

which it attempts to imitate the real system. There are other ways of representingsimulations diagrammatically, but flowcharts are the most common. The symbolsused in the flowchart are not standard and other flowcharts may use differentsymbols. Whatever the style of representation, all these diagrams have the samepurpose, which is to describe the logical steps of the simulation as a preliminaryto carrying out an actual simulation.

The flowchart should have clarified the logic of the inventory problem and thesimulation can now be constructed. Table 5.4 showed the demand distributionwith associated random numbers, Table 5.5 gives the lead time distribution withassociated random numbers, and Table 5.6 shows the manual simulations of theinventory problem. In practice it would probably be done by computer but thismanual version shows what is happening inside the black box.

Table 5.5 lead timeAssociated

Days Probability randomnumbers

4 0.1 00-095 0.4 10-496 0.4 50-897 0.1 90-99

-Total 1.0

Page 11: scan0008

Module 5 / Simulation

Table 5.6 Inventory simulation detailsInventory at startof day 1 = 30Reorder quantity = 40Reorder point = 20Stockholding cost = £1/item/day

r--.. Lost demand cost = £20/item

(A) (B) (e) (D)Inventory file Cost file Replenishment file

Day Start Rec~ipts Demand End Stock Lost LD Order Lead Due Oninventory inventory cost demand cost placed time in order

1 30 6 24 242 24 4 20 20 40 7 9 403 20 5 15 15 404 15 4 11 11 405 11 6 5 5 406 5 5 0 0 407 0 6 0 0 6 120 408 0 5 0 0 5 100 40

r--.. 9 0 40 2 38 3810 38 4 34 3411 34 5 29 2912 29 6 23 2313 23 5 18 18 40 18 4014 18 4 14 14 4015 14 4 10 10 4016 10 2 8 8 4017 8 4 4 4 4018 4 40 4 40 4019 40 1 39 3920 39 2 37 3721 37 2 35 3522 35 1 34 3423 34 3 31 3124 31 4 27 2725 27 5 22 2226 22 6 16 16 40 6 32 4027 16 6 10 10 4028 10 3 7 7 4029 7 4 3 3 4030 3 4 0 0 1 20 4031 0 2 0 0 2 40 4032 0 40 4 36 3633 36 5 31 3134 31 2 29 2935 29 2 27 2736 27 5 22 2237 22 5 17 17 40 6 43 4038 17 2 15 15 4039 15 1 14 14 40

~ 40 14 1 13 13 40Total= 758 Total= 280

Page 12: scan0008

The simulation is run for 40 days. There is nothing special about the choiceof 40, but the choice should reflect a cycle which adequately covers the firm'sbusiness. For example, if there are quarterly seasonal variations in demand theperiod covered by the simulation should be at least 250 days to cover a workingyear (and, of course, the generation of daily demand should also reflect theseasonality).On the first day the starting inventory is 30, chosen as a typical inventory

level. In a short simulation this choice might significantly affect the results and,consequently, in some cases simulations are repeated using different startingconditions.In a simulation the operator must define the policies to be tested. For this

inventory problem the policies are defined as specifying the reorder quantity(the number of parts ordered when an order is placed) and the reorder point(the level of inventory which triggers off a new order). The first policy to betested has been selected with these values at 40 and 20 respectively.For the purposes of the example, two types of cost are specified: that of

holding stock and that of unfulfilled demand. The stocking cost is £1/item/ dayand the cost of not being able to meet demand is estimated as £20/item.For each day, column (A) shows the inventory at the start of that day. Ifthe replenishment file shows a new order is to arrive that day, the order isadded to the inventory. Demand for the day is generated using the Monte Carlomethod (see Table 5.7) and subtracted from the inventory to leave an end-of-day inventory in column (B). The cost of holding this inventory overnight iscalculated in column (C). If inventory on hand is insufficient to meet demand,as much demand as possible is met (and inventory reduced to zero) and theremainder is recorded as lost demand. The cost of lost demand is calculated incolumn (D). Last, the end-of-day inventory is compared with the reorder pointto see if a new order should be placed. If so, the quantity order, the lead timebefore delivery (generated via Monte Carlo, see Table 5.8), the date of arrivaland the amount currently on order are recorded in the replenishment file. Thesimulation passes on to the next day.

~Table 5.7 Simulated demand

Random Random Random RandomDay Demand nos Day Demand nos Day Demand nos Day Demand nos

1 6 97 11 5 80 21 2 14 31 2 222 4 51 12 6 94 22 1 02 32 4 523 5 88 13 5 76 23 3 38 33 5 784 4 70 14 4 58 24 4 66 34 2 185 6 96 15 4 70 25 5 86 35 2 246 5 77 16 2 12 26 6 96 36 5 777 6 96 17 4 58 27 6 91 37 5 878 5 76 18 4 63 28 3 42 38 2 249 2 18 19 1 05 29 4 60 39 1 08

10 4 54 20 2 13 30 4 63 40 1 06

Page 13: scan0008

Module 5 / Simulation

Table 5.8 Simulated lead times

Reorder Lead time Random Reorder Lead time Randomnos nos

1 7 96 6 5 102 5 44 7 4 083 6 82 8 6 864 6 84 9 7 905 6 70 10 6 76

Note that Tables5.7 and 5.8 show the generated demands and lead times usedin the simulation. The random numbers are taken from Table 5.3. The first fourrows are used for the demands, and the fifth row for the lead times.

At the end of the 40 days the total costs are calculated and recorded. Table 5.9shows that for this policy the stockholding cost is £758 and the cost of the lostdemand is £280,making a total of £1038.On 10%of days demand was not fullymet. This can be checked from Table 5.6.Table 5.9 shows the results of running the simulation for other inventory

policies. The best appears to be with reorder quantity (ROQ) 30 and reorderpoint (ROP)20. It is to be expected that a policy with a low reorder quantity isgoing to work out well. Such a policy would involve making a lot of reorders,each for a small quantity. Since the cost of the administration required fora reorder has not been included, this is not penalised. A more sophisticatedsimulation would include this cost.The simulation has only tested the policies defined for it. It may be that

policies such as (ROQ 30, ROP 19), (ROQ 30, ROP 21), etc., work better. Thereare very many combinations that could be tried to find a true optimum. The timeand cost involved may not make it worthwhile and an approximately optimalsolution may be the final result.

Table 5.9 Simulation summary

Costs

Policy Stockholding Lost Total % days outdemand of stock

ROO 40 758 280 1038 10ROP 20

2 ROO 50 1067 220 1287 5ROP 20

3 ROO 30 627 220 847 5ROP 20

4 ROO 40 677 360 1037 12.5ROP 15

5 ROO 40 866 160 1026 5ROP 25

Page 14: scan0008

The results in Table5.9 are based on a particular set of random numbers, whichgenerated the demand and lead time variables. While the numbers were certainlyrandom, purely by chance they may have been in some way unusual. Thedemand and lead times would then not be representative of their distributions.For example, if the random numbers tended to be high, the demands would behigh and the lead times long. Repeating the simulation for the (ROQ 40, ROP20) policy but each time generating new sets of random numbers (and thereforeof demands and lead times) allows the policy to be evaluated on different datapatterns. The results are shown in Table 5.10. The policy gives total costs rangingbetween 787 and 1038. With such variation it would be dangerous to base adecision on a test over just one 40-day period. The simulation should be runmany times and the average costs for each policy compared.

Table 5.10 Policy 1 with different random numbersCosts

Trial Stock- Lost Total % days outholding demand of stock

1 758 280 - 1038 102 816 120 936 7.53 796 140 936 7.54 787 0 787 0

The number of simulation runs required in order to be reasonably satisfiedwith the final decision almost certainly means that even a simple simulation likethe inventory problem needs to be put on the computer.Table 5.11 shows the results of testing the same policies as in Table 5.9.

However, instead of just being from one 40-day simulation, the results are theaverages of fifty 40-day simulations. Table 5.11 confirms the earlier results, andbacks up the intuitive reasoning that a low reorder quantity policy will give thelowest costs of making orders.

Table 5.11 Averages of fifty 40-day simulationsCosts

Stock- Lost % days

Policy holding demand Total out of stock

1 ROQ 40 849 45 894 0.9ROP 20

2 ROQ 50 1015 58 1073 1.1ROP 20

3 ROQ 30 647 94 741 1.8ROP 20

4 ROQ 40 718 206 924 3.7ROP 15

5 ROQ 40 1018 2 1020 0.1ROP 25

Page 15: scan0008

While several different random number streams should be used to evaluate apolicy, it is important that the same streams should be used to evaluate otherpolicies. The reason is that the results from two policies should differ becausethe policies are different, not because they have been tested on different demandpatterns. For example, in Table 5.11 each policy was evaluated over 50 runs.The same 50 streams were used for each policy so that like is compared withlike. Most computer programs cater for this by asking the user to specify thestarting random number. If the starts are the same, the streams will be the same.Each of the 50 runs had a different starting number, but the same 50 startingnumbers were used for each policy.A simulation does better than just measure the average costs of different

policies. The risks can also be compared. Risk is indicated by the frequencyof trials for which very high costs are recorded. Two policies may both haveaverage costs over many runs of, say, 900, but if policy A had a range of 600-1200for individual runs, it would be regarded as more risky than policy B with arange of 850-950. In this case risk is also indicated by the percentage of days onwhich demand is lost. Lost demand, besides its financial implications, may alsohave important non-quantifiable disadvantages such as customer dissatisfaction.The 'best' policy may then be decided by making a trade-off between averagecost and percentage of days lost.A relatively small computer program (about 100 lines) is sufficient to perform a

simulation such as this. The key factors involved in using this type of simulationare summarised in Table 5.13 at the end of the module.

The example just given was of a physical simulation. Other examples of physicalsimulations are the arrivals and departures of ships at a port to determine theprovision of facilities, and the simulation of a supermarket to determine theprovision of checkout desks. The steel distribution example was also a physicalsimulation. Note the difference between simulations of physical situations (suchas transporting steel) which may still be based on mathematical models, andphysical models such as wind tunnels.When a stochastic simulation uses the Monte Carlo technique to model cashflows it is called a risk analysis. For example, risk analysis could be used tocompare ways of providing production facilities for some new product of acompany. One of the stochastic variables might be the rate of growth of sales ofthe new product. In this case the simulation is run many times as if the capitaldecision were being taken many times over (compare the previous examplewhere the simulation was run over many days). For each run a different growthrate is used (as selected via Monte Carlo) and a different present value (orinternal rate of return) is calculated. Over many runs a distribution of presentvalues is obtained. Not only is the average present value calculated, but alsothe risk (hence the name of the technique) of obtaining an unacceptably lowprofit from the project. A risk analysis does not differ from other stochasticsimulations because any new technique is involved. It differs only in terms ofits application (to financial problems).

Page 16: scan0008

A small town took its gas supply from a gas manufacturing plant located in thetown. The plant supplied gas only for the town and its immediate environment.It was, however, very old and had reached the point of being beyond repair. Itwas likely to cease functioning within two years. The local gas company hadthree options:

(a) Close the plant down, sell off the site and cease supplying gas to thetown. This would mean that existing customers had to be compensated forexpenses incurred in cutting off the supply and their need to purchase, forexample, a new electric cooker.

(b) Close the plant down, but build a liquid natural gas (LNG) plant on thesite. This would be virtually a pumping station. LNG would be brought tothe town by tanker, converted to gas and pumped to customers just likethe gas from the old gas plant. The plant is cheap, the LNG and cost oftransport expensive. -

(c) Close the plant down and sell off the site, but extend a nearby North Seagas main (60 miles away) and supply the town with North Sea gas. At thetime of this decision most of the United Kingdom had just been coveredwith a network of North Sea gas mains which supplied most of the countrybut it had proved uneconomic to extend it to smaller places in rural areas.It was not originally intended to supply the small town in question withNorth Sea gas. Extending the main would be very expensive, but only asmall pumping station would be needed in the town.

The gas company wanted to evaluate the three options by measuring theirpresent values. A straightforward calculation of present value would not, it wasthought, fully reflect the great uncertainties involved. The costs of extending themain, compensating cut-off customers and the rate of growth of demand, if, forexample, North Sea gas should be available, were all variables which were notknown with any certainty. It was decided to use risk analysis.

The cash flows resulting from each of the three alternatives were simulatedover a 25-year period. For each alternative, 100 runs were made using differentvalues for the 'uncertain' variables generated by the Monte Carlo technique. Thedistributions of the 'uncertain' variables which were the basis of the Monte Carlotechnique had to be obtained in a different way from those in the inventoryproblem. In that problem the demand and lead time distributions were obtainedfrom past records. The same was true (with the addition of some forecasting)for the example of demand distributions of steel products. In this example therewere no past records and the distributions had to be assessed subjectively. Forexample, using standard assessment techniques, engineers had to estimate, indistributional form, the capital cost of extending the North Sea gas main. Theresult was distributions of capital building costs, demand growths, operatingcosts, etc., which in the eyes of managers more accurately represented what was

Page 17: scan0008

likely to happen than the single-point estimates which would otherwise havebeen used.The output was, for each alternative, 100 calculations of present value repre-

sented as a distribution (see Figure 5.5 and Table 5.12). The decision as to whichoption to adopt was taken in the light of information about the likely spread offinancial results rather than just the average. In other words, the risk associatedwith an alternative was taken into account as well as the likely present value.

-1000 0Present value (£0005)

Table 5.12 Results of gas simulation (£OOOs)Option Average Range of

present value present values

Withdrawal

LNG

Extension

-193 --692-471

-710 - -50-1400 - +250-2200 - +1200

Although the 'withdrawal' option is the best in terms of both average presentvalue and range, it was decided that it was politically unacceptable. The gascompany chose the next best option according to average present value, 'exten-sion'. Since this option gave the best chance of making a profit (of up to £1.2million), the company used this information to argue that this was in fact thebest option overall.

Simulation is a much less restrictive aid to decision making than the optimisa-tion techniques such as mathematical programming and decision analysis. Thepreconditions for being able to use the optimisers (e.g. linearity in LP) do not

Page 18: scan0008

apply to simulation. This is one of the major reasons for its use. It has the furtheradvantage that it is not as mysterious to non-quantitative managers as some ofthe mathematical techniques. Most people can understand what a simulation isby reference to analogies such as wind tunnels. As a result they are more likelyto have confidence in simulation and to make use of it in their decision making.On the other hand there are some drawbacks in using simulation which may

not be readily apparent. The major shortcomings are as follows.

(a) It can be an expensive technique. Simulation models tend to be large, whichmeans they take a long time to develop and are expensive.

(b) The data on which the simulation is based are often not readily available.The collection of the data, especially the subjective distribution, may takesome time.

(c) It relies on the creativity of the operator. The technique can only indicatethe best policy of those tried. If poor policies are tried out, a poor decisionwill result.

(d) Establishing the validity of the m0del is time-consuming. A rigorous seriesof tests may be required to determine the accuracy of the calculations andto throw up any logical errors in the methodology, especially when it iscomputer based.

(e) Since the nature of simulation (non-optimising) requires many differentpolicies to be tried out, it is inevitable that it will take time to get areasonable answer from it.

It is rare for a manager to have to develop a simulation. However, a range ofsoftware products is now available which make it easier for a non-programmerto build a simulation. The manager's interest is more likely to be in the manage-ment of its development as with, for example, the construction of a corporatemodel. In this case it is essential to be aware, in general, of what a simulationcan do, and of its drawbacks.

Table 5.13 Key factors in using a simulation1 Structured approach

2 Length of period covered

3 Number of runs

4 Same/different random number streams

S Influence of starting conditions

On the other hand, the manager may well wish to use a simulation. Forinstance, he or she may wish to ask 'what if' questions of a corporate model.Some key factors in the use of a simulation are shown in Table 5.13. Theywere discussed earlier in the context of the inventory example. Perhaps themost important of these factors is the adopting of a structured approach to thesimulation. If many policies are feasible then, if the simulation is computerised,it is easy to tryout policies almost at random. A better approach is to plana series of trial policies which are so structured that the range of optionscan be narrowed down until a nearly optimal one is obtained. Initially, policies

Page 19: scan0008

covering the whole spectrum of possibilities should be tried. This should indicateobviously unreasonable options, and suggest sections of the spectrum whichneed further investigation. These sections will be explored so that a furthernarrowing down is possible and so on. It is especially necessary to structure anapproach in examples such as the inventory problem and the steel distributionproblem where there is a wide range of possibilities. In other cases, for examplethe gas industry problem, the options are predefined and structuring becomesless vital.

5.1 Is each of the following statements concerning the use of simulation true orfalse?

A Physical models are never used in business-related simulation.

S It is worthwhile using simulation only where the variables have probabilitydistributions.

C Simulation is applied to financial as well as operations problems.

D Simulation allows the decision maker both to compare policies and to testthe effect of assumptions.

5.2 Is the following statement true or false?

Risk analysis and Monte Carlo simulation are the same thing.

5.3 The advantages of simulation over optimisation techniques are:

I It needs smaller amounts of data.

II It can be applied to a wider range of situations.

III It selects the best possible decision.

Which of the following is correct?

A II only.

S I and II only.

C II and III only.

D I and III only.

5.4 In a Monte Carlo simulation random numbers between 000 and 999 are allo-cated to the following demand distribution.

Demand34567

Total

Probability0.200.250.250.150.151.00

Page 20: scan0008

What numbers should be applied to the demand level 4?

A 200-450.B 201-451.C 200-400.D 200-449.

5.5 In a Monte Carlo simulation random numbers have been allocated as in thetable below.

Demand Probability Associatedrandom numbers

1 0.10 00-092 0.15 10-243 0.25 25-494 0.25 50-745 0.15 75-896 0.10 90-99

-- ,--,-1.00

What is the demand associated with the random number 75?

A 4.

B 5.

C 15.

D 75.

5.6 What is the reason for running a Monte Carlo simulation many times for eachpolicy and set of assumptions and computing average results?

A To average out any distortion caused by a particular random numberstream.

B To compensate for the effect of possible inaccuracies in the assumptions.

C To test different policies.

D To justify the use of normal distributions.

5.7 Is the following statement true or false?

In a time-based simulation the time period covered should be as long as possible.

5.8 The two profiles in Figure 5.6 relate to simulations of the cash flows fromprojects X and y.

Which of the following is correct?

A X is superior to Y.

B Y is superior to X.

C X and Yare equal.

D Without knowing the decision maker's view of risk, it is impossible to saywhich project is superior.

Page 21: scan0008

20Cash flow (£ million)

5.9 Is the following statement true or false?

A robust 'best' decision is one that always stays best no matter how muchunderlying assumptions may vary.

5.10 Is the following statement true or false?

A structured approach to the use of a simulation model is necessary to reducethe amount of work involved in concluding which of many possible decisions isthe best.

A company in the leisure industry has a division specialising in the manufactureof all types of indoor and outdoor games and pastimes. The development sectionhas devised a new garden game for up to four people based on cricket. Theyplan to market it in time for next summer. The sales manager has estimated thedemand (Table 5.14).

DemandProbability (%)

5203525105

10000-1200012000-1400014000-1600016000-1800018000-2000020000-25000

Page 22: scan0008

1 How would this distribution be sampled for use in a simulation of thelikely profitability of the game? In particular what would be the demandassociated with the numbers 79, 18and 52 from a two-digit random numbertable?

A branch of a bank has eight serving counters, but not all them are mannedat anyone time. The bank wishes to simulate its operations to determine howmany should be manned between 9.30 am and 12.00 am. During these hoursthe distributions of (a) the number of customer arrivals per minute and (b) theservice time (the time a customer is actually dealing with a cashier) are bothknown, having been derived from a recent survey. A new customer will alwaysjoin the shortest queue. The output of the simulation will consist of informationon the percentage of time cashiers are busy, average queue length and averagetime a customer spends waiting.

1 Draw a flowchart for the simulation.

A pharmaceutical company has developed two new medical products to thepoint where they are ready to be launched. Both require the same initial invest-ment. Budget restrictions mean that the company can launch either product butnot both. A risk analysis of the cash flows over a 25-year period produces theresults shown in Table5.15. Plotted on a graph, both sets of cash flows have theshape of a normal distribution.

Product A

Product B

Average presentvalue (£ million)

120

150

Standarddeviation

1 For each product what is the probability of:(i) A loss?(ii) A profit?

2 Which product should be launched?

Note: To answer this case study it is necessary to know that for a normaldistribution:

68%of distribution lies within ±1 standard deviation of the mean

95%of distribution lies within ±2 standard deviations of the mean

Page 23: scan0008

A local authority owns and runs a motor vehicle garage and workshop which,amongst other things, is used for servicing the vehicles of the public-owned localbus company. By law, each week every bus has to be inspected. The inspectiontakes 30 minutes, after which, if the bus has no faults, it returns to duty. If thebus has minor faults they are repaired there and then. If the bus has a majorfault it is taken elsewhere for repairs.The time spent by a bus at the inspection facilities can be as little as 30minutes(if it has no faults or has major faults). Should minor repairs be required thetime spent can be up to four hours. The distribution of time spent at the facilitieshas been constructed from historical records and is shown in Table 5.16. Thetime is to the nearest 30 minutes because this is what is shown on the inspectionrecords. Buses are taken to the inspection centre when schedules allow. Thearrival rate distribution has been derived from past records and is shown inTable 5.17. The inspection facilities comprise three identical and adjacent units,each of which deals with one bus at a time.

Time spent(minutes)

306090120150180

210240

Table 5.17Number of

buses arriving in3D-minute period

o1

2

34

5

Because of reductions in public spending, and because it is felt that the unitscan be left unused for large parts of the day, it is planned to close one of thethree units.

Page 24: scan0008

This has caused a great many complaints from trade unions and local politi-cians who say that the reduction will lower safety standards. They also arguethat a two-unit workshop would in fact be uneconomic because of the greatertime buses will spend waiting for an inspection.The Chief TrafficEngineer has decided to simulate operations at the inspection

facilities to produce facts and figures concerning the effect of having two unitscompared to three.

1 How should the distributions be handled in the simulation?

3 Which factors are relevant to the argument taking place, i.e. what shouldthe output of the simulation be?