Cumulative functions were introduced in:
This paper explains how to implement them using a Generalized Cumulative Constraint: