Counter CIfc
While Counter instances should in general be declared as private within model elements, this interface provides the modeler the ability to declare a public property that returns an instance with limited ability to change and use the underlying Counter, prior to running the model.
For example:
private val myC = Counter(this, "something cool") val counter: CounterCIfc get() = myC
Then users of the public property can change the response and do other controlled changes without fully exposing the private variable. The implementer of the model element that contains the private counter does not have to write additional functions to control the counter and can use this strategy to expose what is needed. This is most relevant to setting up the model elements prior to running the model or accessing information after the model has been executed. Changes or use during a model run is readily available through the general interface presented by Counter.
The naming convention "CIfc" is used to denote controlled interface.
Inheritors
Properties
If true, the response will emit pairs Pair(time, value) every time a new value is assigned
Sets the initial value of the count limit. Only relevant prior to each replication. Changing during a replication has no effect until the next replication.
Sets the initial value of the variable. Only relevant prior to each replication. Changing during a replication has no effect until the next replication.