DynamicsVectorSampler

class DynamicsVectorSampler(agentModel: AgentModel, overlays: OverlaySpec, name: String? = null) : ModelElement(source)

Rate-limited capture of per-agent velocity/force vectors for the G10 overlay. Every interval (default 5 samples per simulated second, decoupled from the model's integration dt) it emits an AnimationEvent.AgentVectorSampled for each agent of agentModel's linked dynamics (optionally restricted to OverlaySpec.agentSubset). This is the volume-sensitive overlay; sampling + subset keep it bounded, and it is created only when the velocity or force overlay is enabled.

The dynamics are looked up at fire time (not at construction), because models typically link them in initialize(), after this sampler is created at attach.

Constructors

Link copied to clipboard
constructor(agentModel: AgentModel, overlays: OverlaySpec, name: String? = null)

Functions

Link copied to clipboard
protected open override fun initialize()

This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called