select <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.

AttributesNameTypeDescription
modeID

See table below for possible values.

Contextallocate,
InheritableNoScenario Spec.No
See alsopersistent

maxloadedPick the available resource that has been used the most so far.
minloadedPick the available resource that has been used the least so far.
minallocatedPick 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.
orderPick the first available resource from the list.
randomPick 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}
}