TaskProcessingSystem

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

A TaskProcessingSystem facilitates the usage of task processors for doing work. There are basically two types of task processors (TransientTaskProcessor and TaskProcessor). A TransientTaskProcessor is not a model element. As such, it does not react to model element actions such has initialization, warm up, replication ending, etc. Transient task processors can be dynamically created and shutdown when no longer needed, without the overhead of adding them to the model element hierarchy. The user is responsible for ensuring the appropriate life-cycle management of created transient task processors. If the task processing system's creation methods are used to create transient task processors, then the task processing system will manage the initialization and warmup of its managed task processors. Transient task processors do not have statistics automatically collected.

A TaskProcessor is a model element that does task processing. It can be configured to collect busy time statistics as well as statistics on idle, inactive, and in-repair states.

Parameters

parent

the parent for this task processing system

Constructors

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

Types

Link copied to clipboard

Simple delay to represent a break period for a processor.

Link copied to clipboard
inner class RepairTask(var repairTime: GetValueIfc) : TaskProcessingSystem.Task

Simple delay task to represent repair being done.

Link copied to clipboard
abstract inner class Task(val taskType: TaskProcessingSystem.TaskType = TaskType.WORK) : ProcessModel.Entity

Represents something that must be executed by a TaskProcessor.

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

A functional interface to use to model actions that can be invoked to allow a task dispatcher to react to when a task processor has an action such as a failure, etc.

Link copied to clipboard
open inner class TaskProcessor(parent: ModelElement, allPerformance: Boolean = false, taskQueue: QueueIfc<TaskProcessingSystem.Task> = TaskQueue(), name: String? = null) : ModelElement, TaskProcessingSystem.TaskProcessorIfc
Link copied to clipboard

A functional interface to use to model actions that can be invoked to allow a task to react to when a task processor has an action such as a failure, etc.

Link copied to clipboard

An interface to represent the general concept of a task processor. A task processor is something that receives tasks and executes them.

Link copied to clipboard
inner class TaskProcessorPerformance(parent: ModelElement, processor: TaskProcessingSystem.TaskProcessorIfc, val allPerformance: Boolean = false, name: String? = null) : ModelElement

Used to collect statistical performance for a processor based on accumulated state information from within replications. Performance is across replications.

Link copied to clipboard

Indicators of task processor status during its processing.

Link copied to clipboard

A task queue can hold tasks for a processor. This class does not collect queueing statistics.

Link copied to clipboard

Basic types of tasks. WORK is normal work. REPAIR indicates that the task causes the task processor to experience the in-repair state (i.e. failure). The BREAK type indicates that the task is associated with an inactive period.

Link copied to clipboard

Responsible for executing tasks that have been supplied. This processor is transient. It is not a model element and thus does not participate in automatic model element actions such as initialization, warmup, and replication ending.

Link copied to clipboard
inner class WorkTask(var workTime: GetValueIfc) : TaskProcessingSystem.Task

Simple delay task to represent work being done.

Functions

Link copied to clipboard

Creates transient task processors based on the names.

fun createTransientTaskProcessors(number: Int, prefix: String = "Processor_")

Creates transient task processors and names them.

Link copied to clipboard

Creates and adds a transient task processor with the provided name to the task processing system.

Adds a transient task processor to the task processing system. This causes the transient processor to react to model element initialization and warm up via the task processing system.