13.07.2015 Views

LIAM 2 User Guide

LIAM 2 User Guide

LIAM 2 User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>LIAM</strong> 2 <strong>User</strong> <strong>Guide</strong>, Release 0.7.0main upgrade model.yml [output.yml]see main upgrade –help for details.• changed the syntax for all one2many link functions: xxxlink(link_name, ...) should now belink_name.xxx(...). For example, countlink(persons) should now be: persons.count(). The old syntax isstill valid but it is deprecated (it will be removed in a later version). As for aggregate functions, one canupgrade its models automatically with the “upgrade” command.• the “period” argument of value_for_period can now be a scalar expression (it must have the same value forall individuals).• when the output directory does not exist, Liam2 will now try to create it.• when debug mode is on, print the position in the random sequence before and after operations which userandom numbers.• entities are loaded/stored for each period in alphabetical order instead of randomly. This has no influenceon the results but produces nicer log files.• deprecated the “predictor” keyword. If you need several processes to write to the same variable, you shoulduse procedures instead.Fixes:• using invalid indexes in “global arrays” do not crash anymore if they are properly enclosed in an if() expression.For example if you have an array “by_age” with values for indices from 0 to 99, the following codewill now work as expected:if(age < 50, by_age[age + 50], 0.5)Periodic globals are unaffected (they always return “missing” when out of bounds).• fixed link expressions which span 3 (or more) different entities.• fixed using show() on a scalar created by summing a “global array”.• fixed the progress bar of matching() when the number of individuals is different in the two sets.10.4.2 Version 0.6.2Released on 2013-05-21.Fixes:• fixed storing a copy of a (declared) field (without any modification) in a temporary “backup” variable. Thetemporary variable was not a copy but an alias to the same data, so if the field was modified afterwards, thetemporary variable was also modified implicitly.As an example, the following code failed before the fix:# age is a field- backup: age# modify age (this also modified backup!)- age: age + 1# failed because "backup" was equal to "age"- assertEqual(age, backup + 1)This only affected assignment of “pure” fields, not expressions nor temporary variables, for example, thefollowing code worked fine (because backup stores an expression, not a simple field):10.4. Change log 55

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

Saved successfully!

Ooh no, something went wrong!