Agent Position Sampler
class AgentPositionSampler<A : AgentLike>(parent: ModelElement, projection: ContinuousProjection<A>, samplingInterval: Double, name: String? = null) : ModelElement(source)
The non-invasive, opt-in agent-position capture (decision D6 option b): a model element that, every samplingInterval simulated time units, reads each agent's position in projection and emits an AnimationEvent.AgentPositionSampled. It does not touch the agent package; it only reads positions.
This is coarser than the projection placeAt/moveTo hook (the default, decision D6 option a / Phase 3A.1): it samples on a fixed clock, so sub-interval motion is aliased. Use it when an engine touch is undesirable; use the hook for full fidelity.
Parameters
parent
the model element to attach to (e.g. the agent model)
projection
the continuous projection whose agents' positions to sample
sampling Interval
the time between samples (> 0)
name
optional element name
Constructors
Link copied to clipboard
constructor(parent: ModelElement, projection: ContinuousProjection<A>, samplingInterval: Double, name: String? = null)