schedule

protected fun <T> schedule(eventAction: ModelElement.EventActionIfc<T>, timeToEvent: GetValueIfc, message: T? = null, priority: Int = KSLEvent.DEFAULT_PRIORITY, name: String? = null): KSLEvent<T>(source)
protected fun <T> schedule(eventAction: ModelElement.EventActionIfc<T>, timeToEvent: Double, message: T? = null, priority: Int = KSLEvent.DEFAULT_PRIORITY, name: String? = null): KSLEvent<T>(source)

Allows event actions to be scheduled by model elements

Return

the scheduled event

Parameters

eventAction

the event action to schedule

timeToEvent

the time until the next action

priority

the priority of the action

message

a general object to attach to the action

name

a name to associate with the event for the action


Creates an EventScheduler which can be used to create and schedule events on the simulation calendar reactingWith a fluency pattern.

Return

the builder of the event

Parameters

if the event has a message, this is the type
action

the action to be invoked at the event time