pub trait PedestrianModel {
type Params;
// Required methods
fn name(&self) -> &'static str;
fn step(
&self,
peds: &mut [Pedestrian],
walls: &[WallSegment],
params: &Self::Params,
dt: f64,
);
}Expand description
Common contract for every pedestrian locomotion model in this crate.
Implementations advance a slice of Pedestrian in place by one timestep
of dt seconds, considering static WallSegment obstacles and a
model-specific parameter bundle.
All trait objects are safe; every concrete Params is Clone + Debug.
Required Associated Types§
Required Methods§
Sourcefn step(
&self,
peds: &mut [Pedestrian],
walls: &[WallSegment],
params: &Self::Params,
dt: f64,
)
fn step( &self, peds: &mut [Pedestrian], walls: &[WallSegment], params: &Self::Params, dt: f64, )
Advance every pedestrian in peds by dt seconds.
walls is a slice of static obstacles; pass an empty slice if none.