A generator/factory of tasks (specifically TaskInstances).
As a case class, it can be easily manipulated dynamically to alter its values.
Uses Distributions for the duration and cost. These may be based on random variables. The actual values are sampled at task creation time.
Although typically only 1 task is generated, in principle it can generate multiple task instances with the same properties. However, each task generated will have different samples of the Distributions.
- Value Params
- cost
The generator of the cost.
- createTime
A custom creation time. Negative values correspond to the current time.
- duration
The generator of the duration.
- id
An optional unique id of the task. Otherwise a random ID will be used.
- interrupt
The TaskInstance.interrupt property of the task.
- minStartTime
The earliest possible starting time of the task.
- name
The name of the task.
- priority
The explicit priority of the task.
- resources
The resources of this task
- Companion
- object
Value members
Concrete methods
Generate a TaskInstance.
Generate a TaskInstance.
- Value Params
- addedCost
Any added cost, such as resource running costs.
- currentTime
The current time.
- simulation
The name of the simulation that is spawning the instance.
- Returns
The generated TaskInstance.
Update the cost distribution to use.
Update the cost distribution to use.
- Value Params
- cost
The new cost distribution.
- Returns
An updated Task.
Update the cost Distribution to a constant value.
Update the cost Distribution to a constant value.
- Value Params
- cost
The constant cost value.
- Returns
An updated Task.
Update the custom creation time to use.
Update the custom creation time to use.
- Value Params
- t
The new creation time.
- Returns
An updated Task.
Update the duration distribution to use.
Update the duration distribution to use.
- Value Params
- dur
The new duration distribution.
- Returns
An updated Task.
Update the duration distribution to a constant value.
Update the duration distribution to a constant value.
- Value Params
- dur
The constant duration value.
- Returns
An updated Task.
Update the interrupt to use.
Update the interrupt to use.
- Value Params
- int
The new interrupt.
- Returns
An updated Task.
Update the custom minimum starting time to use.
Update the custom minimum starting time to use.
- Value Params
- t
The new minimum starting time.
- Returns
An updated Task.
Update the task name to use.
Update the task name to use.
- Value Params
- n
The new name.
- Returns
An updated Task.
Update the priority to use.
Update the priority to use.
- Value Params
- p
The new priority.
- Returns
An updated Task.
Update the resources to use.
Update the resources to use.
- Value Params
- r
The new resources.
- Returns
An updated Task.