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:
In refereeing

Reports on this Submission

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