Package-level declarations
Types
Base implementation of an ILsaAction, executed on the ILsaNode hosting its reaction.
A SAPERE agent stub, which can only modify the molecules matching the templates passed at construction time. Agents are not meant to be cloned.
A SAPERE agent aware of the environment hosting its node.
A SAPERE agent moving the node hosting it in the environment. If a molecule template is provided, the agent modifies (locally!) the molecules matching it, otherwise it does not modify any molecule (e.g., an agent that just moves a node).
A SAPERE agent that modifies something on neighboring nodes.
Adds the LSA molecule to all the valid neighbors. The molecule can be different from a neighbor to the other, because some special variables (e.g., #D) are specific for each node: N molecules are instanced if there are N neighbors. The randomGenerator is unused, and can be null.
Moves the node towards the neighbor with the lowest value of the template LSA (typically a gradient) in position pos, by at most LIMIT along each axis, unless that neighbor is active.
Moves the response LSA to the last neighbor found with a lower gradient distance, adding the distance to that neighbor to the distance carried by the response.
Picks at random a type in listTarget other than the one matched by the variable OldType, and adds it to the matches as the variable targetVariable. The execution has no effect on the influenced molecules of the reaction.
Counts the neighbors containing in their LSA space a molecule matching moleculeToCount, and adds the result to the matches as the variable countVariable. The execution has no effect on the set of influenced molecules of the reaction. The randomGenerator is unused.
Adds the LSA molecule to a neighbor: the one selected by a previous neighborhood condition, if any, otherwise a random valid neighbor drawn using randomGenerator. Example: +<id, X, n>.
Adds the LSA molecule, with its variables allocated using the current matches, to the local node. The randomGenerator is used to allocate #RAND, if present.
A chemotaxis implementation for SAPERE, namely, an agent able to move the response molecule towards the node whose ID is in position idPosition of the matched gradient template.
Matches template, removes a single instance of it from the current node, and moves it to destination. Since the destination could be anywhere in the system, this action may trigger a large number of updates, slowing down the whole simulation. Handle with care.
Follows a GPS trace on the streets, slowing down by the interaction factor near the nodes tagged with tag within range. The reaction is used to compute the movement length, the node walks at an average speed.
Walks on the streets following the gradient described by templateLSA, whose argument in position neighPos contains the next hop, slowing down by the interaction factor near the nodes tagged with tag within range. The reaction is used to compute the movement length, the node walks at an average speed.