ResponseAnimationEmitter

A ModelElementObserver that emits an AnimationEvent.ResponseObserved each time a Response (including its time-weighted subtype TWResponse) or a Counter is observed. Setting a response's or counter's value fires a Status.UPDATE notification, which routes here as update.

Attach one instance to each statistical variable you want to animate (response.attachModelElementObserver(emitter)); a single instance can observe many variables because update receives the element that fired.

A time-weighted response reassigned the value it already has is not emitted again within a replication. Such a reassignment is real bookkeeping (it closes an interval of the time-weighted statistic) but draws nothing: the response's step is the same. Models reassign unchanged values freely, and at every transporter event a vehicle model's counts would otherwise fill most of its trace with them. A tally response or counter is always emitted, since a repeated tally value is a genuine observation.

Parameters

name

optional observer name

Constructors

Link copied to clipboard
constructor(name: String? = null)

Functions

Link copied to clipboard
protected open override fun update(modelElement: ModelElement)