NetLogo User Community Models
by Hugh Trenchard (Submitted: 11/19/2012)
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.
By Hugh Trenchard
WHAT IS IT?
This model attempts to show certain peloton dynamics. The peloton motion that appears in this model is not created or led in any way by special leader cyclists. There is one arbitrary threshold rule, but it follows from actual peloton principles, which I have referred to in previous work as the "peloton convergence ratio" (1). Otherwise, each cyclist follows the same set of rules, from which collective peloton motion emerges.
This model shows three main phases of peloton dynamics:
~ a low speed, disintegrated phase
There is also a mixed phase in which the peloton oscillates between stretching and disintegration at high speeds.
HOW IT WORKS
The model incorporates 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 which then limits cyclists’speeds to match the speeds of those immediately ahead;
~ a rule that causes cyclists in front or "in the wind" to slow down relative to those behind according to an adjustable ratio (“speed ratio”) such that when the speed ratio equals a value of less than 1, cyclists in front slow down relative
~ when the speed ratio is less than one, cyclists behind can accelerate toward the
~ associated with the rule above, a rule that adjusts the density and free
~ a rule that says when the cyclists reach a speed ratio of > .9,
Speed ratios are adjustable by a "slider" on the interface screen. Starting at the lowest speed ratio setting and sliding it forward, we can see how the group speeds up and gradually density increases.
As the speed ratio is increased to the arbitrary, but realistic, threshold setting of .9, the peloton shifts from high density to a stretched phase, or single-file line. This demonstrates an important effect in pelotons when riders synchronize speeds at near sustainable maximums. Weaker riders can sustain the same speeds of stronger riders by taking advantage of the energy-savings benefits of drafting (2). As the speed-ratio is further increased, the synchronized (single-file) phase breaks down and the peloton then exhibits mixed phase dynamics as it oscillates between single-file lines and high separation.
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. This is unlike Wilenski's flocking model, in which the “world” is open ended, and birds can turn and wrap to the other sides of the world in all directions.
There are three rules incorporated from Wilenski’s Netlogo flocking model: “alignment”, “separation”, and “cohesion”.
“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.
[The following two paragraphs are technical points which can safely be ignored
Under Wilenski's model, when two birds are too close, the “separation” rule overrides the cohesion and alignment rules, which are deactivated until the minimum separation is achieved. I have modified this rule so that the reverse happens here: when cyclists reach a minimum separation, all ASC rules are engaged; below the minimum separation, the rules disengage and all cyclists spread out without interacting. Put more simply: the greater the minimin separation setting for cyclists, the more likely the ASC rules are to engage, while in Wilenski’s flocking model, the greater the minimum separation setting, the less likely the rules ASC rules are to engage. This modification for the peloton model is important since it allows for the creation of an adjustable "drafting-zone" between cyclists, where the greater the drafting zone, the more the cyclists are able to interact. In my model, I have set the ASC rules so they correlate with variations in the speed-ratio.
Note that for realistic peloton behavior, the ASC sliders must be set very low so that the degree of random lateral movement is low. This simulates cyclists’ forward movement along a roadway, rather than birds in the air which can move in any direction.
More work is required. Most importantly, a modified routine is needed that allows for a more natural transition from the high density condition to the stretched condition. There are several other modifications one may consider as well, including the effects of wind or obstacles. Also, while the convection effect I have observed in pelotons (3) appears to be present in my model, it is difficult to see, and work is required to establish its actual presence or absence here. Nonetheless, at present, the model fairly demonstrates the main phases of peloton dynamics.
HOW TO USE IT
First, determine the number of cyclists you want in the simulation and divide that number by 4. Note there are four lines that cyclists start on in a random positions, and the count for the POPULATION slider reflects the number on each line.
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 the SPEED-RATIO-TO-CYCLIST-BEHIND slider, which mimics the dynamics that correspond to a changing Peloton Convergence Ratio (PCR) (1). You will see that ajdusting this slider alters the density of the group and whether they travel in lines or in clusters. Without adjusting any of the other sliders, try random adjustments to the SPEED-RATIO-TO-CYCLIST-BEHIND slider between about .8 and 1.3 to see how the group oscillates between high density clusters and single-file lines. Also notice the effects of changing the DRAFTING-ZONE slider.
Note that the DECELERATION SLIDER is primarily connected to the graphs and allows the graph to operate properly, and adjusting it will not alter the peloton behavior in any
In the html version, at the top of graphic interface there is also a slider that
THINGS TO NOTICE
Notice the increasing density as you slide the speed-ration slider from the low end to the high end, the pronounced transition at speed-ratio .9, and the the mixed-phase oscillations at speed-ratios over ratio 1.
Also, if you have adjusted the slider over 1 and you have allowed the group to break-up into smaller groups, adjust the slider back below .9, and see how larger groups will move faster than smaller groups, and when they are within a threshold distance, cyclists will "jump" across to the group ahead, allowing for a rapid reintegration of the groups.
At the .9 speed ratio, if you check the average speed graph, you will see that there appears to be a very slight drop in speed compared to the .8 ratio. This is counter-intuitive, and it represents the basis for a testable hypothesis in actual pelotons: is there a short term speed drop at a critical speed/density that precedes the transition to the stretched phase?
Central to the model is the observation that peloton behaviors form without a leader.
• Flocking; Flocking vee formation
CREDITS AND REFERENCES
This model relies in significant part on the work of Uri Wilenski, with important modifications that distinguish my 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 http://www.red3d.com/cwr/boids/.
(1) First reported in: Trenchard, H. and Mayer-Kress, G. 2005.
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.
I have referred to this alternately as a "divergence" ratio and a "convergence" ratio. Regardless, the idea is that when PCR < 1, the peloton is cohesive, and at PCR > 1,the peloton disintegrates (or disintegrates in those regions of the peloton where the condition exists). For other work I have done on peloton dynamics, see http://athabascau.academia.edu/HughTrenchard.
(2) Hagberg, T. and McCole, S. 1990. The effect of drafting and aerodynamics equipment
(3) Trenchard, H. 2012. The Complex Dynamics of Bicycle Pelotons
It should be noted that there is presently (as of 2012) a cycling race simulation developed by Samuel Manier in his work on 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". www.isir.upmc.fr/files/gameon_final.pdf, in
(back to the NetLogo User Community Models)