66
X-Machines for Agent-Based Modeling: FLAME Perspectives
• Header.h - Generates specifications for agents as xmachine data structures and transition functions. Also generates message board-related iterators.
• Low primes.h - Defines arrays holding the prime numbers to aid with
partitioning.
• Main.c - Holds main functions of the program, how the simulation reads
data, parses and produces simulation code.
• Main.exe - Executable file for the simulation.
• Main.o - Object file.
• Makefile - Contains details of file paths and information needed for executing code.
• Memory.c - Holds memory functions on how to read, access and write
to agent memory. Also handles the memory functions of message
boards. Functions allow looping through messages, free message boards
(MB Clear()), initialize pointers to every state in agents, create message
boards (MB Create()), get and set functions.
• Memory.o - Object file.
• Messageboards.c - Holds functions for message board - creating, reading,
iterating and deleting message boards when needed. Example adding a
message:
MB_AddMessage(b_messagename, &msg)
Reading a message:
Inline static message * getInternalMessage(void)
rewind iterator MB_Iterator_Rewind(i_message_to_use);
And accessing messages:
MB_Iterator_GetMessage(i_message_to_use, (void **)&msg);
• Messageboards.o - Object file.
• ‘.o’ files for each agent functions file - Object files.
• Partitioning.c - Helps with partitioning of the data, with functions on
geometric and round robin partitioning. Also contains functions on how
to save data to local nodes when simulation is distributed over multiple nodes. The file does partitioning, cloud data array initialization,
temporary node creation for adding agents. It also creates in-tags to reference agents and reads its memory values, and eventually creates the
machines.
X-Machines for Agent-Based Modeling: FLAME Perspectives
• Header.h - Generates specifications for agents as xmachine data structures and transition functions. Also generates message board-related iterators.
• Low primes.h - Defines arrays holding the prime numbers to aid with
partitioning.
• Main.c - Holds main functions of the program, how the simulation reads
data, parses and produces simulation code.
• Main.exe - Executable file for the simulation.
• Main.o - Object file.
• Makefile - Contains details of file paths and information needed for executing code.
• Memory.c - Holds memory functions on how to read, access and write
to agent memory. Also handles the memory functions of message
boards. Functions allow looping through messages, free message boards
(MB Clear()), initialize pointers to every state in agents, create message
boards (MB Create()), get and set functions.
• Memory.o - Object file.
• Messageboards.c - Holds functions for message board - creating, reading,
iterating and deleting message boards when needed. Example adding a
message:
MB_AddMessage(b_messagename, &msg)
Reading a message:
Inline static message * getInternalMessage(void)
rewind iterator MB_Iterator_Rewind(i_message_to_use);
And accessing messages:
MB_Iterator_GetMessage(i_message_to_use, (void **)&msg);
• Messageboards.o - Object file.
• ‘.o’ files for each agent functions file - Object files.
• Partitioning.c - Helps with partitioning of the data, with functions on
geometric and round robin partitioning. Also contains functions on how
to save data to local nodes when simulation is distributed over multiple nodes. The file does partitioning, cloud data array initialization,
temporary node creation for adding agents. It also creates in-tags to reference agents and reads its memory values, and eventually creates the
machines.
