Scheduler
A scheduler selects the next TaskInstances to be started by the Coordinator at a given time.
Value members
Abstract methods
Adds a TaskInstance to be scheduled.
Adds a TaskInstance to be scheduled.
- Value Params
- task
The TaskInstance to add.
Determines which TaskInstances to start next.
Determines which TaskInstances to start next.
TaskInstances are assumed to be sorted by priority.
- Value Params
- currentTime
The current timestamp.
- resourceMap
The map of available TaskResources.
- tasks
The queue of TaskInstances waiting to be started.
- Returns
The sequence of TaskInstances to start now.
Retrieves an iterable collection of queued TaskInstances.
Retrieves an iterable collection of queued TaskInstances.
- Returns
The TaskInstances in the scheduling queue.
Removes all TaskInstances belonging to an (presumably aborted) simulation.
Removes all TaskInstances belonging to an (presumably aborted) simulation.
- Value Params
- simulation
The name of the simulation that was aborted.
Removes a TaskInstance that no longer needs scheduling.
Removes a TaskInstance that no longer needs scheduling.
- Value Params
- task
The TaskInstance to remove.
Concrete methods
Adds an Task described by an (ID,time) pair to the list of completed IDs
Adds an Task described by an (ID,time) pair to the list of completed IDs
- Value Params
- id
The ID to be added
- time
The time at which the task completed
- Returns
A LookaheadStructure with this (ID,time) pair added to the list of completed tasks
Checks if a named TaskResource is idle.
Checks if a named TaskResource is idle.
- Value Params
- r
The name of the TaskResource.
- resourceMap
The map of available TaskResources.
- Returns
true if the resource is idle, false otherwise.
Removes the lookahead structure associated with the given actor.
Removes the lookahead structure associated with the given actor.
- Value Params
- actor
The actor corresponding to the lookahead structure.