76
X-Machines for Agent-Based Modeling: FLAME Perspectives

doublefoxY





rabbitEaten
Rabbit eaten message

intrabbitID




rabbitInformation
Rabbit information message

intrabbitID
doublerabbitX
doublerabbitY





4.7.3 C Function
Function files define the source code for implementing agent functions.
These are included in the compilation script (Make file) of the produced model.

agent_1_source.c
agent_2_source.c

Modelers can access agent memory variables by using CAPITALS such as
FOXX, FOXY for agent memory variables as defined in the xml file. This file
needs to be included in the functions files by the following command:
_agent_header.h
A few rules when writing agent functions involve:
• All agent functions should return ‘0’. If the function returns ‘1’, the
agent dies in the simulation.
Précédent

- 105/329

Suivant