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.

<strong>LIAM</strong> 2 <strong>User</strong> <strong>Guide</strong>, Release 0.7.010.4 Change log10.4.1 Version 0.7Released on 2013-06-18.New features:• implemented imports so that simulation files can be split and reused. This can be used to simply split a largemodel file into smaller files, or (more interestingly) to create simulation variants without having to duplicatethe common parts. This feature was inspired by some code from Alexis Eidelman.• added new logit and logistic functions. They were previously used internally but not available to modellers.• added two new debugging features: autodump and autodiff. autodump will dump all (non-scalar) variables(including temporaries) at the end of each procedure in a separate hdf5 file. It can be used stand-alone fordebugging, or in combination with autodiff. Autodiff will gather all variables at the end of each procedureand compare them with the values stored previously by autodump in another run of the model (or a variantof it). This can be used to precisely compare two versions/variants of a model and see exactly where theystart to differ.• added new assert functions:– assertIsClose to check that two results are “almost” equal tolerating small value differences (for exampledue to rounding differences).– assertEquiv to check that two results are equal tolerating differences in shape (though they must becompatible).– assertNanEqual to check that two arrays are equal even in the presence of nans (because normally nan!= nan).• added a new “timings” option to hide timings from the simulation log, so that two simulation logs are moreeasily comparable (for example with “diff” tools like WinMerge).• added a menu entry in notepad++ to run a simulation in “debug mode”.Miscellaneous improvements:• improved the performance and memory usage by changing the internal memory layout. Most operationsare now faster. new(), remove(), “merging data” (for retrospective simulations) and writing data at the endof each period are now slower. In our model, this translates to a peak memory usage 20% smaller and a35% overall speed increase. However, if your model has a low processes/variables ratio, it may very wellbe slower overall with this version. If it is your case, please contact us.• changed the syntax for all aggregate functions: grpxxx(...) should now be xxx(...). For example, grpsum(age)should now be: sum(age). The old syntax is still valid but it is deprecated (it will be removedin a later version). A special note for grpmin() and grpmax() which becomes min() and max() respectivelyeven though those functions already existed. The meaning is deduced from the number of “non-keyword”arguments:min(expr1, expr2) minimum between expr1 and expr2 (for each individual)min(expr) (aggregate) minimum value of “expr” over all individualsmin(expr1, filter=expr2) (aggregate) minimum value of “expr” over individuals satisfying the filterA tool to automatically upgrade models to the new syntax is provided. In notepad++, you should use theLiam2: upgrade model command in the Macro menu.You can also run it via the command line:54 Chapter 10. Appendix

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

Saved successfully!

Ooh no, something went wrong!