5.74. coloured_cumulatives
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Synonym
.
- Arguments
- Restrictions
- Purpose
Consider a set of tasks described by the collection. The constraint forces for each machine of the collection the following condition: at each point in time , the numbers of distinct colours of the set of tasks that both overlap that point and are assigned to machine does not exceed the capacity of machine . A task overlaps a point if and only if (1)ย its origin is less than or equal to , and (2)ย its end is strictly greater than . It also imposes for each task of the constraint .
- Example
-
Figureย 5.74.1 shows the solution associated with the example. Each rectangle of the figure corresponds to a task of the constraint. Tasks that have their colour attribute set to 1 and 2 are respectively coloured in blue and pink. The constraint holds since for machineย 1 we have at most two distinct colours in parallel (which is the maximum capacity for machineย 1), while for machineย 2 we have no more than a single colour in parallel (which is actually the maximum capacity for machineย 2).
Figure 5.74.1. The coloured cumulative solution to the Example slot with at most two distinct colours in parallel on machine 1 and at most one distinct colour in parallel on machine 2
- Typical
- Symmetries
Items of are permutable.
Items of are permutable.
can be increased.
All occurrences of two distinct values in or can be swapped; all occurrences of a value in or can be renamed to any unused value.
- Arg. properties
Contractible wrt. .
- Usage
Useful for scheduling problems where several machines are available and where you have to assign each task to a specific machine. In addition each machine can only proceed in parallel a maximum number of tasks of distinct types.
- Reformulation
The constraint can be expressed in term of a set of reified constraints and of constraints:
For each pair of tasks of the collection we create a variable which is set to the colour of task if both tasks are assigned to the same machine and if task overlaps the origin attribute of task , and to the colour of task otherwise:
If :
.
If :
.
-
ย ย ย
ย ย ย
ย ย ย
ย ย ย
For each task we create a variable which gives the number of distinct colours associated with the tasks that both are assigned to the same machine as task and overlap the origin of task ( overlaps its own origin) and we impose to not exceed the maximum number of distinct colours allowed at each instant:
- See also
assignment dimension removed: ย ( attribute removed), ย ( attribute removed and number of distinct replaced by sum of ).
common keyword: , ย (resource constraint).
related: .
- Keywords
characteristic of a constraint: coloured.
constraint type: scheduling constraint, resource constraint, temporal constraint.
modelling: number of distinct values, assignment dimension, zero-duration task.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
For all items of :
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph class
-
- Sets
-
- Constraint(s) on sets
- Graph model
Partsย (A) andย (B) of Figureย 5.74.2 respectively shows the initial and final graph associated with machinesย 1 and 2 involved in the Example slot. On the one hand, each source vertex of the final graph can be interpreted as a time point on a specific machine . On the other hand the successors of a source vertex correspond to those tasks that both overlap that time point and are assigned to machine . The constraint holds since for each successor set of the final graph the number of distinct colours in does not exceed the capacity of the machine corresponding to the time point associated with .
Figure 5.74.2. Initial and final graph of the constraint
(a) (b) - Signature
Since is the maximum number of vertices of the final graph of the first graph constraint we can rewrite to . This leads to simplify to .