AggregateCounter

class AggregateCounter @JvmOverloads constructor(parent: ModelElement, name: String? = null) : Counter(source)

An aggregate time-weighted response observes many other time-weighted response variables. Whenever any variable that it observes changes, it is incremented by or decremented by the amount of the change. Thus, the resulting response is the total (aggregate) of all the underlying observed responses at any time.

Parameters

parent

the parent model element

name

the name of the aggregate response

Constructors

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

Functions

Link copied to clipboard
fun observe(counter: Counter)
fun observe(counter: CounterCIfc)

The counter will be observed by the aggregate such that whenever the counter changes, the aggregate will change

Link copied to clipboard
fun observeAll(counters: Collection<Counter>)

Causes all the counters to be observed

Link copied to clipboard
fun remove(counter: Counter)
fun remove(counter: CounterCIfc)

The counter will stop being observed by the aggregate.

Link copied to clipboard
fun removeAll(counters: Collection<Counter>)