Expand description
Parameter and runtime errors for rustsim-crowd.
The primary use site is CrowdError returned by each model’s
Params::validate(dt) method. Validating once at the start of a
simulation catches the three classes of misconfiguration that
otherwise surface as silent physics corruption:
- Non-positive physical parameters (mass ≤ 0, range ≤ 0, etc.): division by zero or negative relaxation, producing NaN velocities within a few ticks.
- CFL-like instability (
dt * max_accel > max_speed): a single explicit-Euler tick can exceed the speed cap in one integration step, which is survivable thanks toclamp_speedbut is a smell suggesting either a too-coarsedtor a too-stiff interaction. - Non-finite
dt: forwarded straight into the integrator.
All validators are cheap (a handful of comparisons) and deterministic.
Enums§
- Crowd
Error - Errors surfaced by
rustsim-crowdparameter validation.