72
X-Machines for Agent-Based Modeling: FLAME Perspectives
4.7.1 Adding Complexity to Models
Once an initial specification of the model has been drawn up, modelers can
update the description with more complex behavior for agents (Figure 4.4).
Table 4.1 shows the model details such as agent memory variables, functions
and messages generated.
Updated Scenario: “Foxes are chasing the rabbits, and rabbits are
dodging the foxes. The foxes have a life expectancy of 10 days. Assuming
every iteration is representing a day.”
TABLE 4.1: Model parameters for fox and rabbit example.
Model Definition Variable
Agents
Fox and Rabbit
Fox memory
x position, y position,
fox agent id, life Expectancy
Rabbit memory
x position, y position,
rabbit agent id
Fox functions
Chase rabbits, check
life expectancy
Rabbit
functions
Dodge foxes
Messages for fox
agent
Output: fox location
message; Input: rabbit
location message; Output: eaten message
Messages
for
rabbit agent
Output: rabbit location message; Input:
fox location message;
Input: eaten message
4.7.2 XML Model Description File
Models descriptions are represented in XML formats, allowing them to
be human and computer readable. The DTD (Document Type Definition) of
the XML document for FLAME has gone through various updates (located at
http://www.flame.ac.uk/docs/), modifying and adding xml tags as the models
became more complex in FLAME simulations. In general, the model file needs
to contain the basic elements:
Précédent

- 101/329

Suivant