76
X-Machines for Agent-Based Modeling: FLAME Perspectives
double foxY
rabbitEaten
Rabbit eaten message
int rabbitID
rabbitInformation
Rabbit information message
int rabbitID
double rabbitX
double rabbitY
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.
X-Machines for Agent-Based Modeling: FLAME Perspectives
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.
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:
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.
