Simulation is the process of developing a model to represent a real-life situation. Well-known examples of simulation include wind tunnels for simulating the movement of objects such as aeroplanes and cars through the atmosphere. Other simulations include models of the weather and the economy, both of which are far larger and more complex than anything we will attempt here.
(The world's largest computer is the Earth Simulator in Japan.)
Think about the use of electricity in your own home. The amount of electricity used at different times of the day might be simulated by estimating the probability (or chance) that a light or appliance might be in use. The probability will change in the course of 24 hours, being low in the middle of the night and high in the early evening.
Let us say that a light uses 100W of electricity and an appliance uses 500W. The chance of one of these items being used in any given hour might be modelled by a random value in the range 1-100:
=TRUNC(RAND()*100)
Let us divide the day into three parts as follows:
(You might choose different periods or values according to what happens in your house; the problem for planners is that they have to work on averages.)
We can now start to develop the spreadsheet.

The IF functions in E3 and G3 are very similar and can be drag-copied into the cells underneath. The IF function does the following:
Note that the calculation of electricity used (in E3) is $B$2 * $E$2. The $ symbols are used to fix the values used in the formula when drag-copy is applied. The corresponding formula in G3 is $B$2 * $G$2.
Press the Back Button to return