EventGeneratorIfc

An interface to define how event generators operate. The primary subclass is EventGenerator. Of particular note is the use of initial parameters:

initial time of first event initial time between events initial maximum number of events initial ending time

These parameters control the initial state of the generator at the start of each replication. The generator is re-initialized to these values at the start of each replication. There are also parameters for each of these that can be changed during a replication. The effect of that change is only within the current replication.

Author

rossetti

Inheritors

Properties

Link copied to clipboard

Can be used to supply logic to invoke when the generator's ending time is finite and the generator is turned off.

Link copied to clipboard
abstract val endingTime: Double

Controls the ending time for generating events for the current replication. A new ending time will be applied to the generator. If this change results in an ending time that is less than the current time, the generator will be turned off

Link copied to clipboard
abstract val eventCount: Long

Gets the number of events that have been generated by the generator

Link copied to clipboard

The action for the events for generation

Link copied to clipboard
abstract val id: Int
Link copied to clipboard
abstract val isDone: Boolean

This method checks to see if the generator is done. In other words, if it has been turned off.

Link copied to clipboard
abstract val isEventPending: Boolean

true if an event is scheduled to occur for the generator

Link copied to clipboard
abstract val isStarted: Boolean

This flag indicates whether the generator has started

Link copied to clipboard
abstract val isSuspended: Boolean

Indicates whether the generator has been suspended

Link copied to clipboard
abstract var label: String?
Link copied to clipboard

A long representing the maximum number of events for the generator. Sets the maximum number of events for the generator. Must not be infinite (Long.MAX_VALUE) if the current time between events is 0.0. This only controls the current replication.

Link copied to clipboard
abstract val name: String

Functions

Link copied to clipboard
abstract fun resume()

Resume the generation of events according to the time between event distribution.

Link copied to clipboard
abstract fun suspend()

Suspends the generation of events and cancels the next scheduled event from the generator

Link copied to clipboard
abstract fun turnOffGenerator()

This method turns the generator off, the next scheduled generation event will NOT occur, i.e. this method will also cancel a previously scheduled generation event if one exists. No future events will be scheduled after turning off the generator

Link copied to clipboard
abstract fun turnOnGenerator(t: Double = 0.0)

If the generator was not started upon initialization at the beginning of a replication, then this method can be used to start the generator