François Legendre - MSL, a library written in C++ and dedicated to microsimulation models

  • Presenting author: François Legendre (Érudite, Université Paris-Est Créteil)

  • Authors: François Legendre

  • Session: A00A - Pre-Conference Workshop “MSL” - Monday 9:00-10:30 - Senate Hall

The workshop is designed to give an initial overview of the library’s capabilities. It is aimed at users with sufficient experience of programming (the edit-compile-run cycle and the use of a project manager such as make) and of the C++ language. Please bring your own computer. For Windows computers, it is preferable to install Windows Subsystem for Linux, the gcc compiler and the make manager.

The workshop programme will be as follows.

I - Motivation and Outline

A - Modern hardware

B - Modern C++

C - Library architecture

II - Playing with a toy model

A - The model

B - Assessment of a new tax policy measure

III - Building your own model

A - Parametrize the model

B - Populate the model

C - Playing with the model

Micro-simulation models are computationally and data intensive computer applications. The hardware architecture of modern computers is characterised by a large main memory, several levels of cache memory and many processors. The aim of MSL, a library dedicated to micro-simulation models written in C++, is to take advantage of this hardware architecture. This library has the following five salient features. Firstly, using the library requires two steps. In the first stage, a specialised library, specific to the micro-simulation model used, is built from a parameter file which, in particular, gives the names of the model’s variables. In the second stage, this specialised library is used to develop the model. Secondly, the library offers a particularly effective model for ensuring data persistence. The population is stored on the external medium in a form compressed into several fragments. The population is loaded into memory in parallel and decompressed on each of the computer’s processors. Thirdly, the individuals are identified by their reference in memory, as for example in the Python language. This solution is simple and effective: it avoids the need to manipulate raw pointers. Fourthly, the library can be used to create total partitions of the population, such as families or tax households. It offers constructs for browsing all the families in the model and, within each family, each member of the family. Finally, the library facilitates distributed computing by providing tools for implementing the map and reduce algorithm.