Constraints on groups of interval variables
CP Optimizer provides specialized constraints on groups of interval variables.
Constraints over groups of intervals allow hierarchical creation of the model by “encapsulating” a group of interval variables by one “high level” interval.
The spanning constraint states that a given interval spans over all present intervals from a given set. That is, the given interval starts together with the first present interval from the set and ends together with the last one.
In the C++ API of CP Optimizer, the class IloSpan represents a spanning constraint.
In the Java™ API of
CP Optimizer, the method IloCP.span returns
a spanning constraint.
In the C# API of CP Optimizer, the method CP.Span returns a spanning constraint.
The alternative constraint models an exclusive alternative among a set of intervals. If a given interval a is present then exactly one of the intervals of the set is present and interval a starts and ends together with this chosen one.
In the C++ API of CP Optimizer, the class IloAlternative represents an alternative constraint.
In the Java API of
CP Optimizer, the method IloCP.alternative returns
an alternative constraint.
In the C# API of CP Optimizer, the method CP.Alternative returns an alternative constraint.
The synchronization constraint makes the intervals in the given set start and end together with an interval a, if a is present.
In the C++ API of CP Optimizer, the class IloSynchronize represents a synchronization constraint.
In the Java API of
CP Optimizer, the method IloCP.synchronize returns
a synchronization constraint.
In the C# API of CP Optimizer, the method CP.Synchronize returns a synchronization constraint.