Initializing help system before first use

Resources

A resource can be of two different types:

  • Disjunctive when the resource can process only one task at a time (KALIS_UNARY_RESOURCE).
  • Cumulative when the resource can process several tasks at the same time (KALIS_DISCRETE_RESOURCE).

Traditional examples of disjunctive resources are Jobshop scheduling problems. Cumulative resources are used for the Resource-Constrained Project Scheduling Problem (RCPSP)

Note that a disjunctive resource is semantically equivalent to a cumulative resource with maximal capacity one and unit resource usage for each task using this resource but this equivalence does not hold in terms of constraint propagation.

When defining a resource with Xpress Kalis its initial capacity is specified. For a disjunctive resource the capacity value is always equal to one. The structural capacity of a resource does not vary over time but a maximal temporal capacity can be imposed at any point of time with the procedure setcapacity.

The following graphic shows an example with three tasks A, B and C executing on a disjunctive resource and on a cumulative resource with resource usage 3 for task A, 1 for task B, and 1 for task C.

Scheduling/resources.png

Tasks require, provide, consume and produce resources:

  • A task requires a resource if some amount of the resource capacity must be made available for the execution of the activity. The capacity is renewable, this means the required capacity becomes available again after the end of the task.
  • A task provides a resource if some amount of the resource capacity is made available through the execution of the task. The capacity is renewable, that is, the provided capacity is available only during the execution of the task.
  • A task consumes a resource if some amount of the resource capacity must be made available for the execution of the task and the capacity is non-renewable, that is, the consumed capacity is no longer available at the end of the task.
  • A task produces a resource if some amount of the resource capacity is made available through the execution of the task and the capacity is non-renewable, that is, the produced capacity is definitively available after the start of the task.

Task productions, requirements, provisions and productions can be accessed with the following methods:

Resources and tasks are declared by using the standard Mosel syntax. For instance, the following code extract shows how to create a task my_cptask, a static array of resources cpresource_array, and a dynamic array of cptask dyn_cptask_array:

declarations
   my_cptask       : cptask
   cpresource_array: array(1..10) of cpresource
   dyn_cptask_array: array(range) of cptask
end-declarations

Note that entries of dynamic arrays of tasks or resources (arrays declared as dynamic at their creation or arrays for which some or all of the index sets are not known at the declaration like dyn_cptask_array in the example above) must be created explicitly using the Mosel procedure create:

declarations
   dyn_cptask_array: array(range) of cptask
end-declarations
forall(i in 3..30) create (dyn_cptask_array(i))

After its declaration, the second step in the creation of a task or resource consists of defining somes attributes with the procedures set_task_attributes and set_resource_attributes.

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.