SMAS 2.0bA Primer |
4. The Factorial Example (SC-1)
The same result can be obtained by cycling through the simulation.
Each time one clicks the "MORE" button the simulator advances half a cycle. This will be explained readily.
The graphics trace is built piece by piece, and message still appear in the Listener window with more information about the different cycles.
To follow the trace, one should understand how the simulator works. Each cycle of the simulation process is divided into 2 steps. During Step 1, the simulator distributes the various messages among agents if their time has come. Once messages have been exchanged, during Step 2, the simulator takes each agent in turn and tries to execute messages that are ready to execute provided the state of the agent allows it. A message indicates which step has been executed and also the number of total pending tasks in the system. When the pending tasks number becomes 0, then the simulation stops. Note that executing a scenario is a task (which start at end of cycle 0).
Copyrignt Jean-Paul Barthès@UTC, 1998 Last update, Jan 99