5.276. next_greater_element
DESCRIPTION | LINKS | GRAPH |
- Origin
M.Β Carlsson
- Constraint
- Arguments
- Restrictions
- Purpose
is the value strictly greater than located at the smallest possible entry of the table . In addition, the variables of the collection are sorted in strictly increasing order.
- Example
-
The constraint holds since:
is fixed to the first value 8 strictly greater than ,
The attributes of the items of the collection are sorted in strictly increasing order.
- Typical
- Usage
Originally introduced inΒ [CarlssonBeldiceanu04] for modelling the fact that a nucleotide has to be consumed as soon as possible at cycle after a given cycle .
- Remark
Similar to the constraint, except for the fact that the attributes are sorted.
- Reformulation
Let denote the variables of the collection of variables . By creating the extra variables and , the constraint can be expressed in term of the following constraints:
- See also
common keyword: Β (order constraint).
implies: .
related: Β (allow to iterate over the values of a table).
- Keywords
characteristic of a constraint: minimum, derived collection.
- Derived Collection
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Sets
-
- Constraint(s) on sets
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.276.1 respectively show the initial and final graph associated with the second graph constraint of the Example slot. Since we use the graph property, the arcs of the final graph are stressed in bold.
Figure 5.276.1. Initial and final graph of the constraint
(a) (b) - Signature
Since the first graph constraint uses the arc generator on the collection, the number of arcs of the corresponding initial graph is equal to . Therefore the maximum number of arcs of the final graph is equal to . For this reason we can rewrite to and simplify to .