Computational Modelling and Simulation (MTHM607)

Computational Modelling and Simulation
(MTHM607)
Worksheet for Agent-based Modelling
November 2023
This worksheet contains a list of exercises drawing on the lecture slides, as well as suggested
tasks for the mini-project.
This worksheet is not for summative assessment, but I recommend to consider the exercises
and practice developing MATLAB code or MATLAB/Simulink models, before starting with the
mini-project. As with the MATLAB worksheet (see “Introduction to MATLAB” section on the
module ELE page), I am happy to provide feedback online, for example, you can scan and share
hand-written notes and MATLAB script files for individual problems in a OneDrive folder with
me.
Theoretical problems
1. Develop an Overview-Design concepts-Details (ODD) protocol for the elementary cellular
automaton described by Wolfram (2002)1
. Provide brief summaries for the seven components
of the protocol and explain your approach for creating the set of rules required.
2. Describe the six modelling steps for a grid-based predator-prey agent-based model. This can
follow a similar design approach as the basic Sugarscape model, but with two sets of agents
occupying cells within an environment and specific rules for prey agents and for predator
agents (e.g., movement, survival, recruitment and death, predation).
For each modelling step, answer the questions as outlined in the lecture notes. Provide detailed
descriptions for the points “Agent behaviours” and “Agent interactions”.
3. Following the Overview-Design concepts-Details (ODD) protocol or the six modelling steps,
create an outline for a infectious disease agent-based model. The model should make use of
a network-based environment. Your agent-based disease model should consider agents’ states
in the same or similar compartments as for the previously introduced S(usceptible) I(nfected)
R(ecovered) modelling, see the “Dynamical Systems Modelling” lectures.
4. Following the Overview-Design concepts-Details (ODD) protocol or the six modelling steps,
create an outline for a energy generation and distribution agent-based model. The model
could make use of a network-based environment or you may consider a GIS-based approach.
You should consider two types of agents: energy producers and energy consumers. For each
agent type, develop appropriate rules that should enable the simulation of different energy
scenarios.
1See Chapter 2 of Wolfram (2002). A New Kind of Science. Wolfram Research.
1 Markus Mueller, November 2023
Computational problems
5. Recall the Sugarscape model introduced in the lecture notes. Extend the model developed
during practical sessions to include a second agent class and competition between the two
classes of agents.
It is recommend to extend the previously develop Overview-Design concepts-Details (ODD)
protocol for this extended Sugarscape model.
6. Recall the Boids model introduced in the lecture notes.
(a) Extend the model developed during practical sessions to include a leader agent. Agent
behaviours and rules should be adapted to enable the other agents to follow the leader
agent.
(b) Extend the model developed during practical sessions to include a predator agent. Agent
behaviours and rules should be adapted to enable agents to avoid the predator agent.
A set of new rules for the predator agents should allow to simulate realistic predation
behaviour.
It is recommend to extend the previously develop Overview-Design concepts-Details (ODD)
protocol for this extended Boids model.
Mini-project task
All following mini-project can be realised computationally as a set of MATLAB scripts and functions, but you may also consider an implementation as MATLAB/Simulink model (possibly with
additional MATLAB functions).
7. Consider either of the proposed agent-based model ideas from problems 2–4: a predator-prey
agent-based model, an infectious disease agent-based model, or an energy generation and
distribution agent-based model.
Develop a detailed description of the model and realise the model in MATLAB or MATLAB/Simulink.
Provide a analysis of simulation runs. Address some of the following questions: Are the
agents’ behaviours exploring sufficient complexity of the problem Are the agents’ behaviours
subject to convergence to possible steady states How does the agents’ behaviour depend on
model parameters Consider statistical analyses of repeated simulation runs to explore these
questions.
2 Markus Mueller, November 2023