Methods

From AgentSheetsWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and de...")
Line 1: Line 1:
An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and determines when the method will be called. Triggers that label method boxes in the Visual AgenTalk language behavior editors include:
An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and determines when the method will be called. Triggers that label method boxes in the Visual AgenTalk language behavior editors include:
-
* While running: the agent's main method is labeled with the While Running trigger. This method is repeatedly called at each simulation cycle (time step) while the simulation is running.
+
* While running: the agent's main method is labeled with the While Running trigger. This method is repeatedly called once at each simulation cycle (time step) while the simulation is running.
-
* On
+
* On <method_name>: a user-defined method that gets called by the agent that contains it or any other agent using the Message or the Broadcast action.
-
* When Creating A New Agent
+
* When Creating A New Agent:
* On Mouse Click
* On Mouse Click
* On Mouse Hover
* On Mouse Hover
The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.
The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.

Revision as of 14:23, 8 August 2011

An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and determines when the method will be called. Triggers that label method boxes in the Visual AgenTalk language behavior editors include:

The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox