Initializing help system before first use

set_resource_attributes

set_resource_attributes


Purpose
Sets some attributes for a resource.
A resource can be of two different types:
  • Disjunctive when the resource can be used only by one task at a time.
  • Cumulative when the resource can be used by several tasks at the same time.
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 term of constraint propagation. The parameter type allows the user to choose between a disjunctive resource (KALIS_UNARY_RESOURCE) and a cumulative resource (KALIS_DISCRETE_RESOURCE). The last parameter, capacity, indicates the structural maximal capacity of the resource. When the resource is disjunctive this parameter must be equal to one. The structural capacity does not vary over time but a maximal temporal capacity can be imposed at any time point with the setcapacity function. The following graphic shows an example with three tasks A, B and C processed 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
Synopsis
procedure set_resource_attributes(resource:cpresource, type:integer)
procedure set_resource_attributes(resource:cpresource, type:integer, capacity:integer)
procedure set_resource_attributes(resource:cpresource, type:integer, capacity:integer, alg:integer)
Arguments
resource 
the resource
type 
capacity 
maximal capacity of a discrete resource
alg 
Related topics