The simulation

Jump directly to:

How can the possible effects of containment policies be understood?

The current coronavirus pandemic has led to different containment policies that have not only consequences for the spread of the coronavirus but also for the social well-being of populations and the economical situation at short and long term. The effect of policies depends on how people react on them.

We use a “coronavirus in Simcity” approach to study individual and social reactions to these policies. This is a tool for decision makers to explore different scenarios and their effects. It is not a model to generate predictions.

ASSOCC user interface depicting houses, workplaces, hospitals, schools, station and people’s movements


To support policy makers understand possible effects of policies, we created an agent-based model that simulates the behaviour of a synthetic population given a set of policies (e.g. lock-down or voluntary isolation). This enables to study the effects on both the spread of the contagion and on how people can be expected to react to the policies (e.g. potential violations or workarounds).

Our simulation model is based on a set of artificial individuals, each with given needs, demographic characteristics, and attitude towards regulations and risks. (see the ODD document for more information.) By having all these agents decide each time what they should be doing, we can analyse many different possible effects of policies, such as total lock-down or voluntary isolation.

The ASSOCC framework models both the possible effects on the spread of the coronavirus and the socio-economic effects of the policies, providing possible answers to:

  • How might policies premised on achieving drastic behavioural change go wrong?  
  • How might one work with existing social norms and habits to effectively limit virus spread – what will work with populations and what will not?
  • How might we reintroduce people who have recovered from the disease back into society to help others and revive the economy without this leading to social division and a general breakdown of social distancing?
  • What are the possible dangers of social polarisation between vulnerable older people and the young who want to get together, how might we keep younger people “on board”, how might we stop them losing contact with other generations?
  • For particular groups within societies, at particular times of year or day are there safe gathering activities with very low risk of contagion? Are there practices that are particularly dangerous (like washing the body of the deceased with Ebola)?
  • What new social practices might we develop that allow life in a world susceptible to waves of new infection (e.g. red and blue teams in hospital so there is no overlap)?

We take a longitudinal approach to study the prolonged effect of the policies and the behavior of the population affected by them. We are particularly interested on the timing and consequences of lifting the restrictions.

How it works

We have developed a NetLogo simulation consisting of a number of agents that exist in a grid. Agents can move, perceive other agents, and decide on their actions based on their individual characteristics and their perception of the environment. The environment constrains the physical actions of the agents but can also impose norms and regulations on their behavior. E.g. the agents must follow roads when moving between two places, but the environment can also describe rules of engagement such how many agents can occupy a certain location. Through interaction, agents can take over characteristics from the other agents, such as becoming infected with the coronavirus, or receive information.


Agents have needs and capabilities, but also personal characteristics such as risk aversion or the propensity to follow the law. Needs include health, wealth and belonging. Capabilities indicate for instance their jobs or family situations. Agents need a minimum wealth value to survive which they receive by working or subsidies (or by living together with a working agent). In shops and workplaces, agents trade wealth for products and services. Agents pay tax to a central government that then uses this money for subsidies, and the maintenance of public services such as hospitals and schools.


Places represent homes, shops, hospitals, workplaces, schools, airports and stations. By assigning agents to homes, different households can be represented: families, students rooming together, retirement homes, three generation households and co-parenting divorced agents. The distribution of these households can be set in different combinations to analyse the situation in different cities or countries.


Policies describe interventions that can be taken by decision makers. For instance social distancing, testing or closing of schools and workplaces. Policies have complex effects for the health, wealth and well-being of all agents. Policies can be extended in many different ways to provide an experimentation environment for decision makers.

A screenshot of the parameter setting in the Netlogo model.

Conceptual design

The design of the ASSOCC framework is based on theories from sociology that describe individual behavior as a result of a combination of basic values, motives and affordances over many contexts. In ASSOCC these theories have been implemented as a combination of three types of needs: the psychological needs, the social needs and the physical needs. Together they determine the reaction of agents to policies and their physical and social context.

A short description of the conceptual architecture of ASSOCC is available here.


The simulation is built on Netlogo with a visual interface in Unity. The Netlogo model can be used standalone. For the scenarios, we use the Unity interface for better visualisation of the simulation.

Code: the complete source code is available under a Creative Commons Attribution-NonCommercial 4.0 International License, at Note that this is the beta version of the code as we are developing it. You can expect that new versions will be appearing everyday. Please report any bugs or functionalities that you miss!

In order to use or experiment with the different scenarios, packages will be made available soon, also in the github page and reachable from the scenarios page.

Documentation: the complete description of the agent-based model, using the ODD protocol (Overview, Design concepts, and Details) can be found here (updated 20 April 2020). A short overview of the disease and contagion model is also available.

More documentation is available upon request.

%d bloggers like this: