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
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

This value is used to set the ending time for generating actions for each replication. Changing this variable during a replication cause the next replication to use this value for its ending time.

Link copied to clipboard

Controls the maximum number of events to be used to initialize each replication. The time between events cannot evaluate to a constant value of 0.0 if the maximum number of events is infinite (Long.MAX_VALUE). Uses the current value for initial time between events

Link copied to clipboard

Sets the time between events and the maximum number of events to be used to initialize each replication. The time between events cannot evaluate to a constant value of 0.0. The maximum number of events is kept at its current value, which by default is Long.Max_Value

Link copied to clipboard

Controls the random variable representing the time until the first event that is used at the beginning of each replication to generate the time until the first event. This change becomes effective at the beginning of the next replication to execute

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

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

Sets the flag that indicates whether the generator will automatically start at the beginning of a replication when initialized

Link copied to clipboard

Controls the time between event random source. Must not always evaluate to 0.0, if the current setting of the maximum number of events is infinite (Long.MAX_VALUE). This is only for the current replication.

Functions

Link copied to clipboard
abstract fun resume()

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

abstract fun setInitialTimeBetweenEventsAndMaxNumEvents(initialTimeBtwEvents: RandomIfc, initialMaxNumEvents: Long = Long.MAX_VALUE)

Sets the time between events and the maximum number of events to be used to initialize each replication. These parameters are dependent. The time between events cannot evaluate to a constant value of 0.0 if the maximum number of events is infinite (Long.MAX_VALUE)

Link copied to clipboard
abstract fun setTimeBetweenEvents(timeBtwEvents: RandomIfc, maxNumEvents: Long = Long.MAX_VALUE)

Sets the time between events and the maximum number of events for the generator. These two parameters are dependent. The time between events cannot always evaluate to 0.0 if the maximum number of events is infinite (Long.MAX_VALUE). This method only changes these parameters for the current replication. The changes take effect when the next event is generated. If current number of events that have been generated is greater than or equal to the supplied maximum number of events, the generator will be turned off.

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)
abstract fun turnOnGenerator(r: RandomIfc)

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