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

cp::BeginOfPrevious

The function cp::BeginOfPrevious refers to the begin of the previous activity in a sequence of activities. For a resource \(r\), an activity \(a\), timeslots \(l\) and \(d\), the function cp::BeginOfNext(r,a,l,d) returns

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

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

  • \(p\texttt{.begin}\) if \(a\) is present and not scheduled as the last activity on \(r\), and \(p\) is the previous activity of \(a\) scheduled on \(r\).

cp::BeginOfPrevious(
        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 value 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 value 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