SMAS 2.0bA Primer |
4. The Factorial Example (SC-1)
It is also possible when running the simulation to display the contents of particular agents. This is done by switching the pull down list to agent mode using the "scen./agents" button, and double clicking on the agent to be watched. A window appear right underneath the SMAS control pannel. Viewing the contents of agents has only meaning when in cycle or step modes. Opening or closing an agent window can be done at any time.
An agent window has several areas described here.
NAME tag (upper left corner), e.g., FACTORIAL
"status" indicator repeating the color of the Message Diagram window.
"task-id" indicating which task if any is being executed by the agent.
"action: task parameters" indicating what skill is being used and parameters.
The second row displays
"subtasks" indicating if subtasks are currently active
"environment" a special area used by the designer to comunicate information among functions implementing skills.
The left upper pane is the delayed-input tray where all input messages not ready to run are saved.
The left bottom pane is the input-messages tray containing messages that are ready to run.
The right pane is the delayed-output tray containing messages that are not yet ready to be sent.
The following screen shots show the state of the three agents FACTORIAL MUL-1 and MUL-2 at time t=9.
One can see that FACTORIAL is executing the DUMB-FACTORIAL skill to compute 4! In the SC-1.11 task. It has spawned a subtask ST-11, and is in a waiting for answer state (yellow). MUL-1 is in a busy state, executing subtask ST-11 (MULTIPLY 4 by 3. It has a message with the answer stored into its delayed-output tray ready to be sent back to FACTORIAL at t=10.
This corresponds to the following Message Diagram.
The following subsections contain some brief comments about running the other scenarios found in the FAC demo.
Copyrignt Jean-Paul Barthès@UTC, 1998 Last update, Jan 99