Skip to content

Commit 98d38d7

Browse files
author
Daniel Precioso, PhD
committed
Include references
1 parent 89369b4 commit 98d38d7

41 files changed

Lines changed: 225 additions & 43 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/agent-based-modeling/assignment.qmd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,17 @@
22
title: "Assignment"
33
subtitle: "To-Do"
44
format: html
5-
---
5+
---
6+
7+
Implement a simple agent-based traffic simulation and analyze emergent congestion patterns [@wilensky2015abm; @nagel1992cellular].
8+
9+
## Required
10+
11+
1. Simulate a 1D traffic cellular automaton for at least two densities.
12+
2. Plot one space-time diagram for each density.
13+
3. Compare how jam formation changes with random slowdown probability.
14+
15+
## Extra Mile (Optional)
16+
17+
- Add sliders for density and slowdown probability.
18+
- Compare random vs localized perturbations in the initial condition.

modules/agent-based-modeling/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Individual Rules, Emergent Behavior"
44
format: html
55
---
66

7-
In this session we explore agent-based models: simple local rules that produce global patterns. We focus on simulation, visualization, and interpretation.
7+
In this session we explore agent-based models: simple local rules that produce global patterns. We focus on simulation, visualization, and interpretation [@wilensky2015abm].
88

99
## Case Studies
1010

modules/agent-based-modeling/traffic.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Nagel-Schreckenberg"
44
format: html
55
---
66

7-
Traffic flow can be modeled with a 1D cellular automaton. Cars occupy cells and move forward each step according to simple rules.
7+
Traffic flow can be modeled with a 1D cellular automaton. Cars occupy cells and move forward each step according to simple rules [@nagel1992cellular].
88

99
```{python}
1010
#| label: fig-traffic

modules/cellular-automata/assignment.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Cellular Automata"
44
format: html
55
---
66

7-
Complete a 1D cellular automaton and a traffic model simulation.
7+
Complete a 1D cellular automaton and a traffic model simulation [@wolfram1983statistical; @nagel1992cellular].
88

99
## Required
1010

modules/cellular-automata/cellular-1d.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Rules and Space-Time Diagrams"
44
format: html
55
---
66

7-
A 1D cellular automaton updates each cell using its local neighborhood. We will use elementary 3-cell rules, such as Rule 30.
7+
A 1D cellular automaton updates each cell using its local neighborhood. We will use elementary 3-cell rules, such as Rule 30 [@wolfram1983statistical].
88

99
```{python}
1010
#| label: fig-ca-rule30

modules/cellular-automata/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "1D Rules and Traffic"
44
format: html
55
---
66

7-
In this session we explore **1D cellular automata** and apply them to traffic models.
7+
In this session we explore **1D cellular automata** and apply them to traffic models [@wolfram1983statistical; @nagel1992cellular].
88

99
## Case Studies
1010

modules/collective-motion/vicsek-animation-interactive.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Interactive Animation"
44
format: html
55
---
66

7-
In this chapter I will guide you to build an **interactive Vicsek animation** in Matplotlib, *one step at a time*.
7+
In this chapter I will guide you to build an **interactive Vicsek animation** in Matplotlib, *one step at a time* [@vicsek1995novel; @hunter2007matplotlib].
88

99
You already have a basic animation of particles moving (see the previous chapter). Now we will add:
1010
- an order parameter plot,

modules/collective-motion/vicsek-animation.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Basic Animation (Particles Moving)"
44
format: html
55
---
66

7-
In this chapter I will guide you to build a basic animation of the Vicsek model using Matplotlib. This will be a foundation for more complex visualizations and interactive explorations in later chapters.
7+
In this chapter I will guide you to build a basic animation of the Vicsek model using Matplotlib [@vicsek1995novel; @hunter2007matplotlib]. This will be a foundation for more complex visualizations and interactive explorations in later chapters.
88

99
You already have the Vicsek functions implemented (e.g. `initialize_particles`, `vicsek_equations`, `vicsek_order_parameter`).
1010
Your job here is to **assemble** them into a 2D particle animation (with a short *tail*) that shows the recent trajectory of each particle.

modules/collective-motion/vicsek-predator.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Implementing the Avoidance Rule"
44
format: html
55
---
66

7-
In the Couzin model, particle avoidance takes absolute priority: if an individual senses another particle within a certain radius, it immediately turns directly away, ignoring all other alignment or noise rules. We can implement a similar rule in the Vicsek model to simulate predator avoidance. The predator can be a fixed point, a random walker, or even the mouse cursor. In all cases, if a boid senses the predator within a certain radius, it will turn directly away from it.
7+
In the Couzin model, particle avoidance takes absolute priority: if an individual senses another particle within a certain radius, it immediately turns directly away, ignoring all other alignment or noise rules [@couzin2002collective]. We can implement a similar rule in the Vicsek model to simulate predator avoidance [@vicsek1995novel]. The predator can be a fixed point, a random walker, or even the mouse cursor. In all cases, if a boid senses the predator within a certain radius, it will turn directly away from it.
88

99
Below is a guide on how to implement this in your Vicsek animation. You can choose to implement one or more types of predators (static, random walk, mouse-following) and compare their effects on the collective behavior of the particles.
1010

modules/collective-motion/vicsek-validation.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: "Static Analysis of Collective Motion"
44
format: html
55
---
66

7-
Before animating the Vicsek model, it is important to validate your implementation and build intuition about how the parameters affect collective motion. Here, you will use static plots to explore how the interaction radius $r$ influences the alignment of particles. This step helps ensure your code is working as expected and provides insight into the model's behavior before moving on to more complex analyses or animations.
7+
Before animating the Vicsek model, it is important to validate your implementation and build intuition about how the parameters affect collective motion [@vicsek1995novel]. Here, you will use static plots to explore how the interaction radius $r$ influences the alignment of particles. This step helps ensure your code is working as expected and provides insight into the model's behavior before moving on to more complex analyses or animations.
88

99
We will run the Vicsek model for a few time steps and visualize the headings of all particles for different values of $r$. This will help you see the transition from random motion to local and global alignment as the interaction radius increases.
1010

0 commit comments

Comments
 (0)