Version 0.11 released

Highlights of this release are support for the “sidewalk” alignment method, support for default values for fields and some basic help in the interactive console.

Download this release from the download section.

New features

  • added support for the “sidewalk” method in align_abs() in addition to the existing (and default) “bysorting” method. Thanks to Alexis Eidelman and Mahdi Ben Jelloul (pull request 189).
  • added support for defining a default value for fields. This default value will be assigned to the corresponding fields in new() and if the fields are not present in the initial data (see the fields declaration section for details). Thanks to Alexis Eidelman and Mahdi Ben Jelloul (pull request 190).
  • added “functions” command to the interactive console. It displays the list of available functions.
  • added “help [function]” console command. It displays the signature of the function (ie the list of possible arguments and their default value if any). For random generator functions it also displays a detailed description (from numpy).
  • added a ‘limit’ argument to dump() to limit the number of rows of the output.

Miscellaneous improvements

  • improved the logging message for align with take or leave filters: the take and leave filters are combined with the “normal” filter before computing the take and leave numbers displayed. It does not change the results in any way, only the numbers logged to the console.
  • made the demonstration models use 3d alignment files in some cases instead of separate alignment files for men and women.
  • better error message when a user-defined function is called with the wrong number of arguments.
  • better error message on failed assertEqual if shapes are different.
  • added check for duplicate ids when loading datasets.

Miscellaneous improvements for developers

  • implemented Simulation.from_str to create a simulation object from a string (using Python).

Fixes

  • fixed various problems with the demonstration models.
  • fixed grouping by a constant.

Version 0.10.5 released

This is a bug fix only release.

Download this release from the download section.

Fixes

  • fixed using one2many in combination with lags of more than 1 period (or any past period in the interactive console).

Version 0.10.4 released

This is a bug fix only release.

Download this release from the download section.

Fixes

  • fixed a few issues with the demonstration models.
  • fixed 0.10.3 change log to mention Christophe Benz.

Version 0.10.3 released

Highlights of this release are improved demonstration models, better Linux support, better automated tests and the usual assortment of fixes and miscellaneous improvements.

Download this release from the download section.

New features

  • added seed() function to (re)set the pseudo-random generator seed mid-simulation.

Miscellaneous improvements

  • updated demo models:
    • improved the dataset (which is now generated by a LIAM2 model: generate.yml).
    • reorganise the models to group presented features more thematically.
    • added more comments.
    • added example of progressive .csv files via mode=’a’.
  • added installation instructions and generally improve the out of the box experience on Linux. Thanks to Mahdi Ben Jelloul (pull request 181).
  • enabled running the unit tests automatically on each change to the GitHub repository by using Travis-CI (which runs tests on build servers). Thanks to Mahdi Ben Jelloul and Christophe Benz (pull request 182).
  • added an explicit error message when using “empty” processes (ie a “-” without any other text).
  • moved website to its own repository (http://github.com/liam2/website).
  • renamed “src” folder to “liam2” to follow standard practices. Thanks to Mahdi Ben Jelloul (pull request 181).
  • improved error message of assertEqual if the array shapes are different.
  • added explicit test for logit_score.

Fixes

  • the list of available periods in the console is sorted.
  • fixed time travel in the console at the end of a simulation.
  • fixed writing technical error (traceback) in error.log.
  • fixed the explore command on .h5 files.

Version 0.10.2 released

This release fixes a few more bugs I remembered about just after I finished the 0.10.1 release.

Download this release from the download section.

Fixes

  • fixed the fields command in the interactive console (closes issue 176).
  • if there is only one entity defined, start the interactive console in that entity, even if default_entity is not set (closes issue 175).

Version 0.10.1 released

This is a minor mostly bug fix release.

Download this release from the download section.

New features

  • allowed to override all simulation options except “init” and “processes” using the command-line. Run “main run -h” for details (closes issue 173).

Fixes

  • fixed the error message when using an unknown variable to be more explicit like it was in versions before 0.9 (closes issue 167).
  • the output of the demonstration models is no longer included in the bundles (closes issue 169).
  • made simulations which terminate in an error exit with the correct error code even without –debug (closes issue 174).

Presentation at the IMA conference in Luxembourg

I will be giving a presentation titled “LIAM2 - overview and recently added features” at the Fifth World Congress of the International Microsimulation Association, 2-4 September 2015, Luxembourg.

Abstract

This presentation will be divided into two parts. First a quick overview of what is LIAM2, then a description of all the new features since the LIAM2 course at the IMA conference in 2013 and more briefly those since our initial presentation in 2011. Each of those features will be briefly explained with examples of how they were used in real models.

Overview

LIAM2 is a free, open source, user-friendly modelling and simulation framework. It is made as generic as possible so that it can be used to develop almost any type of discrete-time dynamic microsimulation model with cross-sectional dynamic ageing (i.e. all individuals are simulated at the same time for one period, then for the next period, etc.). LIAM2 is clearly aiming to free “modellers” from having to develop or care about having state-of-the-art methods for data-handling or expression evaluation and yet be able to handle relatively large datasets at a reasonable speed. For example, a model like MIDAS in Belgium simulated over 60 years with 2.2 million individuals initially could be developed in a user-friendly environment and is run in less than 4 hours. To date, LIAM2 has been adopted by modellers in at least 7 countries.

New features since 2011

  • model imports and model variants
  • many new functions including:
    • charting functions
    • aggregate functions: gini, percentile, ...
    • new alignment options (using absolute values or on a linked entity using Chenard’s algorithm)
    • debugging functions (assertions, ...)
  • data viewer (HDF5 viewer)
  • syntax changes
  • officially open source and hosted on GitHub

New features since 2013

  • user defined functions
  • while loops
  • improved handling of external data
  • new matching algorithms
  • more random number generators

Autumn school on modelling using LIAM2 at LISER (Luxembourg)

In the context of the InGRID network, the Luxembourg Institute of Socio-Economic Research (LISER, formerly CEPS/INSTEAD) is organizing a workshop on “Elaborating a discrete-time dynamic microsimulation model with LIAM2, an open source development tool”.

The workshop is free of charge and will take place from 16 to 18 November 2015 in Luxembourg. Travel costs and accommodation are reimbursed up to certain amounts. See http://inclusivegrowth.be/events/call24/call24 for all the details.

Version 0.10 released

Highlights of this release are the implementation of while loops and calling user-defined functions, potentially with arguments. Please also see the complete release notes below for a potential migration issue concerning code defined outside of functions/procedures.

Download this release from the download section.

New features

  • implemented support for calling user-defined functions (previously called procedures) from within user code, optionally passing arguments to them and retrieving their return value. As a consequence of this, every mention of “procedures” in the documentation has been replaced by “functions”, including the name of the “procedures” logging level which is now deprecated. Closes issue 152.
  • implemented while loops (closes issue 151).
  • added support for not storing some fields in the output file (closes issue 58).
  • added support for using the “inf” (infinite) constant.

Miscellaneous improvements

  • improved our error handling code to display the (part of the) line where the error occurred in more cases and to not strip the traceback (error.log) of some important information in the cases where the line was already displayed.

  • configured the bundle editor (Notepad++) to display some warning and error lines in red in the console log. Additionally, when the error message contains a filename and/or a line number (this is currently too rare unfortunately), it is now click-able (to jump directly at the file/line).

  • defining a process outside of a function has been deprecated because it is ambiguous. For example, this code will now trigger a warning and will be an error in a future version:

    entities:
        person:
            fields:
                agegroup: int
            processes:
                agegroup: 10 * trunc(age / 10)
    simulation:
        processes:
            - person: [agegroup]
    

    It should be replaced by (or possibly moved into another existing function):

    entities:
        person:
            fields:
                agegroup: int
            processes:
                compute_agegroup:
                    - agegroup: 10 * trunc(age / 10)
    simulation:
        processes:
            - person: [compute_agegroup]
    

    If this construct was used to have a temporary field (ie the field was not declared in the fields section) accessible from several functions, like

    entities:
        person:
            processes:
                tempfield: 0
    
                func1:
                    tempfield: count()
    
                func2:
                    otherfield: tempfield + 1
    

    One should now declare that field with output: False instead.

    entities:
        person:
            fields:
                tempfield: {type: int, initialdata: False, output: False}
    
            processes:
                func1:
                    tempfield: count()
    
                func2:
                    otherfield: tempfield + 1
    

    This closes issue 124.

  • made bcolz optional (which is only useful for interpolating the dataset during import). Thanks to Mahdi Ben Jelloul (pull request 161).

  • allow simulations with no processes section (but an init section).

  • reworked a few sections of the documentation.

  • trying to set a value to an unknown variable in new/clone produces a warning instead of being silently ignored (or even crashing with –debug)

Fixes

  • fixed end-of-simulation stats when simulating 0 periods (closes issue 158).
  • allow overriding (detected) field types of period and id fields in import (closes issue 154).
  • fixed autodump (broken in 0.9). Note that it is currently incompatible with while loops and recursive (user-defined) functions.

Version 0.9.1.1 released

This is a remake of the 0.9.1 release with a correct version number and other packaging fixes.

Download this release from the download section.

Fixes

  • fixed version number (release 0.9.1 reports itself as 0.9).
  • fixed various small problems with the release script.
  • made the 32b version use the exact same versions of third-party packages as the 64b version.