Skip to main content

Module optimal_steps

Module optimal_steps 

Source
Expand description

Optimal Steps Model (Seitz & Köster 2012).

A discrete step locomotion model. On each update each pedestrian samples a set of candidate foot-placement points on a circle of radius equal to its stride length. The candidate with the lowest scalar utility is chosen as the next position. Utility is the sum of:

  • a target-attraction term proportional to the candidate’s distance to the destination,
  • a pairwise repulsion from every neighbour (monotonic in clearance),
  • a wall penalty from the closest point on every wall segment.

Unlike force-based models, position updates are step-sized rather than velocity-integrated. This implementation uses a deterministic polar sampling grid so the model is reproducible without an external RNG; randomised sampling can be layered on by shuffling the result of candidate_offsets before calling best_candidate.

§References

  • Seitz, M. J., & Köster, G. (2012). “Natural discretization of pedestrian movement in continuous space”. Physical Review E, 86(4), 046108.

Structs§

OptimalSteps
Unit marker type implementing PedestrianModel for the Optimal Steps model.
Params
Parameters for the Optimal Steps model.

Functions§

best_candidate
Returns the best candidate position for pedestrian self_idx.
candidate_offsets
Deterministic polar sampling of candidate offsets around the origin on a circle of the given stride radius.
neighbor_cutoff
Recommended neighbour cutoff radius for grid queries (metres).
stepDeprecated
Free-function step for callers that do not need trait dispatch.
step_scratch
Zero-allocation step variant. See social_force::step_scratch for the motivation.
step_with_grid
Grid-accelerated step variant. Semantically equivalent to step up to numerical noise for pairs inside neighbor_cutoff(params).
stride_length
Effective stride length for pedestrian p over one dt-second step.
utility
Utility score for a candidate point (lower is better).