| The TaskJuggler Manual | ||
|---|---|---|
| Prev | Chapter 7. Property Reference | Next |
mode>select
<mode>
| |||
|---|---|---|---|
| Description | The select functions controls which resource is picked from an allocation and it's alternatives. The selection is re-evaluated each time the resource used in the previous time slot becomes unavailable. Even for non-persistent allocations a change in the resource selection only happens if the resource used in the previous (or next for ASAP tasks) time slot has become unavailable. | ||
| Attributes | Name | Type | Description |
mode | ID | See table below for possible values. | |
| Context | allocate, | ||
| Inheritable | No | Scenario Spec. | No |
| See also | persistent | ||
maxloaded | Pick the available resource that has been used the most so far. |
minloaded | Pick the available resource that has been used the least so far. |
minallocated | Pick the resource that has the smallest allocation factor. The allocation factor is calculated from the various allocations of the resource across the tasks. This is the default setting. |
order | Pick the first available resource from the list. |
random | Pick a random resource from the list. |
project prj "Project" "1.0" 2000-01-01 - 2000-03-01
resource tuxus "Tuxus"
resource tuxia "Tuxia"
task t1 "Task 1" {
start 2000-01-01
effort 5d
# First try to allocate Tuxus. When he is not available try Tuxia.
allocate tuxus { alternative tuxia select order }
}
task t2 "Task 2" {
start 2000-01-01
effort 5d
# Use tuxux or tuxia, whoever is available and try to balance
# the allocated load.
allocate tuxus { alternative tuxia select minloaded}
}
task t3 "Task 3" {
start 2000-01-01
effort 5d
# For slave drivers: Always pick the resource that has been loaded
# the most already.
allocate tuxus { alternative tuxia select maxloaded}
}