NHPPPiecewiseRateFunctionEventGenerator

Parameters

parent

the parent

generatorAction

the listener for generation

nhpp

the non-homogeneous Poisson process

maxNumberOfEvents

A long that supplies the maximum number of events to generate. Each time an event is to be scheduled the maximum number of events is checked. If the maximum has been reached, then the generator is turned off. The default is Long.MAX_VALUE. This parameter cannot be Long.MAX_VALUE when the time until next always returns a value of 0.0

timeOfTheLastEvent

A double that supplies a time to stop generating events. When the generator is created, this variable is used to set the ending time of the generator. Each time an event is to be scheduled the ending time is checked. If the time of the next event is past this time, then the generator is turned off and the event won't be scheduled. The default is Double.POSITIVE_INFINITY.

name

the name of the generator

Constructors

Link copied to clipboard
constructor(parent: ModelElement, generatorAction: GeneratorActionIfc, rateFunction: PiecewiseRateFunction, streamNum: Int = 0, lastRate: Double = Double.NaN, maxNumberOfEvents: Long = Long.MAX_VALUE, timeOfTheLastEvent: Double = Double.POSITIVE_INFINITY, name: String? = null)

Functions

Link copied to clipboard
fun adjustRates(factor: Double)

This function can be used to adjust the rates within the piecewise rate function up or down by the provided factor. Each rate is multiplied by the factor for its new setting. For example, to increase all rates by 20 percent, the factor should be 1.2. The previous rate function will be replaced by a new rate function with the adjusted rates. Allows the changing of the rate function only if the model is not running.