- Function cp::GroupOfPrevious(sequentialResource, scheduledActivity, firstValue, absentValue)
cp::GroupOfPrevious
The function cp::GroupOfPrevious
refers to the group of the previous
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 \(f\) and \(d\), the function
cp::GroupOfPrevious(r,a,f,d)
returns
\(d\) if \(a\) is absent,
\(f\) if \(a\) is present and scheduled as the first activity on \(r\), and
\(GroupOf(r,p)\) if \(a\) is present and not scheduled as the first activity on \(r\), and \(p\) is the previous activity of \(a\) scheduled on \(r\).
cp::GroupOfPrevious(
sequentialResource, ! (input) an expression
scheduledActivity, ! (input) an expression
firstValue, ! (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.
- firstValue
An optional expression that results in a group. The default value of this expression is the first element of the group set of the sequential resource.
- absentValue
An optional expression that results in a group. The default value of this expression is the first element of the group set of the sequential resource.
Return Value
This function returns a group.
See also
The functions
cp::BeginOfPrevious
andcp::EndOfNext
, andConstraint Programming on Constraint Programming in the Language Reference.