13.07.2015 Views

LIAM 2 User Guide

LIAM 2 User Guide

LIAM 2 User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTERTHREEMODEL DEFINITIONTo define the model, we have to describe the different entities, their fields, the way they interact (links) and howthey behave over time (processes). This is done in one file. We use the YAML-markup language. This format usesthe level of indentation to specify objects and sub objects.In a <strong>LIAM</strong> 2 model file, all text following a # is considered to be comments, and is therefore ignored.A <strong>LIAM</strong> 2 model has the following structure:# imports are optional (this section can be entirely omitted)import:...# globals are optional (this section can be entirely omitted)globals:...entities:...simulation:...3.1 importA model file can (optionally) import (an)other model file(s). This can be used to simply split a large model fileinto smaller files, or (more interestingly) to create simulation variants without having to duplicate the commonparts.For details, see the Importing other models section.3.2 globalsglobals are variables (aka. parameters) that do not relate to any particular entity defined in the model. They canbe used in expressions in any entity.<strong>LIAM</strong>2 currently supports two kinds of globals: tables and multi-dimensional arrays. Both kinds need their datato be imported (as explained in the Importing data section) before they can be used. They also need to be declaredin the simulation file, as follow:globals:mytable:fields:- MYINTFIELD: int- MYFLOATFIELD: float5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!