Getting Started with FLAME
67
• Partitioning.o - Object file.
• Rules.c - Functions created to handle conditions in the model. The file
has been deprecated in FLAME v1.0. Functions can contain conditions
on timings such as
iteration_loop%20 ==6 return 1 else return 0;
• Rules.o - Object file.
• Timing.c - Holds functions to handle calling on time to read in calender
time or the day.
• Xml.c - Contains functions on reading and writing to an XML file. In C
language, this is handled by reading the data held by each tag and parsing through them. Same process while writing an xml file. The functions
allow reading of specific data variables like static arrays of int, float and
more, along with writing data structures, defined in the model xml file.
• Xml.o - Object file.
The templates help generate the above files dynamically when the xparser
compiles the model. The parser then reads the model file, and generates the
dependency graph (stategraph of the model) and above files. The graph describes the layers in which the agent functions will execute and creates state
flow diagrams of the agents. The Make file creates all necessary files that are
linked for execution.
While simulating, the parser reads the 0.xml file in ‘r’ mode, checks partition method as geometric or round robin and reads the values from 0.xml to
assign agent memory. If partitioning, the agents are allocated according to the
position x and y across the grid (SPINF stands for extreme values of grid).
As the agents are read, they are added to a linked list structure, where the
first state of the agent is used as an argument such as
add_Person_agent_internal(current_Person_agent, Person_00_state);
The memory values are copied into the agent memory, using the in tags
defined earlier, and functions created for writing values such as
write_int_static_array(*file, temp, size)
During the simulation, the calculated agent values are written to the next
iteration xml files, produced and saved with the last states of the agents.
The main.c file initializes the message board environment (MB Env Init()).
This involves initializing pointers, iteration numbers, calling read initial states
and generating partitions (cloud data, total nodes, partition method). The
simulated data are saved in an iteration xml file and write log files. If all
67
• Partitioning.o - Object file.
• Rules.c - Functions created to handle conditions in the model. The file
has been deprecated in FLAME v1.0. Functions can contain conditions
on timings such as
iteration_loop%20 ==6 return 1 else return 0;
• Rules.o - Object file.
• Timing.c - Holds functions to handle calling on time to read in calender
time or the day.
• Xml.c - Contains functions on reading and writing to an XML file. In C
language, this is handled by reading the data held by each tag and parsing through them. Same process while writing an xml file. The functions
allow reading of specific data variables like static arrays of int, float and
more, along with writing data structures, defined in the model xml file.
• Xml.o - Object file.
The templates help generate the above files dynamically when the xparser
compiles the model. The parser then reads the model file, and generates the
dependency graph (stategraph of the model) and above files. The graph describes the layers in which the agent functions will execute and creates state
flow diagrams of the agents. The Make file creates all necessary files that are
linked for execution.
While simulating, the parser reads the 0.xml file in ‘r’ mode, checks partition method as geometric or round robin and reads the values from 0.xml to
assign agent memory. If partitioning, the agents are allocated according to the
position x and y across the grid (SPINF stands for extreme values of grid).
As the agents are read, they are added to a linked list structure, where the
first state of the agent is used as an argument such as
add_Person_agent_internal(current_Person_agent, Person_00_state);
The memory values are copied into the agent memory, using the in tags
defined earlier, and functions created for writing values such as
write_int_static_array(*file, temp, size)
During the simulation, the calculated agent values are written to the next
iteration xml files, produced and saved with the last states of the agents.
The main.c file initializes the message board environment (MB Env Init()).
This involves initializing pointers, iteration numbers, calling read initial states
and generating partitions (cloud data, total nodes, partition method). The
simulated data are saved in an iteration xml file and write log files. If all
