SciPost logo

SciPost Submission Page

LEMONS: An open-source platform to generate non-circuLar, anthropometry-based pEdestrian shapes and simulate their Mechanical interactiONS in two dimensions

by Oscar Dufour, Maxime Stapelle, Alexandre Nicolas

This is not the latest submitted version.

Submission summary

Authors (as registered SciPost users): Oscar Dufour · Alexandre NICOLAS · Maxime Stapelle
Submission information
Preprint Link: scipost_202507_00067v1  (pdf)
Code repository: https://github.com/odufour7/LEMONS
Code version: v1.0.0, 2025.07
Code license: CeCILL-B
Data repository: https://zenodo.org/records/16371833
Date submitted: July 24, 2025, 11:11 a.m.
Submitted by: Oscar Dufour
Submitted to: SciPost Physics Codebases
Ontological classification
Academic field: Physics
Specialties:
  • Statistical and Soft Matter Physics
  • Active Matter
Approaches: Theoretical, Computational

Abstract

To model dense crowds, the usual recourse to oversimplified (circular) pedestrian shapes and contact forces shows limitations. To help modellers overcome these limitations, we propose an open-source numerical tool. It consists of an online platform with a user-friendly graphical interface to generate 2D and 3D pedestrian crowds based on anthropometric data and a C\texttt{++} library that computes mechanical contacts with other agents and with obstacles, and evolves the crowd's configuration. Both can readily be called from Python scripts and leave free reins to the user for the decisional layer of the model, i.e., the choice of the desired velocities.

Current status:
Has been resubmitted

Reports on this Submission

Report #2 by Anonymous (Referee 2) on 2025-10-20 (Invited Report)

Strengths

  1. Overall, the authors should be congratulated on the technical scope and ambition of this work. The paper clearly describes the process by which the field of pedestrian dynamics modelling can improve the representation of pedestrian geometric forms in 2D. Creating such a tool, available for access in the open domain is to be commended.
  2. Code is described in detail, and the implementation of algorithms is rigorous.
  3. This work really does have the potential to be transformative in the field, creating a common code base for high density modelling. After quantified, and documented validation processes, it could become an extremely valuable contribution to the community.

Weaknesses

  1. Unfortunately, there are no validation tests implemented at any level to verify that the numerical outcomes are correct. These algorithms, ultimately, may be used to assess pedestrian and life safety, but without numerical comparison with real-world experimental results, the results, by definition, are only theoretical. The danger is that they produce such visually convincing motion that the viewer inherently trusts the results, where no numerical, scientific confidence has been proven.

  2. Section 2.2 - Mechanical interactions - This section describes a potentially very useful combination of equations / sub-models to estimate contact, forces, frictional effects, deformation etc. but it really needs a referenced set of parameters which should be used in the equations, including where the referenced data source comes from for each parameter, otherwise they appear to be theoretical only. Table 1 is given later, but it gives no referenced sources for the parametric values.

  3. The Discussion section 4.1 states that these mathematical operations in 2D may be questioned, in terms of height and hands. I agree that it may be questioned, but at a more fundamental level in the context of contact and force: when lateral contact force is applied to a shoulder, then the force applied will result in pedestrian movement and resistance pivoting from the standing foot / feet. If we are to realistically model pressure and movement, ignoring the standing feet and contact with ground seems to be an oversight.

  4. Overall, the Discussion section is firstly scientific discussion (4.1) followed by further sections which read like a user manual. It might be better to have a separate section 'Instructions to use' or a separate appendix which described precisely how the user should run the software, command by command.

  5. In section 4.4, the authors describe the implementation for bicycles. However, to implement bicycles before running any form of real-world validation on the base pedestrians seems like continuing to expand functionality before fully testing or validating the base components.

  6. The conclusion states that the representation is much more faithful than typical modelling, but the paper documents no numerical evidence to support this claim. At a fundamental level, the reviewer believes this needs to be addressed before publication in a scientific publication.

  7. Unfortunately, without any form of numerical validation, testing against real world results, the outcomes of the simulations may not be used to confidently predict real-world crowd movement or conditions.

Report

Item 1 in the journal acceptance criteria states that "Benchmarking tests must be provided" but no benchmarking tests are described which relate to the results of analytical outcomes to any real world experimental results or established performance benchmarks.

In it's current form, the work is impressive in it's scope and level of detail, but the referee believes that the issue of lack of documented validation testing against real world results needs to be addressed.

Requested changes

Requested, significant, changes to content:

  1. The reviewer strongly urges the authors to create a series of validation tests. Some testing of the real-world compressibility of bodies in crowd situations are available, and could be compared with, for example: a. Yoshimura, H. (2012). Estimation of crowd density by pressure on human body under experimentally overcrowded condition. In Proceedings of the 5th International Symposium on Human Behaviour in Fires (HBIF 2012). Interscience Communications Ltd. (and more recently) b. Rongyong Zhao, Arifur Rahman, Bingyu Wei, Cuiling Li, Yunlong Ma, Yuxing Cai, Lingchen Han, A literature review of contacting force measurement methods for pedestrian crowds, Heliyon, Volume 10, Issue 21, 2024, https://doi.org/10.1016/j.heliyon.2024.e39755.

  2. Please address the changes listed in the 'weaknesses' Section 2.2 - Mechanical interactions where the referee requests a referenced set of parameters which should be used in the model in order to achieve realistic results from the simulations.

Line by line comments: 3. In the abstract, the authors states "Both can readily be called", but in the preceding sentence you say that the tool consists of an online platform, with a graphical user interface, based on anthropometric data, and a C++ library. There are 4 items here: platform, GUI, data, library. I think you mean the online platform and the C++ library, but It would be clearer to state explicitly which elements can be called from Python. 4. Also in the abstract, the authors state that the scripts "leave free reins to the user for" but this is a strange phrase to use here - better to be clear, maybe "which enable the user to fully control" is better? 5. Line 43, delete "yet"". 6. Line 46, states "Most existing crowd dynamics models [2, 5, 7] represent pedestrians as disks". While this is true, it seems an oversight to not mention the other models which have simulated people as several circles before (at this stage in the text), such as Evac(https://sarjaweb.vtt.fi/pdf/workingpapers/2009/W119.pdf), Langston et al (https://doi.org/10.1016/j.ssci.2005.11.007) and Simulex (https://doi.org/10.1016/0379-7112(95)00019-P). These models do simulate people up to about 6-8 people/m2. 7. Line 58. The authors talk of turning to 'an alternative solution'. This gives the impression that this work is the first to use several circles to model the body form for a full pedestrian dynamics simulation, but it is not. However, it does improve on previous models, so should be phrased in those terms. 8. Line 60 and 61 is split around the insertion of a figure, even cuting a word in half. This shoudl be changed to be more readable. 9. Line 62 - 64 states that "Despite extensive research"on granular dynamics models rarely integrate non single-circle shapes, but there are several instances of models which have done this with multiple circles before, with some examples listed in item 5 above. 10. Line 124. Please provide a scientific defintion of "torso height". Is it measured between which skeletal or muscular points? 11. Line 125. Insert 'that'in between fact and fatalities to fix the grammar. 12. Line 159 states that dynamic contact "follows Coulomb's law" and while the code implementation may do so, there is no documented evidence for how it may be calibrated or tested in this context or implementation. 13. Line 167 states "leaves free reins". Wherever this phrase is used, please replace it with objective scientific terminology, where it would be better to say (in this example) that it 'enables the user to control or define the parameters'. 14. Line 220, where Youngs Modulus, and related intrinsic properties are quoted, we need documented evidsence for how these equations are calibrated or justified for the application of compressibility/'spring' for human bodies. 15. Line 365 - "You should run these tests each time you modify". It would be better to say "These tests should be repeated, after each modification to C++ code or data files." 16. Line 403 - the authors state that "these tests yielded the expected outcomes" but while the tests produced nice, detailed, convincing animations, they are only qualitative, viewer-specific tests and are not scientifically rigorous, with documented quantifiable outcomes. 17. The values in Table 1, for the example application, are critical to the level of realism achieved in the simulation. It is excellent that they are clearly documented, but we need references for each parameter. The evidence needs to be referenced or documented. 18. One general comment is that many of the figures multiple line captions. Somtimes, ten lines or more. It would aid reabaility to have a shorter caption and related explanation in the body of the text. 19. Line 635, 636, the authors state that the model is "much more faithful" than other models but unfortunately, there is no numerical proof for this claim, other than the geometric form of 5 circles is a (more geometrically accurate) incremental improvement over the previous 3 circle forms of modelling.

Recommendation

Ask for major revision

  • validity: high
  • significance: high
  • originality: good
  • clarity: high
  • formatting: excellent
  • grammar: excellent

Author:  Oscar Dufour  on 2025-12-16  [id 6151]

(in reply to Report 2 on 2025-10-20)
Category:
answer to question

Warnings issued while processing user-supplied markup:

  • Inconsistency: Markdown and reStructuredText syntaxes are mixed. Markdown will be used.
    Add "#coerce:reST" or "#coerce:plain" as the first line of your text to force reStructuredText or no markup.
    You may also contact the helpdesk if the formatting is incorrect and you are unable to edit your text.

Dear Editors, dear Reviewers,

We have taken due consideration of the detailed reports of the two Referees, who should be thanked for their careful reading of our manuscript and their knowledgeable comments.

We were glad to read that overall the Reviewers find our work worthy of interest, even though they deem some changes absolutely necessary. We will see in detail how we have implemented these changes and revised our manuscript in the following, but before that we should clarify the scope of our work in relation with two main issues identified by the Reviewers:

  1. Realism of the model and the (bottleneck) simulation: It is critical for us to stress that the model and code that we openly release is not a full pedestrian dynamics model. It is designed to produce realistic shapes in two dimensions and to solve the dynamics when physical contacts occur, but not to model the decisional process leading to the selection of a (desired) velocity, i.e., in what direction each agent intends to move at a given time. We will put forward in the future a pedestrian model that combines such a decisional layer with the mechanical model of LEMONS, but the reason why we chose to release LEMONS as a stand-alone open-source code is to enable modellers to easily include realistic physical shapes and contact handling in two dimensions in their own (decisional) model.

    In the case study of the original manuscript, we had illustrated how LEMONS works with the example of a bottleneck flow, with the implementation of an (explicitly admitted) very crude decisional layer. Both Reviewers have observed that the results with this crude decisional layer lacks realism to some extent. We agree that this choice of scenario (where the decisional layer strongly affects the outcome) was not very wise to illustrate our model. Instead, following the Reviewers' advice, we now show the propagation of a mechanical push through a row of people, which almost exclusively hinges on the mechanical layer and, therefore, compares much more favourable with experimental data, as expected.

  2. Force-based or velocity-based dynamics: The mathematical form of our dynamical equation has led to the (wrong) impression that the dynamics we describe are inertial, i.e., correspond to a 'force-based model'. As a matter of fact, this equation was just Newton's second law, which holds for the mechanical interactions in any case. Depending on the value of the relaxation time $t^{\text{(transl)}}$ that enters this equation, the dynamics will be either inertial (underdamped, large $t^{\text{(transl)}}$) or overdamped (small $t^{\text{(transl)}}$). The value we selected in the case study leads to rather overdamped dynamics, which do not display unrealistic oscillations of agents.

Below, we address one by one the comments of Reviewer 2.

Sincerely,

The Authors.

Referee 2

Weaknessess

R2.1

Unfortunately, there are no validation tests implemented at any level to verify that the numerical outcomes are correct. These algorithms, ultimately, may be used to assess pedestrian and life safety, but without numerical comparison with real-world experimental results, the results, by definition, are only theoretical. The danger is that they produce such visually convincing motion that the viewer inherently trusts the results, where no numerical, scientific confidence has been proven.

Response:

Our revision substantially transformed our manuscript in order to address this validation point, raised by both Reviewers. While we stress that our code solves the evolution of the crowd given by its mechanical interactions (and lets the user freely decide on the decisional layer used as input), we have now

  • clarified the distinction between the mechanical interactions and the decisional layer (which is necessary to conduct bona fide pedestrian simulations)

  • substituted the previous case study with one that is more narrowly centred on the mechanical layer and for which the output of our mechanical model can be compared to experimental data (Feldmann and Adrian 2023)

  • expanded the justification of the mechanical parameter values proposed in the Table of parameters.

That being said, it is important to make a distinction between

  • (i) tests pertaining to the verification of the code, i.e., to check the consistency of the output with the mechanical equations that the algorithm is supposed to implement,

  • (ii) tests intended to validate the algorithm by comparison to actual pedestrian crowds.

Regarding point (i), the code has been very largely verified via simple tests (generally disconnected from actual pedestrian scenarios) in situations with predictable output; some of the videos corresponding to these tests have been archived at https://doi.org/10.5281/zenodo.17885366 (along with experimentally comparable simulations of the propagation of a push through a row of pedestrians). The code passed all these tests.

Regarding point (ii), we have done our best to validate the model by substituting the practical case study with one that can be readily compared to experiments, and by further documenting the origin of the parameter values that we use, on top of the existing validation of shapes with anthropometric data. However, as we shall detail below, most crowd scenarios involve the pedestrian decisional layer and/or are highly sensitive to the dimensions of the agents or participants, which implies that they cannot be directly used to validate the proposed mechanical model.


R2.2

Section 2.2 - Mechanical interactions - This section describes a potentially very useful combination of equations / sub-models to estimate contact, forces, frictional effects, deformation etc. but it really needs a referenced set of parameters which should be used in the equations, including where the referenced data source comes from for each parameter, otherwise they appear to be theoretical only. Table 1 is given later, but it gives no referenced sources for the parametric values.

Response:

In the revised version, we clarify that the parameter values given in Table 1 were selected in order to reproduce experimental data (for the pushing experiments in the case study) and to produce credible output in simple situations. We also justify the compatibility of these values with the available literature on pedestrians:

-- We will detail here how to perform a simulation of a push that propagates through a queue of closely standing people, a scenario that mirrors recent experiments by Feldmann et al. (Feldmann and Adrian 2023) (and by Wang and Weng (Wang and Weng 2018)). Illustrative snapshots of the experiments are shown in actual Fig. 9. For us, the interest of this scenario is that it largely relies on the mechanical modelling layer, and only little on the decisional layer (for which we should recall that the user of our mechanical code has free reins). Consistently with the scope of this Codebase paper, we will defer the details of the experimental comparison to another publication. Estimation of the mechanical parameters. [ ...] The parameters employed in the simulations are detailed in Table 1. They were selected so as to match the experimental results of (Feldmann and Adrian 2023) and to produce credible output in simple scenarios. We start by justifying the consistency of the estimates for the key mechanical parameters.

The reason why we defer the Table to the practical case study is that the parameter values should not be deemed set in stone. As we explain, we provide reasonable values for these mechanical parameters, but the user can edit them (in particular, if the conditions differ: soft walls, participants wearing very thick coats and sweaters, etc.)


R2.3

The Discussion section 4.1 states that these mathematical operations in 2D may be questioned, in terms of height and hands. I agree that it may be questioned, but at a more fundamental level in the context of contact and force: when lateral contact force is applied to a shoulder, then the force applied will result in pedestrian movement and resistance pivoting from the standing foot / feet. If we are to realistically model pressure and movement, ignoring the standing feet and contact with ground seems to be an oversight.

Response:

We agree with the Reviewer and, among other limitations to the recourse to 2D, the revised version explicitly states that:

-- Along similar lines, since pedestrians may stand and pivot on only their right or left leg, whereas the model computes torques along the body's central vertical axis, in some circumstances it might be necessary to account for the difference between the right or left leg's axis and the central axis. In principle, if the stepping dynamics are known, this can be achieved via the parallel axis theorem, even though in practice it may prove complicated.


R2.4

Overall, the Discussion section is firstly scientific discussion (4.1) followed by further sections which read like a user manual. It might be better to have a separate section 'Instructions to use' or a separate appendix which described precisely how the user should run the software, command by command.

Response:

This section has been extended to include a discussion on the mechanical parameter values and the 'new' case study, where the numerical results can be confronted to experimental data. We believe that the new content better fits the Discussion header for that part.


R2.5

In section 4.4, the authors describe the implementation for bicycles. However, to implement bicycles before running any form of real-world validation on the base pedestrians seems like continuing to expand functionality before fully testing or validating the base components.

Response:

On this specific question, our viewpoint differs from that of the Reviewer. We strove to explain as best we could in the manuscript that the inclusion of bicycles should not mainly be seen as a new functionality, but as evidence that our platform, file format and algorithm are designed so that they can easily be refined and expanded by users. It makes no doubt to us that our pedestrian database would deserve to be extended, e.g., to model pedestrians carrying backpacks or to refine the values of the mechanical parameters.

But, contrary to the Reviewer, we thought that showing that even bicycles can be drawn while keeping the same configuration file format was more striking evidence than, say, implementing the shape of a pedestrian with a backpack (which may give the wrong impression that all possible options for pedestrians have been explored).

To explain these points, we have added the following sentence:

-- This software was designed so that further developments can easily be implemented, particularly to include a wider variety of agents, e.g., people carrying a backpack, children, etc. To prove this point, we chose a very different type of shapes, namely, bicycles, and implemented them in the 2D agent generation on the online application.


R2.6

The conclusion states that the representation is much more faithful than typical modelling, but the paper documents no numerical evidence to support this claim. At a fundamental level, the reviewer believes this needs to be addressed before publication in a scientific publication.

Response:

This specific statement in our conclusion reads: "[Our code] promotes realistic 2D projections of pedestrians, grounded in anthropometric data and much more faithful than the typical circular assumption, and it computes contact forces derived from Physics".

It seems to us that this specific statement is factual, insofar as, for the projected shapes, the faithfulness of our representations is gauged against anthropometric data.

Regarding the mechanical contact interactions, following the Reviewers' comments, the new practical case study now compares the model output to real-world experiments. We also justify the parameter values on the basis of the existing literature.

For sure, we do not mean that our code reproduces faithful pedestrian dynamics as a whole and, in the revision, we have done our best to further clarify that the provided code only deals with shapes and mechanical interactions in two dimensions, and not decisions made by the pedestrians.


R2.7

Unfortunately, without any form of numerical validation, testing against real world results, the outcomes of the simulations may not be used to confidently predict real-world crowd movement or conditions.

Response:

The above claim of realism is rooted in the foregoing points (see reply to Question 6), as we have now clarified. We do not claim in any way that our code provides a better model for (full) pedestrian dynamics, or for the prediction of real-world crowd movements. In our view, it cannot even compete in this category, because it does not feature a decisional layer. On the other hand, we do believe that it supplementing a 2D pedestrian decision model with our code to create shapes and handle mechanical contacts in dense scenarios is definitely a more reliable option than working with hard disks (as is often done, out of convenience) or ellipses constrained to not overlap.

Requested changes

R2.1

The reviewer strongly urges the authors to create a series of validation tests. Some testing of the real-world compressibility of bodies in crowd situations are available, and could be compared with, for example: a. Yoshimura, H. (2012). Estimation of crowd density by pressure on human body under experimentally overcrowded condition. In Proceedings of the 5th International Symposium on Human Behaviour in Fires (HBIF 2012). Interscience Communications Ltd. (and more recently) b. Rongyong Zhao, Arifur Rahman, Bingyu Wei, Cuiling Li, Yunlong Ma, Yuxing Cai, Lingchen Han, A literature review of contacting force measurement methods for pedestrian crowds, Heliyon, Volume 10, Issue 21, 2024, https://doi.org/10.1016/j.heliyon.2024.e39755.

Response:

Since this was a major issue raised by the Referee, we have considered this point with great attention and extended our search for relevant literature (Xiaohong Li et al. 2018; Wang and Weng 2018; Song et al. 2019; Xudong Li et al. 2020, 2021) beyond the two papers that are listed.

Unfortunately, leaving aside the dispersion in the reported contact forces, the majority of these papers cannot be exploited to reliably validate our mechanical model, either because they involve decisions by pedestrians (e.g., what distance to keep at a bottleneck, independently of the mechanical interactions) or because of the extreme sensitivity of the contact forces to the density. Let us clarify this last point: As found inter alia by Li et al. (Xiaohong Li et al. 2018), the contact forces rise very steeply with density when pedestrians come into contact. In other words, for almost the same density, the mean contact force can be one order of magnitude larger or smaller.

This is fully consistent with our model involving a large Young modulus $E_{\mathrm{body}}$ for pedestrian-pedestrian contacts: if two side-by-side pedestrians in contact get closer by only one centimeter, their contact force will increase by roughly $\frac{1\,\mathrm{cm}}{20\,\mathrm{cm}} \cdot E_{\mathrm{body}} \cdot \mathcal{A}\approx 500\,\mathrm{N}$ (where $\mathcal{A}\approx 10\mathrm{cm}\times 10\mathrm{cm}$ is the contact area). In short: depending on the exact dimensions we choose for the agents and their arrangements, our code can produce virtually any (reasonable) mean contact force. But showing such an agreement with experimental data for fine-tuned agent sizes and arrangements would not validate the code in any way, so we refrain from displaying such coincidental agreement.

On the other hand, there remains one type of experiments in which the pushing force is externally imposed and the configuration is known. These are the experiments about the propagation of a push through a row of people. In the revised version, we now dedicate the practical case study to simulating this scenario and showing the output of the model alongside experimental results.


R2.2

Please address the changes listed in the 'weaknesses' Section 2.2 - Mechanical interactions where the referee requests a referenced set of parameters which should be used in the model in order to achieve realistic results from the simulations. [cf Section 2.2 - Mechanical interactions - This section describes a potentially very useful combination of equations / sub-models to estimate contact, forces, frictional effects, deformation etc. but it really needs a referenced set of parameters which should be used in the equations, including where the referenced data source comes from for each parameter, otherwise they appear to be theoretical only. Table 1 is given later, but it gives no referenced sources for the parametric values.]

Response:

We have addressed this point by

  • clarifying that the pedestrian parameter values were selected to reproduce the push-propagation experiments that are now presented as a practical case study

  • justifying that some key values are compatible existing publications, which we now reference in Table 1

  • showing the results of the new case study together with the experimental data.


R2.3

Line by line comments: 3. In the abstract, the authors states "Both can readily be called", but in the preceding sentence you say that the tool consists of an online platform, with a graphical user interface, based on anthropometric data, and a C++ library. There are 4 items here: platform, GUI, data, library. I think you mean the online platform and the C++ library, but It would be clearer to state explicitly which elements can be called from Python.

Response:

We have changed the abstract to clarify what we mean:

-- It consists of a Python library that generates 2D and 3D pedestrian crowds based on anthropometric data, and a C++ library that computes mechanical contacts with other agents and with obstacles, and evolves the crowd's configuration. Additionally, we provide an online platform with a user-friendly graphical interface for the first library, and scripts to call the second library from Python. The tool enables users to implement their own decisional layer, i.e., to control the agents' choices of desired velocities.


R2.4

Also in the abstract, the authors state that the scripts "leave free reins to the user for" but this is a strange phrase to use here - better to be clear, maybe "which enable the user to fully control" is better?

Response:

Indeed. We have rephrased that part to reflect the fact that the "decision" part, as we call it, is absent from our code and is thus left to the user.


R2.5

Line 43, delete "yet".

Response:

We made the change.


R2.6

Line 46, states "Most existing crowd dynamics models [2, 5, 7] represent pedestrians as disks". While this is true, it seems an oversight to not mention the other models which have simulated people as several circles before (at this stage in the text), such as Evac(https://sarjaweb.vtt.fi/pdf/workingpapers/2009/W119.pdf), Langston et al (https://doi.org/10.1016/j.ssci.2005.11.007) and Simulex (https://doi.org/10.1016/0379-7112(95)00019-P). These models do simulate people up to about 6-8 people/m2.

Response:

In the revision, we extend the literature review in the paragraph that just follows in order to include these references (Langston et al. was already cited):

-- Despite extensive research on granular dynamics, non-circular body shapes have so far only been integrated into a relatively small number of pedestrian models. Elliptical volume exclusion was incorporated into generalised centrifugal force models, prioritising inertial forces over traditional damped-spring mechanics for pedestrian contact (Chraibi, Seyfried, and Schadschneider 2010). For models relying on the concept of velocity obstacles, the original circular agents' shapes were gradually extended to ellipsoids (EORCA), or polygonal approximations thereof for computational efficiency (Narang, Best, and Manocha 2017; Best, Narang, and Manocha 2016), and to arbitrary shapes approximated by stitching rounded trapezoids centered on the medial axis of the shape (Ma, Manocha, and Wang 2018). These ellipsoidal or arbitrarily-shaped representations govern the choice of an optimal velocity that ideally enables collision-free navigation (decisional purpose), alien to any consideration of mechanical interactions. If one focuses on models including short-range and/or contact interactions, Langston et al. represented pedestrians with three overlapping circles in a discrete-element simulation (Langston, Masling, and Asmar 2006). So, too, did Korhonen et al. (FDS+EVAC) (Korhonen et al. 2009) and Song et al. (Song et al. 2019) in the mechanically simpler context of modified social-force models (also see the 1995 paper by Thompson et al. (Thompson and Marchant 1995)), while spheropolygons (Alonso-Marroquı́n et al. 2014) or spherocylinders (Echeverría-Huarte, Zuriguel, and Hidalgo 2020; Hidalgo, Parisi, and Zuriguel 2017) were later introduced in force-based simulations incorporating self-propulsion forces as well as granular material interactions governed by Newtonian mechanics, notably to model competitive egress scenarios. Recently, the human torso has been modelled as a capsule in a flow governed by position-based dynamics, supplemented with short-range interactions (Talukdar and Weiss 2025).


R2.7

Line 58. The authors talk of turning to 'an alternative solution'. This gives the impression that this work is the first to use several circles to model the body form for a full pedestrian dynamics simulation, but it is not. However, it does improve on previous models, so should be phrased in those terms.

Response:

We changed the text to:

-- Therefore, instead of reducing disk diameters, we refine existing elongated-body formulations and represent the mechanical shape of a pedestrian by an anistropic shape that better captures pedestrian morphology and multi-contact interactions.


R2.8

Line 60 and 61 is split around the insertion of a figure, even cuting a word in half. This shoudl be changed to be more readable.

Response:

We removed all hyphens from the text.


R2.9

Line 62 - 64 states that "Despite extensive research"on granular dynamics models rarely integrate non single-circle shapes, but there are several instances of models which have done this with multiple circles before, with some examples listed in item 5 above.

Response:

We changed the text to:

-- Despite extensive research on granular dynamics, non-circular body shapes have so far been integrated into pedestrian models only in a relatively small number of studies.

And, we speak about the multiple-circle models just after.


R2.10

Line 124. Please provide a scientific defintion of "torso height". Is it measured between which skeletal or muscular points?

Response:

We include the definition in the manuscript as follows:

-- The torso height corresponds to the height where chest depth and bideltoid breadth are measured in the anthropometric data, as shown in Fig. 2 from the Visible Human Project cadavers. Specifically, it corresponds to 151.6 cm for the male cadaver and 138.369 cm for the female cadaver.


R2.11

Line 125. Insert 'that'in between fact and fatalities to fix the grammar.

Response:

We made the change.


R2.12

Line 159 states that dynamic contact "follows Coulomb's law" and while the code implementation may do so, there is no documented evidence for how it may be calibrated or tested in this context or implementation.

Response:

This is true and we have deleted the phrase "follows Coulomb's law". Thank you for raising this point.

On the other hand, we have added the reference (Alonso-Marroquı́n et al. 2013), in which the authors describe experiments for measuring mechanical coefficients, including the kinetic friction coefficient (used in the Coulomb contact law), for contacts between wood particles. This work could help in designing an experimental setup to measure these coefficients more precisely for pedestrian--pedestrian contact, which, to our knowledge, has not yet been done.


R2.13

Line 167 states "leaves free reins". Wherever this phrase is used, please replace it with objective scientific terminology, where it would be better to say (in this example) that it 'enables the user to control or define the parameters'.

Response:

We have taken this remark into account by stressing in the manuscript that we do not provide a full pedestrian model, and we have replaced the "leaves free reins" in that sentence with more objective phrasing.


R2.14

Line 220, where Young Modulus, and related intrinsic properties are quoted, we need documented evidence for how these equations are calibrated or justified for the application of compressibility/'spring' for human bodies.

Response:

Point taken! We now clarify that substituting the moduli (that come from Continuum Mechanics) with springs (and dashpots) in order to derive contact forces is common practice in discrete-element simulations:

-- these moduli enter the stiffness of the springs that are used to model contact interactions, following common practice in the discrete-element method (the formulae are derived from [45,46], also see Fig. 5)

In other words, this is a technical solution to the contact problem between two solid bodies, once the equations of Continuum Mechanics and friction at contacts have been posed. Resorting to springs does not introduce a new fundamental hypothesis.


R2.15

Line 365 - "You should run these tests each time you modify". It would be better to say "These tests should be repeated, after each modification to C++ code or data files."

Response:

We made the change.


R2.16

Line 403 - the authors state that "these tests yielded the expected outcomes" but while the tests produced nice, detailed, convincing animations, they are only qualitative, viewer-specific tests and are not scientifically rigorous, with documented quantifiable outcomes.

Response:

The Reviewer is right insofar as our statement was ambiguous; it was meant in terms of verification (global consistency with the mechanical equations) and not validation. We have revised the text to clarify this:

-- These tests yielded outcomes that concord with the expectations for the implemented mechanical model.


R2.17

The values in Table 1, for the example application, are critical to the level of realism achieved in the simulation. It is excellent that they are clearly documented, but we need references for each parameter. The evidence needs to be referenced or documented.

Response:

We agree with the Reviewer that the values of the parameters are an important point, so we have amended the table of parameters to include some sources and references. We also clarify that we have checked that this set of parameters produces visually realistic dynamics, e.g. in case of collisions.

However, it is also crucial to understand that these parameter estimates should be taken with a grain of salt. In particular, regarding the mechanical response of the human body, since the human body is not a uniform linear elastic solid, the accurate value of the effective (e.g. Young or shear) moduli should depend on the specifics of the contact: Where exactly are the contact areas? Are hands involved? How intense are the contacts (insofar as the body is multi-layered and, depending on how deep one indents it, one will mostly feel the clothing, the elasticity of the skin, the compression of the thorax, etc.)? In case of light contacts, what kind of clothes are the people wearing?

It follows from these considerations that what is central in our contribution is a versatile algorithm to simulate the dynamics of crowds with mechanical contacts and the possibility to define the values of the parameters. The values that we give are reasonable estimates (which we now better reference, following the Reviewer's advice), but not irrefutable ground truth.


R2.18

One general comment is that many of the figures multiple line captions. Somtimes, ten lines or more. It would aid reabaility to have a shorter caption and related explanation in the body of the text.

Response:

Thank you for raising this point. We have revised all figure captions to make them more concise. In particular, we moved the detailed physics explanations from the captions of Fig. 5 into the main text.


R2.19

Line 635, 636, the authors state that the model is "much more faithful" than other models but unfortunately, there is no numerical proof for this claim, other than the geometric form of 5 circles is a (more geometrically accurate) incremental improvement over the previous 3 circle forms of modelling.

Our sentence in the original manuscript was:

-- it promotes realistic 2D projections of pedestrians, grounded in anthropometric data and much more faithful than the typical circular assumption.

In light of the anthropometric data which we have used to define the 2D shapes (and the comparison with cross sections of the 3D reference body at different heights), we do believe that the proposed 2D shapes are more faithful than a circle. So, while we agree with the Reviewer that there is only limited evidence supporting the full mechanical model, it seems to us that our sentence was unambiguous and objectively true.

It might be helpful to state again that our main motivation in releasing this open-source code (which is devoid of a decisional layer) is not to compare or compete with other pedestrian models (possibly already involving anisotropic shapes), but to assist scientists in the development (and use) of their (new) models: many of them would settle for a circular shape to test their decisional model, if they cannot easily make use of an alternative; we were eager to provide them with an easy-to-use alternative in 2D.

References

Alonso-Marroquı́n, Fernando, Jonathan Busch, Coraline Chiew, Celia Lozano, and Álvaro Ramı́rez-Gómez. 2014. "Simulation of counterflow pedestrian dynamics using spheropolygons." Phys. Rev. E 90 (6): 063305. https://doi.org/10.1103/PhysRevE.90.063305.

Alonso-Marroquı́n, Fernando, Álvaro Ramı́rez-Gómez, Carlos González-Montellano, Nigel Balaam, Dorian A. H. Hanaor, E. A. Flores-Johnson, Yixiang Gan, Shumiao Chen, and Luming Shen. 2013. "Experimental and numerical determination of mechanical properties of polygonal wood particles and their flow analysis in silos." Granular Matter 15 (6): 811--26. https://doi.org/10.1007/s10035-013-0443-7.

Best, Andrew, Sahil Narang, and Dinesh Manocha. 2016. "Real-Time Reciprocal Collision Avoidance with Elliptical Agents." In 2016 IEEE International Conference on Robotics and Automation (ICRA), 298--305. IEEE. https://doi.org/10.1109/ICRA.2016.7487148.

Chraibi, Mohcine, Armin Seyfried, and Andreas Schadschneider. 2010. "Generalized Centrifugal Force Model for Pedestrian Dynamics." Physical Review E 82: 046111. https://doi.org/10.1103/PhysRevE.82.046111.

Chraibi, Mohcine, Armel Ulrich Kemloh Wagoum, Andreas Schadschneider, and Armin Seyfried. 2011. "Force-Based Models of Pedestrian Dynamics." Networks Heterog. Media 6 (3): 425--42. https://doi.org/10.3934/nhm.2011.6.425.

Echeverría-Huarte, I., I. Zuriguel, and R. C. Hidalgo. 2020. "Pedestrian Evacuation Simulation in the Presence of an Obstacle Using Self-Propelled Spherocylinders." Physical Review E 102 (1): 012907. https://doi.org/10.1103/PhysRevE.102.012907.

Echeverrı́a-Huarte, Iñaki, and Alexandre Nicolas. 2023. "Body and Mind: Decoding the Dynamics of Pedestrians and the Effect of Smartphone Distraction by Coupling Mechanical and Decisional Processes." Transportation Research Part C: Emerging Technologies 157: 104365. https://doi.org/10.1016/j.trc.2023.104365.

Feldmann, Sina, and Juliane Adrian. 2023. "Forward propagation of a push through a row of people." Saf. Sci. 164 (August). https://doi.org/10.1016/j.ssci.2023.106173.

Hidalgo, R. C., D. R. Parisi, and I. Zuriguel. 2017. "Simulating Competitive Egress of Noncircular Pedestrians." Physical Review E 95 (4): 042319. https://doi.org/10.1103/PhysRevE.95.042319.

Korhonen, Timo, Simo Hostikka, Simo Heliövaara, and Harri Ehtamo. 2009. "FDS+ Evac: An Agent Based Fire Evacuation Model." In Pedestrian and Evacuation Dynamics 2008, 109--20. Springer. https://doi.org/10.1007/978-3-642-04504-2_8.

Langston, Paul A, Robert Masling, and Basel N Asmar. 2006. "Crowd dynamics discrete element multi-circle model" Saf. Sci. Elsevier. https://doi.org/10.1016/j.ssci.2005.11.007.

Li, Xiaohong, Jianan Zhou, Feng Chen, and Zan Zhang. 2018. "Cluster Risk of Walking Scenarios Based on Macroscopic Flow Model and Crowding Force Analysis." Sustainability 10 (2): 385. https://doi.org/10.3390/su10020385.

Li, Xudong, Luciano Telesca, Michele Lovallo, Xuan Xu, Jun Zhang, and Weiguo Song. 2020. "Spectral and Informational Analysis of Pedestrian Contact Force in Simulated Overcrowding Conditions." Physica A: Statistical Mechanics and Its Applications 555: 124614. https://doi.org/10.1016/j.physa.2020.124614.

Li, Xudong, Xuan Xu, Jun Zhang, Kechun Jiang, Weisong Liu, Ruolong Yi, and Weiguo Song. 2021. "Experimental Study on the Movement Characteristics of Pedestrians Under Sudden Contact Forces." Journal of Statistical Mechanics: Theory and Experiment 2021 (6): 063406. https://doi.org/10.1088/1742-5468/ac02c7.

Ma, Yuexin, Dinesh Manocha, and Wenping Wang. 2018. "Efficient Reciprocal Collision Avoidance between Heterogeneous Agents Using CTMAT." In ACM Conferences, 1044--52. International Foundation for Autonomous Agents; Multiagent Systems. https://doi.org/10.5555/3237383.3237853.

Narang, Sahil, Andrew Best, and Dinesh Manocha. 2017. "Interactive Simulation of Local Interactions in Dense Crowds Using Elliptical Agents." Journal of Statistical Mechanics: Theory and Experiment 2017 (3): 033403. https://doi.org/10.1088/1742-5468/aa58ab.

Song, Jingni, Feng Chen, Yadi Zhu, Na Zhang, Weiyu Liu, and Kai Du. "Experiment Calibrated Simulation Modeling of Crowding Forces in High Density Crowd." Ieee Access 7: 100162--73. https://doi.org/10.1109/ACCESS.2019.2930104.

Talukdar, Bilas, and Tomer Weiss. 2025. "Generalized, Dynamic Multi-agent Torso Crowds." Proc. ACM Comput. Graph. Interact. Tech. 8 (1): 1--15. https://doi.org/10.1145/3728303.

Thompson, Peter A, and Eric W Marchant. 1995. "A Computer Model for the Evacuation of Large Building Populations." Fire Safety Journal 24 (2): 131--48. https://doi.org/10.1016/0379-7112(95)00019-P.

Wang, Chongyang, and Wenguo Weng. 2018. "Study on the Collision Dynamics and the Transmission Pattern Between Pedestrians Along the Queue." Journal of Statistical Mechanics: Theory and Experiment 2018 (7). https://doi.org/10.1088/1742-5468/aace27.

Report #1 by Anonymous (Referee 1) on 2025-10-17 (Invited Report)

Strengths

Synopsis

LEMONS proposes a theoretical model of dense crowds in which individuals are subject to contact forces. LEMONS also provides a free and open software implementation of algorithms derived from the model. LEMONS models human bodies, in 2D, through five overlapping circles. This allows harnessing models of contact forces based on imaginary springs between circular bodies. These contact models are well understood, and they are well accepted for granular matter.

Strenghts

  1. To my knowledge, this is the first work that explicitly models contact forces according to the state-of-the art of granular matter spring models. Former models tend to postulate a “repulsive force” between bodies, which achieves a form of collision avoidance but cannot deal with friction, or deformation. It seems very plausible to me to assume that the contact forces in very dense crowds are similar to those observed for granular matter.

  2. The idea to approximate the human body in 2D, through five circles, and, thus, to be able to harness “classic” contact force models among spheres, is simple and elegant.

  3. The authors do not only offer a theory, but also a free and open-source implementation, thus, paving the ground for other researchers. They also facilitate validation (or falsification). I find this commendable.

  4. LEMONS has a set of tests that one should execute when changing code so that one does not, unintentionally, destroy desirable program properties. This is the nucleus of an integrated test pipeline.

  5. LEMONS is easy to find, and easily accessible through github. Its license is compatible with GNU GPL. The repository contains documentation and it appears structured. Configuration is through files, that is, it takes place on a high level. A glance at the code revealed readable code that appeared clean ( as defined by Robert C. Martin: https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29) ). A Python-wrapper makes the functionality accessible for a wider community, while the C++ program core facilitates object-orientation and a modular structure.

  6. My team have downloaded and run the software. They found it quite enjoyable and consider the documentation clear, well-structured and easy to navigate.

Weaknesses

Weaknesses

Before I go into weaknesses and suggestions for improvements, I would like to underline that, in my eyes, the strengths, even if only stated briefly, outweigh the weaknesses by far.

  1. The authors express the opinion, in their first sentence in the introduction, that Newtonian mechanics is the accepted model for pedestrian locomotion towards a target: “From an external physical standpoint, pedestrians are just mechanical bodies obeying Newton’s equations of motion”. However, this is not a universally accepted truth. Indeed, we have seen the advent of velocity-based ordinary differential equation models who seek to avoid the “behavioural” oscillations of the harmonic oscillator. We also see a number of models that do not rely on differential equations at all, but prefer utility-based (homo economicus), heuristic, or even stochastic decision making for their agents. Given the fact that human motion is bi-pedal, and thus step wise, and that it is will-driven, I find that one cannot ignore the arguments behind these models and claim that Newtonian mechanics is physically correct. I ask the authors to find a less general formulation such as “In this work, we consider pedestrians as mechanical bodies obeying…”.

  2. The model implementation relies on Newtonian mechanics not only for the contact forces, but also for contact-free motion towards a target. I find this a pity, because modellers, who feel that social-force-like locomotion does not capture the behaviour that they are interested in, cannot build on LEMONS. I would welcome a way to interface with other locomotion models. One would perhaps start with velocity-based ODE models.

  3. The sample bottleneck in the Fig. 9 shows body orientations that do not reflect queuing behaviour. Even if one assumes “competitive” behaviour, which is an exception rather than the rule, humans would be able to “negotiate” and “wiggle through”. This underlines, that the model may not be valid for scenarios that are not dense from all sides. More validation tests appear in order, possibly some calibration. Most likely one will end up with stating limitations.

  4. While LEMONS has its own set of tests that are to be executed with each software change for verification, there are also standardized validation tests against empirical data: above all, I recommend ISO 20414 and NIST TN 1833. If LEMONS passed at least some of these tests, the community would certainly be more inclined to trust the new model. There even is a bottleneck test with a base scenario very similar to Fig. 9. Why not build on it?

  5. While the code is on github, which is great, it is on author Oscar Dufour’s personal space. What will happen if he leaves academia? Who will guarantee continued access?

  6. LEMON does not have a CI (continuous integration) pipeline with automatic and compulsory tests before programmers push code to the repository.

  7. One small improvement for the documentation would be to add a note to the Test tab indicating that the current files and paths are set up for macOS and that users of Linux or Windows need to adjust them accordingly. A brief reminder in the documentation would enhance clarity and usability for all users.

Report

I would like to see this work published. I think the Journal's criteria have been met to an exceptional degree.

Requested changes

  1. My only “hard” request for revision is, that the authors discuss the limitation that comes with modelling non-dense scenarios through a harmonic oscillator type model, that is, as force-driven locomotion towards a target. For future work: I think that the value for the scientific community would be much greater still, if the authors also found a way to interface with velocity-based differential equation models or, even better, with models that, for non-contact scenarios, forgo differential equations all together.

  2. A second “softer” suggestion is, that the authors discuss that the queuing in Fig. 9., does not reflect empirical observation. As such, the current model may be limited to very dense situations where agents have contacts to others from all sides.

Recommendation

Publish (surpasses expectations and criteria for this Journal; among top 10%)

  • validity: top
  • significance: top
  • originality: top
  • clarity: high
  • formatting: excellent
  • grammar: excellent

Author:  Oscar Dufour  on 2025-12-16  [id 6150]

(in reply to Report 1 on 2025-10-17)
Category:
answer to question

Warnings issued while processing user-supplied markup:

  • Inconsistency: Markdown and reStructuredText syntaxes are mixed. Markdown will be used.
    Add "#coerce:reST" or "#coerce:plain" as the first line of your text to force reStructuredText or no markup.
    You may also contact the helpdesk if the formatting is incorrect and you are unable to edit your text.

Dear Editors, dear Reviewers,

We have taken due consideration of the detailed reports of the two Referees, who should be thanked for their careful reading of our manuscript and their knowledgeable comments.

We were glad to read that overall the Reviewers find our work worthy of interest, even though they deem some changes absolutely necessary. We will see in detail how we have implemented these changes and revised our manuscript in the following, but before that we should clarify the scope of our work in relation with two main issues identified by the Reviewers:

  1. Realism of the model and the (bottleneck) simulation: It is critical for us to stress that the model and code that we openly release is not a full pedestrian dynamics model. It is designed to produce realistic shapes in two dimensions and to solve the dynamics when physical contacts occur, but not to model the decisional process leading to the selection of a (desired) velocity, i.e., in what direction each agent intends to move at a given time. We will put forward in the future a pedestrian model that combines such a decisional layer with the mechanical model of LEMONS, but the reason why we chose to release LEMONS as a stand-alone open-source code is to enable modellers to easily include realistic physical shapes and contact handling in two dimensions in their own (decisional) model.

    In the case study of the original manuscript, we had illustrated how LEMONS works with the example of a bottleneck flow, with the implementation of an (explicitly admitted) very crude decisional layer. Both Reviewers have observed that the results with this crude decisional layer lacks realism to some extent. We agree that this choice of scenario (where the decisional layer strongly affects the outcome) was not very wise to illustrate our model. Instead, following the Reviewers' advice, we now show the propagation of a mechanical push through a row of people, which almost exclusively hinges on the mechanical layer and, therefore, compares much more favourable with experimental data, as expected.

  2. Force-based or velocity-based dynamics: The mathematical form of our dynamical equation has led to the (wrong) impression that the dynamics we describe are inertial, i.e., correspond to a 'force-based model'. As a matter of fact, this equation was just Newton's second law, which holds for the mechanical interactions in any case. Depending on the value of the relaxation time $t^{\text{(transl)}}$ that enters this equation, the dynamics will be either inertial (underdamped, large $t^{\text{(transl)}}$) or overdamped (small $t^{\text{(transl)}}$). The value we selected in the case study leads to rather overdamped dynamics, which do not display unrealistic oscillations of agents.

Below, we address one by one the comments of Reviewers 1 and 2.

Sincerely,

The Authors.

Referee 1

Weaknessess

R1.1

The authors express the opinion, in their first sentence in the introduction, that Newtonian mechanics is the accepted model for pedestrian locomotion towards a target: “From an external physical standpoint, pedestrians are just mechanical bodies obeying Newton’s equations of motion”. However, this is not a universally accepted truth. Indeed, we have seen the advent of velocity-based ordinary differential equation models who seek to avoid the “behavioural” oscillations of the harmonic oscillator. We also see a number of models that do not rely on differential equations at all, but prefer utility-based (homo economicus), heuristic, or even stochastic decision making for their agents. Given the fact that human motion is bi-pedal, and thus step wise, and that it is will-driven, I find that one cannot ignore the arguments behind these models and claim that Newtonian mechanics is physically correct. I ask the authors to find a less general formulation such as “In this work, we consider pedestrians as mechanical bodies obeying…”.

Response:

We have taken due note of the Reviewer's remark, but we believe that there may have been a misunderstanding: we do not claim on any account that Newton's law should be used to model the full dynamics of pedestrians. We are aware that, among other artefacts, this may lead to spurious oscillations (Chraibi et al. 2011). As a matter of fact, independently of the present manuscript, we develop models in the continuation of ANDA (Echeverrı́a-Huarte and Nicolas 2023) that overall strongly depart from Newton's law.

What we meant is that, if one temporarily leaves aside internal forces and considers the pedestrian body from an external perspective, it is a mechanical body (in the mechanical parlance) and, as such, it should obey the principles of Newtonian mechanics. But internal forces do certainly play a role and, therefore, there is no reason why the full dynamics should be Newtonian. Analytically, these contributions are split as follows:

  1. Newton's equations apply to the body as a whole, provided they are complemented with (yet unknown) internal forces which notably make the pedestrian move forward

  2. The internal forces are controlled by other dynamics (which we subsume into the name 'decisional layer'), which will not be the focus of the present manuscript (but, of course, our code is agnostic to the choice of these internal dynamics: any self-propulsion force can be used as input for our code, starting from the simplest ones, i.e., constant forces).

To avoid delving into this detailed decomposition already in the first sentence of the manuscript, we have preferred rephrasing it to avoid ambiguities:

-- From an external physical viewpoint, a pedestrian is a deformable mechanical body. As such, the pedestrians' bodies obey Newtonian mechanics. In particular, they experience physical forces (e.g. if they happen to push against a wall) which partly constrain their motion. Yet, they differ from inert objects, in that, upon flexing their muscles, they can internally deform their bodies and thus self-propel via the interaction with the ground. This reveals two intrinsically coupled levels of pedestrian dynamics: the mechanical level and the decision-making level (which controls the internal body deformation and is not governed by Mechanics).


R1.2

The model implementation relies on Newtonian mechanics not only for the contact forces, but also for contact-free motion towards a target. I find this a pity, because modellers, who feel that social-force-like locomotion does not capture the behaviour that they are interested in, cannot build on LEMONS. I would welcome a way to interface with other locomotion models. One would perhaps start with velocity-based ODE models.

Response:

We understand the Reviewer's concern about Newton's law applying to the full dynamics, and we share it. (Also see our reply to your first question.) Perhaps we should have clarified that our proposed framework keeps operating with limiting or even vanishing inertia, i.e., in the velocity-based limit. More precisely, the input parameter $\rm t^{\rm(transl)}$ called "relaxation time for translational motion" controls the effective friction. Provided that it is set to a short enough, then the equation boils down to a velocity-based equation. (Note that the default value is 0.5s, which is rather short: clearly, the modelled agents are not dominated by inertia.)

We have now clarified this important aspect in the following paragraphs:

-- The software release consists of (i) [...] (ii) a C++ library to compute mechanical contact forces in two dimensions and then evolve the crowd according to Newton's equation of motion (in the overdamped regime or in the inertial, underdamped one)

Below Eq. (1):

-- Importantly, depending on the time scale $\rm t^{\rm(transl)}$, Eq. (1) will describe either inertial, underdamped translation dynamics (long $\rm t^{\rm(transl)}$) or overdamped dynamics (short $\rm t^{\rm(transl)}$).


R1.3

The sample bottleneck in the Fig. 9 shows body orientations that do not reflect queuing behaviour. Even if one assumes “competitive” behaviour, which is an exception rather than the rule, humans would be able to “negotiate” and “wiggle through”. This underlines, that the model may not be valid for scenarios that are not dense from all sides. More validation tests appear in order, possibly some calibration. Most likely one will end up with stating limitations.

Response:

We believe that this question is best addressed together with Question 4 (just below).


R1.4

While LEMONS has its own set of tests that are to be executed with each software change for verification, there are also standardized validation tests against empirical data: above all, I recommend ISO 20414 and NIST TN 1833. If LEMONS passed at least some of these tests, the community would certainly be more inclined to trust the new model. There even is a bottleneck test with a base scenario very similar to Fig. 9. Why not build on it?

Response:

It is very important for us to emphasise that the code we hereby release is not intended to be a full pedestrian dynamics model, but only the mechanical part of the code (in addition to enabling the user to define realistic two-dimensional pedestrian shapes). This code can be coupled to any continuous equation for the decisional part to give a full pedestrian dynamics simulator.

To add some context, in a parallel endeavour, we have developed a decisional model (along the lines of ANDA (Echeverrı́a-Huarte and Nicolas 2023), but for anisotropic pedestrians). We have successfully coupled it with LEMONS, but we have made the choice to release the mechanical part and shape-generation algorithm as standalone, open-source codes, so that the user will then be able to couple them to the decisional model they like most easily. This means that we chose not to impose our vision of the decisional model on the user eager to deal with mechanical contacts and anisotropic shapes, but we decided to let them be free to use their own.

This implies that, while we understand the value of standardised validation tests for pedestrian dynamics, LEMONS per se cannot undergo them, because it does not prescribe the decisional part of the dynamics. In particular, this was striking for the bottleneck test we showed in the initial manuscript (now changed, following remarks by both Reviewers): on no account was this a relevant validation test for pedestrian dynamics; it was simply intended to show that the mechanical model operates as expected, as far as the mechanics are concerned.

As a matter of fact, some of the tests we had conducted led to more compelling results for the model. Following the Reviewers' comments, we have now substituted the bottleneck case study with one of those, namely, the propagation of a push through a row of pedestrians, in actual Fig. 9. We show our reproduction of the experiments of (Feldmann and Adrian 2023), in which a pusher applies a vigorous push to a row of standing people. Our simulations, shown as solid lines, rather nicely track the experimental head trajectories (dotted lines), if one leaves aside the fluctuations and lateral deviations. This means that the granular interactions and damping forces are captured well. This case study is now detailed in the paper, but we refrain from putting too much emphasis on it, because: it might give the impression (because of the more compelling comparison) that our work is mainly aimed at reproducing this experimental dataset, whereas we want to release an open code that will be used by other researchers in a variety of situations.


R1.5

While the code is on github, which is great, it is on author Oscar Dufour’s personal space. What will happen if he leaves academia? Who will guarantee continued access?

Response:

Following the Reviewer’s comment, we created a GitHub organisation, Crowd-Mechanics, which now hosts the LEMONS repository. In addition, we released the code to provide a durable archive. This ensures the repository is not tied to a single individual: multiple maintainers within the organisation can manage and update the code even if one maintainer leaves academia.


R1.6

LEMON does not have a CI (continuous integration) pipeline with automatic and compulsory tests before programmers push code to the repository.

Response:

We thank the reviewer for pointing this out. The continuous integration pipeline is indeed highly important, as it improves long-term maintainability and makes it easier for others to contribute to the project. We have addressed this concern by implementing a comprehensive continuous integration pipeline and creating a detailed CONTRIBUTING.md file that outlines the contribution procedures. The CI pipeline now includes multiple layers of automated checks for every pull request targeting the master branch. These checks include: (1) pre-commit.ci service that automatically runs style, formatting, and linting checks for both Python and C++ code; (2) GitHub Actions workflows that build the C++ mechanical layer, run Python tests via pytest, validate Jupyter notebooks, verify copyright headers, perform static analysis with clang-tidy, and execute the mechanical layer test suite, the checks are performed on both MacOS-latest and Ubuntu-latest runner. All checks must pass before any code can be merged, ensuring code quality and preventing regressions.

Additionally, the master branch is now protected against direct pushes, requiring all changes to go through pull requests that must be approved by at least one collaborator after successful completion of all automated checks. The CONTRIBUTING.md file provides detailed instructions for setting up development environments, running tests locally, and understanding the CI workflow.

The mechanical layer tests consist now of eight series of tests (covering distinct scenarios). The details of the test series are described precisely in the documentation. They are designed to verify the behaviour of each mathematical term in the mechanical model and are not intended as comparisons with experimental data. They rely on tolerance thresholds that you can adjust in the respective test files if necessary.


R1.7

One small improvement for the documentation would be to add a note to the Test tab indicating that the current files and paths are set up for macOS and that users of Linux or Windows need to adjust them accordingly. A brief reminder in the documentation would enhance clarity and usability for all users.

Response:

The continuous integration pipeline we developed now runs all tests, including both the mechanical layer and Python function tests, using GitHub Actions on macOS-latest and ubuntu-latest runners. We have also updated the documentation at the beginning of the 'Minimal crowd simulation example' section to clarify that the code runs on both Linux and macOS, with appropriate attention to the platform-specific extension of the shared CrowdMechanics library:

-- This guide explains how to run multiple simulations with the CrowdMechanics library and how to manage their outputs. It has been tested on macOS Sequoia 15.6.1 and Ubuntu 24.04.3 LTS, provided that in what follows the shared library relative path ../../../../src/mechanical_layer/build/libCrowdMechanics is written with the correct extension: .dylib on macOS and .so on Ubuntu.

Requested changes

R1.1

My only “hard” request for revision is, that the authors discuss the limitation that comes with modelling non-dense scenarios through a harmonic oscillator type model, that is, as force-driven locomotion towards a target. For future work: I think that the value for the scientific community would be much greater still, if the authors also found a way to interface with velocity-based differential equation models or, even better, with models that, for non-contact scenarios, forgo differential equations all together.

Response:

Regarding the limitations to 'harmonic oscillator' models, as we replied in Question 2, we think that there has been a misunderstanding. Our mechanical model is generic and does not assume underdamped, inertial dynamics that give rise to oscillations. By controlling the value of the frictional time $\rm t^{\rm(transl)}$, notably, one can move from the underdamped regime (second-order equation with little friction) to a fully overdamped regime, which boils down to a velocity-based model (because inertia then plays a negligible role). Accordingly, the user has a knob on the cursor between force-based models and velocity-based ones (we personally believe that a value $\rm t^{\rm(transl)} \approx 0.2\,\mathrm{s}$ makes sense). We have now explained this below Eq. (1):

-- Importantly, depending on the time scale $\rm t^{\rm(transl)}$, Eq. (1) will describe either inertial, underdamped translation dynamics (long $\rm t^{\rm(transl)}$) or overdamped dynamics (short $\rm t^{\rm(transl)}$).

Now, regarding the modelling of non-contact scenarios without differential equations at all, we do not fully get the Reviewer's point. Of course, if there is no contact at all, the user is free to choose whatever model they want for the (decision-based) dynamics, as our simulations of the mechanical interactions will play no role. But, as soon as a mechanical contact takes place, contact mechanics will matter and its resolution requires differential equations -- for want of an analytical formula.


R1.2

A second “softer” suggestion is, that the authors discuss that the queuing in Fig. 9., does not reflect empirical observation. As such, the current model may be limited to very dense situations where agents have contacts to others from all sides.

Response:

Following the Reviewers' comments, we agreed to replace this bottleneck test with the propagation of a push, which is more narrowly centred on the mechanical layer, and, therefore, better reproduced by our mechanical algorithm. Therefore, the bottleneck situation (that largely relied on the decisional layer, which rests with the user) is no longer present.

Login to report or comment