synchronize
Creates a synchronization constraint between interval variables.
Syntax
constraint synchronize(intervalVar interval, intervalVarArray array)
Parameters
-
interval: interval variable. -
array: array of interval variables synchronized withinterval.
Description
This function creates a synchronization constraint between an interval variable interval and a set of interval variables in array. This constraint makes all present intervals in array start and end together with interval, if it is present.
Example
a = intervalVar(size=10..20);
b1 = intervalVar(optional);
b2 = intervalVar(optional);
b3 = intervalVar(optional);
// If an interval b is present it must start and end at the same value as interval a
synchronize(a, [b1,b2,b3]);
Notes
The synchronize constraint is the same as a set of startAtStart and endAtEnd constraints between interval variable interval and each of the interval variables in array.