TaskQ

class TaskQ @JvmOverloads constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO) : Queue<Dispatcher.Task> (source)

The waiting line: the one queue this subsystem reports.

A typed request queue in the mould of ksl.modeling.entity.RequestQ and ksl.modeling.entity.ConveyorQ, owned by a Dispatcher. A task is enqueued when it is posted and dequeued when a vehicle takes possession of the load, so its time in queue is the load's wait for transport.

The load itself waits in a hold queue, which reports nothing. That division is deliberate and is the one Conveyor makes: a hold queue is how a suspended entity is found again and resumed, and making it also the statistic conflates a mechanism with a measurement. What a modeller wants to see, and what a dispatching policy ranks, is the task -- so the task is the thing that queues.

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO)

Properties

Link copied to clipboard

Orders what an assignment policy sees. Null means the queue discipline alone decides.

Functions

Link copied to clipboard
fun removeAllAndTerminate(waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes and terminates every task waiting in the queue.

Link copied to clipboard
fun removeAndTerminate(task: Dispatcher.Task, waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes the task from the queue and terminates the process of the entity waiting on it.