ProcessModel

open class ProcessModel(parent: ModelElement, name: String? = null) : ModelElement(source)

A process model facilitates the modeling of entities experiencing processes via the process view of simulation. A ProcessModel has inner classes (Entity, EntityGenerator, etc.) that can be used to describe entities and the processes that they experience. The key class is Entity, which has a function process() that uses a builder to describe the entity's process in the form of a coroutine. An entity can have many processes described that it may follow based on different modeling logic. A process model facilitates the running of a sequence of processes that are stored in an entity's processSequence property. An entity can experience only one process at a time. If using a sequence, after completing a process, the entity will try to use its sequence to run the next process (if available). Individual processes can be activated for specific entities.

See KSLProcessBuilder for documentation on the functionality provided for processes.

Parameters

parent

the parent model element

name

an optional name for the process model

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null)

Types

Link copied to clipboard
open inner class BatchingEntity<T : ProcessModel.BatchingEntity<T>>(val batchesIncludeSelf: Boolean = true, aName: String? = null) : ProcessModel.Entity
Link copied to clipboard
object Companion
Link copied to clipboard
open inner class Entity(aName: String? = null) : ModelElement.QObject, SpatialElementIfc, VelocityIfc

An entity is something that can experience processes and as such may wait in queue. It is a subclass of QObject. The general approach is to use the process() function to define a process that a subclass of Entity can follow. Entity instances may use resources, signals, hold queues, etc. as shared mutable state. Entities may follow a process sequence if defined.

Functions

Link copied to clipboard
fun activate(process: KSLProcess, timeUntilActivation: Double = 0.0, priority: Int = KSLEvent.DEFAULT_PRIORITY): KSLEvent<KSLProcess>
fun activate(process: KSLProcess, timeUntilActivation: GetValueIfc, priority: Int = KSLEvent.DEFAULT_PRIORITY): KSLEvent<KSLProcess>

Cause the entity to start the process. The activation of the process is governed by an event that is scheduled to occur at the specified activation time.

Link copied to clipboard
fun <T : ProcessModel.Entity> startProcessSequence(entity: T, timeUntilActivation: Double = 0.0, priority: Int = KSLEvent.DEFAULT_PRIORITY): KSLEvent<KSLProcess>?

Cause the entity to start the process sequence in the order specified by the sequence. The activation of the first process is governed by an event that is scheduled to occur based on the time until activation parameter.

fun <T : ProcessModel.Entity> startProcessSequence(entity: T, timeUnitActivation: GetValueIfc, priority: Int = KSLEvent.DEFAULT_PRIORITY): KSLEvent<KSLProcess>?

Cause the entity to start the process sequence in the order specified by the sequence. The activation of the first process is governed by an event that is scheduled to occur at the specified activation time.