Lesson 2


Why do we use simulations?


In this lesson we explain some of the motivations for using simulations:

We have also extended the two examples from the previous lesson.

Simulation means using a model that mimics the behaviour of a real world system. While this model can be quite complex it is still only an approximation of the real world system. It seems that is always better to investigate the real world system directly and forgo the trouble of making a good simulation. Yet, sometimes one is forced to resort to simulations.

For instance, new pilots usually train in very advanced flight simulations before they are allowed to fly in a real plane. Not only does this cut down in costs of kerosine, plain repairs etc., but it is also safer for the inexperienced pilots and the public. Thus, the use of simulations can cut down costs and actually contribute to public safety.

Also, some real world systems are too dangerous to experiment with. One does not really want to experiment directly with the flight control system of an airport, or the control system of a nuclear power plant. If something goes wrong there could be a lot of casualties. With use of simulations one can first test the modifications one wants to make to the real world system before actually applying them. Thus, the use of simulations makes it possible to modify and test vital systems.

Further more, experimenting with real world systems can be very time consuming. If one wishes to optimize the number of cashregisters in a supermarket one will have to change the number of cash-registers and each time observe what effects these changes have on the queues of customers. This may take weeks of changing the number of cash registers and observation of the queues. On the other hand, one can easily run the simulation a few times, each time with a different number of cash registers, and analyze the data. Thus, simulations are usually more flexible than real world systems and are therefore easier to manipulate.

As could be seen in the previous example, it is much easier to modify simulations than real world systems. The ultimate way to investigate a system is usually to modify it, variate variables and analyze what kind of effects this has on the system. Since most real world systems are either too rigid, too dangerous or to costly and time-consuming to experiment with the best way to investigate is by use of simulations.

An important feature of simulations is the collection and analysis of data. During experimentation, while changing the parameters, one can collect various information about the system. Afterwards one can compare the results of the experiments and choose the parameters that optimize the system.

For instance, we simulate a queue in front of a cash register in a supermarket. One can keep track of the queue length at different points in time. During the simulation we can make snapshots (for instance every 5 seconds) and count the length of the queue. Another possibility is to collect the queue time, denoting the time that a person stands in a queue waiting to be helped. If we collect this information for all the people that join the queue during the simulation, we can calculate various statistics for the waiting time and the queue length, such as the average, the standard deviation, the distribution function of these variables, the minimum and the maximum.

You may wonder what use we have of this sort of information. In the supermarket example, the queue length is important if you want to know how much space is needed in front of the cash register. If the waiting time is too long people may leave the supermarket. Therefore it is important not only to know the average waiting time and the average queue length but also to know the maximum waiting time and queue length. Suppose the average waiting time is acceptable, but one person has to wait very long (the maximum waiting time). This person may leave the supermarket before buying anything and losing customers is not proffitable.

At several times during the day there are a lot of people in the supermarket, but there are also hours when there are just a few people in the supermarket. Thus sometimes one has to wait longer than at other times, but the average waiting time over the entire day doesn't show this fact. In this case it is important to know more about the standard deviation and distribution function. Finally we know all the statistics for different kinds of input and we can choose the parameters wich gives us the optimal results.

In the following examples we will show the newly discussed concepts: