Set Action

Definition:

The Set action sets the value of an Attribute of the agent or the value of a Simulation Property to the computed value of a Formula.

The attribute or the simulation property to be set is displayed in the action's text field. The value to set the attribute to is displayed in the action's Formula parameter.

Parameters:

attribute, formula

Example:

The Factory agent in the Sustainopolis simulation computes pollution as the average of the pollution of the things around it, plus an additional amount which represents the pollution from the factory itself.

The formula used is [(pollution[left] + pollution[right] + pollution[up] + pollution[down])/4.0 + 0.4

See the Sustainopolis simulation.


| Next | Previous | Reference Manual | Getting Started Manual |