com.workflowfm.proter.schedule

Type members

Classlikes

A greedy First-Come-First-Served Scheduler.

A greedy First-Come-First-Served Scheduler.

Starts all tasks whose resources are currently idle, in order of arrival in the queue.

This means a task that arrived later may start now and block an earlier task which is currently blocked, but could have started soon.

Ignores creation time. Only cares about order in the queue.

Value Params
initialTasks

Initial TaskInstances in the queue, if any.

A greedy priority Scheduler.

A greedy priority Scheduler.

Starts all tasks whose resources are currently idle, in order of priority.

This means a lower priority task may start now and block a higher priority task which is currently blocked, but could have started soon.

Value Params
initialTasks

Initial TaskInstances in the queue, if any.

A greedy Scheduler.

A greedy Scheduler.

Starts all tasks whose resources are currently idle, in the given order/priority.

This means a lower priority task may start now and block a higher priority task which is currently blocked, but could have started soon.

class LookaheadScheduler(initialTasks: TaskInstance*) extends PriorityScheduler

A Scheduler to be used for look-ahead.

A Scheduler to be used for look-ahead.

Should be used in conjunction with simulations which use the lookahead trait.

Relies on the use of Schedules for each TaskResource.

abstract
class PriorityScheduler(using ordering: Ordering[TaskInstance]) extends Scheduler

A Scheduler trait that uses a SortedSet.

A Scheduler trait that uses a SortedSet.

Forms the basis for priority-based schedulers.

class ProterScheduler(initialTasks: TaskInstance*) extends PriorityScheduler

The default priority based Scheduler.

The default priority based Scheduler.

Relies on the use of Schedules for each TaskResource.

Avoids scheduling lower priority tasks that might cause delays/waiting times to higher priority ones.

Value Params
initialTasks

Initial TaskInstances in the queue, if any.

case
class Schedule(tasks: List[(Long, Long)])

A list of time intervals during which a TaskResource is scheduled to be busy.

A list of time intervals during which a TaskResource is scheduled to be busy.

Each interval is represented as a pair of timestamps.

Value Params
tasks

Busy time intervals as pairs of timestamps.

Example

Schedule(List( (1L,2L), (3L,4L) )) // The corresponding TaskResource is scheduled to be busy between 1L and 2L and between 3L and 4L, and idle between 0L and 1L, between 2L and 3L and after 4L.

Companion
object
object Schedule

Contains all key functions for managing Schedules.

Contains all key functions for managing Schedules.

Companion
class
trait Scheduler

A scheduler selects the next TaskInstances to be started by the Coordinator at a given time.

A scheduler selects the next TaskInstances to be started by the Coordinator at a given time.

A strict First-Come-First-Served Scheduler.

A strict First-Come-First-Served Scheduler.

Starts all tasks whose resources are currently idle, in order of arrival in the queue.

Considers resources of earlier tasks as busy even if they are not. This means that idle resources may be blocked by tasks earlier in the queue that cannot start yet.

Ignores creation time. Only cares about order in the queue.

Value Params
initialTasks

Initial TaskInstances in the queue, if any.

A strict priority Scheduler.

A strict priority Scheduler.

Starts all tasks whose resources are currently idle, in order of priority.

Considers resources of higher priority tasks as busy even if they are not. This means that idle resources may be blocked by queued high priority tasks that cannot start yet.

Value Params
initialTasks

Initial TaskInstances in the queue, if any.

A strict Scheduler.

A strict Scheduler.

Starts all tasks whose resources are currently idle, in the given order/priority.

Does not consider resources of higher priority tasks. This means that idle resources may be blocked by queued high priority tasks that cannot start yet.