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

Submission summary

Authors (as registered SciPost users): Oscar Dufour · Alexandre NICOLAS · Maxime Stapelle
Submission information
Preprint Link: scipost_202507_00067v2  (pdf)
Code repository: https://github.com/Crowd-Mechanics/LEMONS
Code version: v1.0.1
Code license: CeCILL-B
Data repository: https://zenodo.org/records/17885366
Date submitted: Dec. 16, 2025, 3:50 p.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 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 Python library, and scripts to call the C++ library from Python. The tool enables users to implement their own decisional layer, i.e., to control the agents' choices of desired velocities.

Author comments upon resubmission

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.

List of changes

All changes are highlighted in red in the revised manuscript.
Current status:
Awaiting resubmission

Reports on this Submission

Report #3 by Anonymous (Referee 2) on 2026-1-29 (Invited Report)

Strengths

1- The paper makes a significant contribution to the field, offering an open-source platform that advances 2D crowd modelling beyond the limitations of standard circular agents, with clear force-based mechanics. This is the headline, primary, valuable contribution.

2- The work integrates real anthropometric data to generate geometrically realistic pedestrian shapes, avoiding reliance on arbitrary approximations. This is particularly important for modellers attempting high density simulations.

3- The software architecture combines a C++ core for mechanical computations with a Python wrapper, balancing computational performance and user accessibility.

4- The modular design and generic XML configuration structure provide a flexible foundation for future research into heterogeneous crowds.

Weaknesses

1- I would have preferred an explicit section on Validation, to clarify the applicability and how much it can be "trusted". This was not mandatory though, so the current in-place approach, combined with the author responses are probably sufficient. 2-The writing style in Section "4.2 Mechanical Tests" reads more like an informal user manual. Lines like "thresholds (detailed in the API documentation) that you can adjust" and "run the following command in your terminal" would be much better if they adopted the normal scientific journal tone.

Report

The acceptance criteria are now met. I only have some minor suggested changes, which would not require a second review before publication.

Requested changes

The following lines in section 4.2 would be better if they adopted the more normal scientific, objective tone: 411, 416, 421, 422, 426, 428, 429.
I would softly request that these be changed from "you" or "yours".
An example change would be line 426:
"The script first prompts you for the path to your FFmpeg executable"
would better be:
"The script prompts the user to enter the FFMpeg executable".

Recommendation

Ask for minor revision

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

Report #2 by Anonymous (Referee 2) on 2026-1-29 (Invited Report)

Strengths

1- The paper makes a valuable contribution to the field by providing an open-source platform that advances 2D crowd modelling beyond the limitations of standard circular agents. 2- A key strength is the integration of real anthropometric data to generate geometrically realistic pedestrian shapes, rather than relying on arbitrary (circular or elliptical) approximations. 3- The work on approximating forces and mechanics are very thorough. 4- The videos of software operations are useful and quite insightful. 5- The software architecture balances performance and usability by combining a C++ core for mechanical computations with an accessible wrapper. Furthermore, the modular design and structure provide a flexible foundation for future research into heterogeneous crowds, most particularly with the application for high density situations.

Weaknesses

1- I would hgave preferred an explicit section to clarify and bring together the verification and validation efforts, but they are mostly addressed in the author's responses, so adding this explicit section is not a requirement to publish. 2- The tone of the text in section 4.2, in some sentences, still has a "you do this" and "you do that" tone. I would prefer it if these adopted a more standard tone for scitific journal publication.

Report

The authors have gone to great lengths to address the concerns of the reviewers. Where they have not fully implemented requested changes, they have generally provided good explanations for doing so.
The paper is much stronger as a result.

Requested changes

There is still a "User Manual" tone in some small parts: Section 4.2 Mechanical tests has multiple instances of "you " in sentences, such as:
[Line 411] that you can adjust if necessary
[Line416[ Run the following command in your terminal
[Line 421] If you further want to
[Line 422] command in your terminal
[Line 423] script first prompts you for the path to you FFmpeg executable
[Line 428] Once generated, you can review them and verify that they meet your expectations.
Stylistically, for scientific journal publication, you would normally adopt a more objective tone, such as "the script prompts the user". I would encourage the authors to make these (very minor) changes.

Recommendation

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

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

Report #1 by Anonymous (Referee 1) on 2025-12-16 (Invited Report)

Strengths

  1. To my knowledge, this is the first work that explicitly models contact forces according to 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. After revision, it also has an integrated test pipeline for sustainability. That is excellent.

  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 brief glance at some code snippets revealed readable code. A Python-wrapper makes the functionality accessible for a wider community, while a C++ program core facilitates object-orientation and a modular structure.

Weaknesses

After the authors' careful revision I do not see any serious weakness left.

Report

I would like to see this work published.

Requested changes

None.

Recommendation

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

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

Login to report or comment