Event Generator
Constructors
This class allows for the periodic generation of events similar to that achieved by "Create" modules in simulation languages. This class works in conjunction with the GeneratorActionIfc, which is used to listen and react to the events that are generated by this class.
Types
Properties
Can be used to supply logic to invoke when the generator's ending time is finite and the generator is turned off.
The time to stop generating for the current replication
The number of events currently generated during the replication
Determines the priority of the event generator's events The default is DEFAULT_PRIORITY - 1 A lower number implies higher priority.
The action for the events for generation
Used to set the ending time when the generator is initialized at the start of each replication.
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
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. Note that setting the initial time between events does not affect the random variable governing the time of the first event.
true if an event is scheduled to occur for the generator
Whether the generator has been suspended
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.
This flag controls whether the generator starts automatically when initialized at the beginning of a replication. By default, this option is true. If it is changed then it remains at the set value until changed again.
The time between events for the current replication
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
Functions
Often the time of the first event and the time between events is the same distribution. This property causes both initialTimeUntilFirstEvent and initialTimeBtwEvents to be set to the same random variable.
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)
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.
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
If the generator was not started upon initialization at the beginning of a replication, then this method can be used to start the generator