pub struct RepositionCooldowns { /* private fields */ }Expand description
World resource: per-car tick-when-next-eligible for reposition.
Set by the movement phase when a repositioning car arrives at its
target (via phase = Idle with repositioning = true). Consumed
by the reposition phase’s idle-pool filter — cars still in
cooldown stay out of the pool and are skipped for that pass.
Prevents AdaptiveParking / PredictiveParking from sending the
same car on repeated short hops as the hot-stop ranking shifts
mid-rush. Energy cost + visual noise both drop.
Implementations§
Source§impl RepositionCooldowns
impl RepositionCooldowns
Sourcepub fn is_cooling_down(&self, car: EntityId, tick: u64) -> bool
pub fn is_cooling_down(&self, car: EntityId, tick: u64) -> bool
Whether car is currently under cooldown at tick.
Sourcepub fn record_arrival(&mut self, car: EntityId, arrival_tick: u64)
pub fn record_arrival(&mut self, car: EntityId, arrival_tick: u64)
Record a reposition arrival. Sets eligibility to
arrival_tick + DEFAULT_REPOSITION_COOLDOWN_TICKS.
Sourcepub fn remap_entity_ids(&mut self, id_remap: &HashMap<EntityId, EntityId>)
pub fn remap_entity_ids(&mut self, id_remap: &HashMap<EntityId, EntityId>)
Rewrite every entry’s car EntityId through id_remap, dropping
any entries whose car wasn’t re-allocated during snapshot
restore. Mirrors ArrivalLog::remap_entity_ids.
Trait Implementations§
Source§impl Clone for RepositionCooldowns
impl Clone for RepositionCooldowns
Source§fn clone(&self) -> RepositionCooldowns
fn clone(&self) -> RepositionCooldowns
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more