Function cp::BeginOfNext(sequentialResource, scheduledActivity, lastValue, absentValue)

# cp::BeginOfNext

The function cp::BeginOfNext refers to the begin of the next 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 last activity on $$r$$, and

• $$n\texttt{.begin}$$ 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::BeginOfNext(
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 an element in the problem schedule domain. The default value of this expression is the last 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.