Function cp::EndOfPrevious(sequentialResource, scheduledActivity, firstValue, absentValue)

cp::EndOfPrevious

The function cp::EndOfPrevious refers to the end of the previous activity in a sequence of activities. For a resource \(r\), an activity \(a\), timeslots \(f\) and \(d\), the function cp::EndOfPrevious(r,a,f,d) returns

  • \(d\) if \(a\) is absent,

  • \(f\) if \(a\) is present and scheduled as the first activity on \(r\), and

  • \(p\texttt{.end}\) 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::EndOfPrevious(
        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 an element in the problem schedule domain. The default of this expression is the first element in the schedule domain of the sequential resource.

absentValue

An optional expression that results in an element in the problem schedule domain. The default of this expression is the first element in the problem schedule domain.

Return Value

This function returns an element in the problem schedule domain.

See also