- Function cp::Synchronize(globalActivity, activityBinding, subActivity)
cp::Synchronize
The function cp::Synchronize(g,i,a_i)
returns 1 if activity
\(g\) is not present, or if all present activities \(a_i\) match
activity \(g\). The function cp::Synchronize(g,i,a_i)
is
equivalent to
This function is typically used in scheduling problems to synchronize activities.
cp::Synchronize(
globalActivity, ! (input) an expression
activityBinding, ! (input) an index domain
subActivity ! (input) an expression
)
Arguments
- globalActivity
An expression resulting in an activity.
- activityBinding
An index domain that specifies and possibly limits the scope of indices. This argument follows the syntax of the index domain argument of iterative operators.
- subActivity
An expression resulting in an activity. The result is a vector with an element for each possible value of the indices in index domain
activityBinding
.
Return Value
This function returns 1 if the above condition is satisfied, 0 otherwise. When the index domain
activityBinding
is empty this function will return an error.
See also
The functions cp::Alternative
and cp::Span
.