How do I use the ANIMATE Statement?

The ANIMATE statement allows the control of the animation speed through the action logic dialog. This statement is especially useful when preparing a model to show specific behaviors.

Syntax

ANIMATE(speed)

speed A numeric value between 0 and 100. One is the slowest and one hundred is the fastest speed of animation. A speed of zero turns the animation off.

Example

In the first example, the ANIMATE statement is used to turn the animation off so that the model will run ahead in time quickly. In the second example the speed of the animation is set very slow (usually to show a particular entity or activity). In the third example the speed of the animation is set to the highest possible speed with animation still on (often used to help the user gain a “feel” for the general flow and buildups that would occur over time.

1) animate(0)
2) animate(10)
3) animate(100)

The ANIMATE statement is usually implemented by placing a separate entity, arrival, and activity combination in the existing model. This model segment may be placed at any location on the layout. Placing the segment on a separate layer allows hiding the layor and model segment from view.

Control the speed of the animation using the ANIMATE statement.

In the example above, a single periodic arrival (time between arrivals set to zero) arrives at zero time. Immediately the action logic starts. The animation shuts off and runs instantly to 8 hours. After eight hours the animation speed becomes 20. The speed depends on the number of items concurrently in the simulation, so experiment to achieve the correct speed for your purpose. The simulation runs for another 9 hours then turns the animation off and runs until completion. Modify the example to change the animation results for you particular pupose.

Logic Statements:

Was this article helpful?

Related Articles