This project is read-only.

Sim type

The sim type allows interaction with the simulation process. It's methods can be applied to either generic and planner simulations.

sim:time

Provides the current system time. It's only available within event actions, otherwise (before or after the simulation) it's equal to 0. Can be used in ending conditions of event emitters. The time is updated by the simulation core when a new event occurs.

sim:takes(float time)

Defines the time required to process the current event.

By default, all events are immediate and do not occupy the processors. However, if you need to model a situation when the time required to process the event is significant, you can call this method in the event action body. It will keep the processor occupied until enough time passes.

sim:takes can be called several times within one method. In this case, the time will be added.

This method does no effect when called within a planner simulation.

sim:stop

The sim:stop method causes the simulation to stop prematurely.

Last edited May 13, 2011 at 10:48 PM by impworks, version 4

Comments

No comments yet.