Rules determine how the model evolves with time. The procedure is as follows: for each agent the program finds an applicable rule by trying them in the same order as they appear in configuration file. If applicable rule is found the attributes of the agent are changed as specified by that rule. If applicable rule is not found the agent remains unchanged. A rule is applicable if two conditions are true - the agent class of the current agent matches the agentclass of the source agent specified in the rule and the function specified in the condition statement returns non zero value.
Note after the rule is applied the resulting agent is stored until all the agent have been processed. This insures that previous attributes of the agent would be available for computations with other agents.
Example:
rule 'basic' becomes 'basic' condition "true" attribute 'cache' "evolve_repertoire_basic" end
The section is composed of the keyword rule followed by the source agentclass name in quotes, followed by the keyword becomes followed by the target agentclass name in quotes. If rule is matched the agentclass class of the agent is changed from source agentclass to target agentclass.
Two kinds of directives are available:
If there is no attribute directive for a given attribute that attribute remains unchanged when the rule is matched.
See also About Ps-i 2.4.