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

# cp::SizeOfNext

The function cp::SizeOfNext refers to the size of the next activity in a sequence of activities. A size is an integer in the range $$\{0..card(\texttt{problem schedule domain})-1\}$$. For a resource $$r$$, an activity $$a$$, sizes $$l$$ and $$d$$, the function cp::SizeOfNext(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{.size}$$ 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::SizeOfNext(
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 size. The default value of this expression is 0.

absentValue

An optional expression that results in a size. The default value of this expression is 0.

## Return Value

This function returns a size.