Network Dynamics

Basically, a SNTOOL-AN has four main states:

  1. Initialization: in this phase all page instances (following an instantion tree) and initial objects are created. This happens only once.
  2. Evaluation: all agents (active objects) propose possible actions. These actions involve other objects present in the network (in other places or even in the same place, depending on the configuration of the links). To each proposed action the agent assigns a utility value and an access mode to each object present in the action.
  3. Perform: after all action are analysed by the engine solver, a subset of the original set of actions is reached. This set, called final solution is effectively executed.
  4. Finalization: in this phase all page instances and remaining objects are finalized. This happens only once.

Actions can be thought as proposals that, depending on the result of competition with other agents, represent intentions to perform a given activity. They are the underlying mechanism by which agents realize the dynamics in ANs. Each action has a utility value that describes the interest an agent has in firing and an access mode to each input object (objects indicated in the action by the requester agent). An access mode describes the type of interaction is proposed by the agent. There are three basic types of access modes:

An AN model is composed by a collection of classes and pages. Each AN class is mapped to a Java class. There are two types of AN classes:

  1. Internal: These are the genuine AN classes (follow the formal model), and may contain sensors, effectors, states and functions.
  2. External: Allows the use the any* external Java class inside the SNTOOL simulation engine as if it was a genuine AN class. In this case the user must provide the class FQN (fully qualified name) and the code generator will create another class that adapts this class to the system requirements.

The SNTOOL Code Generator creates a stub Java class for each class specified in the designer. There are three basic types of methods which are of particular interest to the user. Generally, they are, considering a field (sensor, effector, or internal state) named X of type XType:

Method Description S IS E
void put_X(XType v) Stores v in field X - X X
XType get_X() Gets a reference to the content of field X X X X
XType release_X() Removes the content the field and returns it X X X -
void access_X(int aMode) Specify the access mode for the object comming through sensor X X - -
int access_X() Returns the access mode specified for the object comming through sensor X X - -

Method Description
void setUtility(double u) Specify the utility for the current proposed action