EntityGenerator

protected inner class EntityGenerator<T : ProcessModel.Entity>(entityCreator: () -> T, timeUntilTheFirstEntity: RVariableIfc, timeBtwEvents: RVariableIfc, maxNumberOfEvents: Long = Long.MAX_VALUE, timeOfTheLastEvent: Double = Double.POSITIVE_INFINITY, var activationPriority: Int = KSLEvent.DEFAULT_PRIORITY + 1, name: String? = null) : EventGenerator(source)

Note that an EntityGenerator relies on the entity having a defined default process. The generator will create the entity and activate the default process. If the entity does not have a default process then an illegal state exception will occur. You can specify the default process via the isDefaultProcess parameter of the process() function or directly via the defaultProcess property of the entity.

Parameters

entityCreator

the thing that creates the entities of the particular type. Typically, a reference to the constructor of the class

timeUntilTheFirstEntity

the time until the first entity creation

timeBtwEvents

the time between entity creation

maxNumberOfEvents

the maximum number of entities to create

timeOfTheLastEvent

the time of the last entity creation

activationPriority

the priority for the activation of the entity

name

a name for the generator

Constructors

Link copied to clipboard
constructor(entityCreator: () -> T, timeUntilTheFirstEntity: RVariableIfc, timeBtwEvents: RVariableIfc, maxNumberOfEvents: Long = Long.MAX_VALUE, timeOfTheLastEvent: Double = Double.POSITIVE_INFINITY, activationPriority: Int = KSLEvent.DEFAULT_PRIORITY + 1, name: String? = null)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
protected open override fun generate()