jupedsim_scenarios.capacity#
Start-area capacity rule shared with the web app.
The app refuses to place more agents in a start area than the area can hold; the library applies the same rule before scaling a scenario so a count that would silently turn into deferred spawns is rejected up front.
max_agents = floor(walkable_area / (pi * radius**2) * PRACTICAL_PACKING_FACTOR)
walkable_area is the distribution polygon minus the obstacles (the
holes of the walkable area), in square metres. radius is the
distribution’s parameters.radius (default 0.2 m).
This module is the single owner of PRACTICAL_PACKING_FACTOR. The
frontend (DistributionEditorModal.js) mirrors the constant and points
back here; change both together.
Attributes#
Functions#
|
Area in square metres of the distribution polygon minus obstacles. |
|
Largest agent count the start area |
Module Contents#
- distribution_walkable_area(scenario: jupedsim_scenarios.runner.Scenario, dist_id: str) float[source]#
Area in square metres of the distribution polygon minus obstacles.
- max_agents_for_distribution(scenario: jupedsim_scenarios.runner.Scenario, dist_id: str) int[source]#
Largest agent count the start area
dist_idaccepts under the app’s rule.