- Function cp::GroupOfNext(sequentialResource, scheduledActivity, lastValue, absentValue)
cp::GroupOfNext
The function cp::GroupOfNext
refers to the group of the next
activity in a sequence of activities. The group of an activity is
specified in the group definition
attribute of the sequential
resource to ensure the sequencing. For a resource \(r\), an activity
\(a\), groups \(l\) and \(d\), the function
cp::GroupOfNext(r,a,l,d)
returns
\(d\) if \(a\) is absent,
\(l\) if \(a\) is present and scheduled as the last activity on \(r\), and
\(GroupOf(r,n)\) if \(a\) is present and not scheduled as the last activity on \(r\), and \(n\) is the next activity of \(a\) scheduled on \(r\).
cp::GroupOfNext(
sequentialResource, ! (input) an expression
scheduledActivity, ! (input) an expression
lastValue, ! (optional) an expression
absentValue ! (optional) an expression
)
Arguments
- sequentialResource
An expression that results in a sequential resource.
- scheduledActivity
An expression that results in an activity.
- lastValue
An optional expression that results in a group. The default value of this expression is the last element in the group set of the sequential resource.
- absentValue
An optional expression that results in a group. The default value of this expression is the last element in the group set of the sequential resource.
Return Value
This function returns a group.
See also
The functions
cp::BeginOfNext
andcp::EndOfPrevious
, andConstraint Programming on Constraint Programming in the Language Reference.