Extension with a Clock

In this section we show a simple extension with a clock. First one has to built a new model called clock (cf. figure 3.18 ). A clock takes as an input a given time represented by the input parameter $TIME$ and increments the given value by one unit of time. In the model clock is this realized by a constant with value '1'. The increment is done by a simple addition. The result is the new value of $TIME$.


$\displaystyle \textbf{clock}$ $\textstyle :$ $\displaystyle TIME \times \{1\} \longmapsto TIME$ (3.10)

Figure 3.18: Simple Clock
\includegraphics[width=2.0in]{clock_model.eps}

The output of such a clock is a monotonic increasing value (see figure 3.19.) Which kind of value this is has the modeling person to define. In our example is one unit one year of the real world. But it could also be a month, a week, a day, a minute, etc.

Figure 3.19: Simple Clock Output
\includegraphics[width=3.0in]{clock_output.eps}

When a new clock model is available, then one can use this model as a new building block. Taking the old f1c model one can now extend this model with a clock just by clicking on the clock and draw it into the construction field. The result can be seen in figure 3.20. After storing this new model there is now another new model called f1d which has as building blocks the old f1c model and the clock model (cf. figure 3.21).

Figure 3.20: Function f1c extended with clock
\includegraphics[width=2.0in]{f1c_with_clock_f1d.eps}

Figure 3.21: New copmpound function f1d containing f1c and clock
\includegraphics[width=2.0in]{f1d.eps}

Starting a simulation with the f1d model one can now select for the X-Axis as parameter the $TIME$ parameter of the f1d model. This means the values of the $TIME$ parameter are shown along the X-Axis. if one takes the year '1961' as start value for $TIME$, then will the X-Axis show all the years from 1961 onwards incremented by one (see diagram 3.22).

Figure 3.22: Graphical output of f1d with years along the x-axis
\includegraphics[width=4.5in]{f1d_run_years.eps}

Gerd Doeben-Henisch 2009-12-09