5.73. coloured_cumulative
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Synonym
.
- Arguments
- Restrictions
- Purpose
Consider the set of tasks described by the collection. The constraint forces that, at each point in time, the number of distinct colours of the set of tasks that overlap that point, does not exceed a given limit. 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 . For each task of it also imposes the constraint .
- Example
-
Figure 5.73.1. The coloured cumulative solution to the Example slot with at most two distinct colours in parallel
Figureย 5.73.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, 2 and 3 are respectively coloured in yellow, blue and pink. The constraint holds since at each point in time we do not have more than distinct colours.
- Typical
- Symmetries
Items of are permutable.
One and the same constant can be added to the and attributes of all items of .
All occurrences of two distinct values of can be swapped; all occurrences of a value of can be renamed to any unused value.
can be increased.
- Arg. properties
Contractible wrt. .
- Usage
Useful for scheduling problems where a machine can only proceed in parallel a maximum number of tasks of distinct type. This condition cannot be modelled by the classical constraint. Also useful for coloured bin packing problems (i.e., ) where each item has a colour and no bin contains items with more than distinct coloursย [DawandeKalagnanamSethuraman98], [GarganiRefalo07], [HeinzSchlechteStephanWinkler12].
- 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 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 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
-
common keyword: , ย (resource constraint).
related: .
specialisation: ย (a colour is assigned to each collection of tasks of constraint and a limit of one single colour is enforced).
- Keywords
characteristic of a constraint: coloured.
constraint type: scheduling constraint, resource constraint, temporal constraint.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph class
-
- Sets
-
- Constraint(s) on sets
- Graph model
Same as , except that we use another constraint for computing the resource consumption at each time point.
Partsย (A) andย (B) of Figureย 5.73.2 respectively show the initial and final graph associated with the second graph constraint of the Example slot. On the one hand, each source vertex of the final graph can be interpreted as a time point. On the other hand the successors of a source vertex correspond to those tasks that overlap that time point. The constraint holds since for each successor set of the final graph the number of distinct colours of the tasks in does not exceed the 2.
Figure 5.73.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 .