Rachel Oughton
20/02/2023
In this lecture, we will cover
We will also focus on ABMs and NetLogo in workshop 3.
In this section:
Compartmental models think in terms of the population as
a whole.
Agent based models (ABMs) model complex systems in terms of the interactions and behaviour of many many agents.
We will only touch on the functionality of ABMS, but
To quote Auchincloss and Diez Roux (2008),
“Agent-based models are computer representations of systems consisting of a collection of discrete microentities agents interacting and changing over discrete time steps that give rise to macrosystems.”
An ABM agent is anything that changes how it behaves in response to input from the other agents and the environment.
Agents have rules that determine their behaviour and responses.
At each time step (‘tick’), the agents all re-evaluate their decisions/behaviour according to
This means ABMs can encode things like social norms or memes.
Typically, an ABM has three elements:
For example, in a simple epidemiological model:
In a more detailed model different agents can have different behaviours such as
They can also be influenced by the behaviour and decisions of those around them.
This is not easily replicable in a compartmental model.
In this section:
Compartmental models assume mass action:
Each person in the system has a uniform influence on every other person.
We can see how this looks as an ABM.
We find a similar pattern to our compartmental SIR models:
Random choices and whole numbers make
the lines somewhat ‘wobbly’.
This was quite a silly example:
We have highlighted some of the shortfalls of the compartmental models and some of the modelling opportunities that agent-based models can introduce.
ABMs can incorporate some much more realistic behaviour.
The main things we’ll tackle are movement and proximity:
Our next ABM example will start with people randomly spaced on a grid.
However this time,
From now on We will run our ABMs in NetLogo
In this section:
For historical reasons, the agents in NetLogo models are called “turtles”. So when you see this in these notes, or in NetLogo code or interface, you can interpret it as “agents” or “person/people”.
We will now switch to NetLogo to go through how it works using a simple SIR type model.
We will look at:
This is all written up in the notes.
Think back to our compartmental SIR model, where we had \(R_0 = \frac{\beta}{\gamma}\).
How
do these ABM parameters relate to \(\beta\) and \(\gamma\)?
In this section:
One feature of agent-based models as we have described them is that they are stochastic.
A stochastic model is one which, due to inherent uncertainty, will not always return the same output given the same input variables.
This is because many of the stages of the model are performed using
random number generation.
Exercise
List the parts of the ABM described
above that are subject to randomness.
Some of the events that are subject to random chance in the model we have looked at are:
So \(\textbf{same input}\nRightarrow{\textbf{same output}}\).
BehaviourSpace enables us to do repeated experiments in Netlogo, to assess uncertainty.
In BehaviourSpace we can specify
The count of infectious turtles over time for 50 ABM runs with the same input values.
Variation in height and location of the peak of infections, as well as the point at which the epidemic dies out.
The count of recovered turtles over time for 50 ABM runs with the same input values.
Question: Which of these plots do you think would be
the most useful in a public health setting?
In this lecture we have
In the workshop you will have the opportunity to look into ABMs in more detail, and to experiment with the parameters and BehaviourSpace.