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.

CHAPTERSEVENIMPORTING OTHER MODELSA model file can (optionally) import (an)other model file(s). An import directive can take two forms:import: path\filename.ymlorimport:- path1\filename1.yml- path2\filename2.ymlEach file in the import section will be merged with the current file in the order it appears. Merging means thatfields, links, macros and processes from the imported file are added to the ones of the current file. If there is aconflict (something with the same name is defined for the same entity in both files), the “current” file (the modelimporting the other model) takes priority. This means one can override entity processes defined in imported files,or add fields to an entity defined in the imported model.Note that both the importing model and the imported model need not be complete/valid models (they do not needto include all required (sub)sections), as long as the combined model is valid. See the examples below.example (common.yml)entities:person:fields:- age: int- agegroup: {type: int, initialdata: false}processes:ageing:- age: age + 1- agegroup: trunc(age / 10)simulation:processes:- person: [ageing]# we do not specify output so this model is not valid in itselfinput:file: simple2001.h5start_period: 2002periods: 2example (variant1.yml)import: common.ymlentities:person:39

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

Saved successfully!

Ooh no, something went wrong!