Getting Started with FLAME
65
4.3 How to Run a Model?
Go to the Xparser folder and compile it, ‘make’ (MinGW).
> cd xparser
> make
This compiles the Xparser and generates ‘xparser.exe’. The simulation
program then uses the model XML description to parse the model.
> xparser ..\model\model.xml
The model can then be compiled to generate simulation files and create
the ‘main.exe’.
> cd ..\model
> make
For Mac/Linux users:
For compiling the simulation program on Mac/Linux users, the Libmboard
folder needs to be documented with the Xparser global file. This is done by
compiling the model with specifics on the Libmboard location.
> make LIBMBOARD_DIR= /Volumes/libmboard
The model executes for number of iterations, using the 0.xml file as initial
memory.
> main.exe 100 xml\0.xml
This command runs the model for 100 iterations, generating 100 XML
files.
4.4 Implementation Details
The FLAME Xparser generates compiling files for the model when simulated. Taking inputs - the model XML file, template files and agent function
files the Xparser generates the following files:
• Doxyfile - Generates project-related configuration options such as output
folders, input files specification and path builders.
• Header files for every agent with ‘.h’ prefix - Generated with a model
xml file as input, with pointers to access the agent memory variables.
Précédent

- 94/329

Suivant