NetLogo banner

NetLogo Publications
Contact Us

Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Farsi / Persian


NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Oracle's Java site.

Peloton 2.0

By Hugh Trenchard
February 2013



In a peloton one central principle is that as cyclists' increase their power-output toward their maximum, it becomes harder to pass those in front. So, when cycling at low power-outputs, riders can pass others frequently at comparatively fast speeds. As this power-output level increases, riders pass others less frequently, they reduce their lateral movement, and the peloton begins to lengthen. At a certain power-output threshold, they cannot pass others at all, but by drafting they can keep up to those ahead, even if riders ahead are stronger.

As cyclists adjust their power-outputs, interesting changes in their collective behavior occur, and peloton behavior shifts through discernable phases.

The peloton motion that appears in this model is not created or led in any way by special leader cyclists. There are no Lance Armstrongs here. Each cyclist follows the same set of rules, from which collective peloton motion emerges.

Although the same in many aspects as Peloton 1.01, Peloton 2.0 contains modifications in the equations and code, and is considerably improved overall.

This model shows three main phases of peloton dynamics:

~ a low power-output "free-movement" phase through a range of PCR;
~ a decreasing density phase as the peloton begins to lengthen, exhibiting
oscillations between higher density and stretched behavior through a range of PCR;
~ a stretched (single-file line) phase through a range of PCR;
~ disintegrated behavior through a range of PCR.


The model incorporates some rules from Uri Wilenski’s Flocking model with several important adaptations I have introduced.

The following modifications represent principles specific to pelotons:

• a random speed rule for cyclists;

• a rule that causes cyclists to decelerate in order to prevent complete sharing
of the same patch (with some overlap);

• a rule that causes cyclists in front or "in the wind" to slow down relative to
those behind according to an adjustable ratio (“Peloton-Convergence-Ratio” or
"PCR" (1)) such that when PCR is less than 1, cyclists in front slow down
relative to those behind, and if PCR is 1 or more, cyclists in front move as fast
or faster than those behind;

• also, when PCR is less than one, cyclists behind can accelerate toward the
front at speeds proportionate to the distance between themselves to the cyclist
farthest ahead to a given maximum, and proportionate to PCR; i.e. at low power
outputs (e.g. cycling slowly on a flat road), riders can pass from behind and
move toward the front fairly quickly;

• associated with the rule above, rules that constrain the directional angles
of cyclists proportionately to PCR.

PCR is adjustable by a "slider" on the interface screen. As PCR is increased through its range from PCR 0.1 to 1.0, the peloton shifts from higher density states to a stretched phase, or single-file line (lower density). This demonstrates an important effect in pelotons when riders synchronize their speeds at near sustainable maximum power outputs. Weaker riders can sustain the same speeds of stronger riders by taking advantage of the energy-savings benefits of drafting (2).

As PCR is further increased, the synchronized (single-file) phase breaks down and riders
separate and travel at their own intrinsic speeds (such as on steep ascents). At intermediate ranges of PCR, the peloton exhibits mixed phase dynamics as it oscillates between high density and single-file lines.

The model is set to mimic a roadway on which all cyclists move to the right and, if isolated on their own, will drift randomly at shallow angles. As a roadway, the “world” has barriers at the top and bottom of the world view, and cyclists cannot “wrap” above or below these barriers.

There are three rules incorporated from Wilenski’s Netlogo flocking model:
“alignment”, “separation”, and “cohesion”.

Here “alignment” means that a cyclists tend to turn so they move in the same orientation of nearby cyclists.“Separation” means that cyclists turn away from others. “Cohesion” means that cyclists move towards others. I refer to these as the “ASC” rules.

For realistic peloton behavior, the ASC sliders must be initially set very low so that the degree of random lateral movement is low. This simulates cyclists’ forward movement along a roadway, compared with birds in the air which can move in any direction.


First, determine the number of cyclists you want in the simulation. Note there are four rows on which cyclists start in random positions, and the count for the "Peloton-riders-per-row" slider reflects the number in each row. So, multiply by 4 for the total.

Press SETUP to create the cyclists, and press GO to get them moving.

The current settings for the sliders will produce reasonably good peloton behavior.

The main slider to adjust is Peloton-Convergence-Ratio, which mimics the dynamics that correspond to a changing power outputs and to drafting magnitude. Adjusting this slider alters the density of the group and whether cyclists travel in lines or in clusters, or divide into groups.

For the most interesting and realistic peloton behavior, keep the "vision" between 3 and 6, "drafting-zone" at 2.5 to 3.5, and "deceleration" at 0.2, while adjusting PCR 0.1 or 0.2 increments at a time and watching for a while. It may take two or three thousand ticks (a couple of minutes) to see the behavior change noticeably, particularly in the middle ranges of PCR.


In the PCR ranges of 0.1 to about 0.4, density and behavior is stable. From about PCR 0.4 to 0.7 behavior changes and we see behavior oscillates between high density and stretching, and group divisions and reintegrations. From about 0.8 to 1.0 we see stable single-file line behavior. Above this range, we see the peloton disintegrates. The PCR ranges in which certain collective behaviors are stable represent the different phases of the peloton.

In real pelotons there are of course different strategies and tactics and cyclists compete for top placings. For that purpose there are teams and team leaders and different roles within teams. This model demonstrates, however, that basic physical and physiological principles are the primary drivers of certain collective behaviors despite the influences of strategy and teamwork.


• Flocking; Flocking vee formation
• Basic Traffic
by Uri Wilenski

There is a cycling race simulation developed by Samuel Manier for the video game, "Pro-Cycling Manager". There is one published paper by Manier, S., and Sigaud, O. [year not given] "Compacting a Rule Base into an and/or Diagram for a Game ai"., in which the authors refer to their Pro-Cycling Manager simulation. They indicate having incorporated physics equations into their simulation, but do not specify which ones, and they do not address complex dynamics or peloton phases.

I am not aware of any other computer simulations of bicycle pelotons.


This model relies significantly on the work of Uri Wilenski, with important modifications that distinguish this peloton model from Wilenski’s model.

Wilenski notes that his flocking model is inspired by the Boids simulation invented by Craig Reynolds. Information on Boids is available at

• Wilensky, U. (1998). NetLogo Flocking model. Center for Connected
Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
• Wilensky, U. (1999). NetLogo.
Center for Connected Learning and Computer-Based Modeling, Northwestern
University, Evanston, IL.


(1) Trenchard, H. and Mayer-Kress, G. 2005.Self-organized coupling and synchronization in bicycle pelotons during mass-start bicycle racing. In Book of Abstracts of International Conference on Control and Synchronization in Dynamical Systems. Leon, Gto. Mx.

(2) Hagberg, T. and McCole, S. 1990. The effect of drafting and aerodynamics equipment
on energy expenditure during cycling. Cycling Science 2:20.


PCR = ((Wa - Wb) / Wa) / (D/100)

Where Wa is the maximum sustainable power output (watts) of cyclist A at any given moment;

Wb is the maximum sustainable power of cyclist B at any given moment (assuming Wa>Wb); D/100 is the percent energy savings (correlating to reduced power output) due to drafting at the velocity travelled.

Recently, I have derived the following version of PCR:

PCR = [ Pqfront - (Pqfront * (D/100))] / Pmaxdraft

Where Pqfront is the power output of the front rider at the given speed and equals
the power output of the following, drafting rider, to maintain the speed set by the
front rider if the following rider were not drafting. Pmaxdraft is the maximum
sustainable output of the following rider.

(back to the NetLogo User Community Models)