Abstract. Cumulative is an essential constraint in the CP framework, and is present in scheduling and packing applications. The lightest filtering for the cumulative constraint is time-tabling. It has been improved several times over the last decade. The best known theoretical time complexity for time-table is O(n log n) introduced by Ouellet and Quimper. We show a new algorithm able to run in O(n), by relying on range min query algorithms. This approach is more of theoretical rather than practical interest, because of the generally larger number of iterations needed to reach the fixed point. On the practical side, the recent synchronized sweep algorithm of Letort et al, with a time-complexity of O(n 2 ), requires fewer iterations to reach the fix-point and is considered as the most scalable approach. Unfortunately this algorithm is not trivial to implement. In this work we present a O(n 2 ) simple two step alternative approach: first building the mandatory profile, then updating all the bounds of the activities. Our experimental results show that our algorithm outperforms synchronized sweep and the time-tabling implementations of other open-source solvers on large scale scheduling instances, sometimes significantly.Keywords: Constraint programming, Large-Scale, Scheduling, Cumulative Constraint, Time-table.
PreliminariesIn this paper, we focus on a single cumulative resource with a discrete finite capacity C ∈ N and a set of n tasks Ω = {1, . . . , n}. Each task i has a start time s i ∈ Z, a fixed duration d i ∈ N, and an end time e i ∈ Z such that the equality s i + d i = e i holds. Moreover, each task i consumes a fixed amount of resource c i ∈ N during its processing time. Tasks are non-preemptive, i.e., they cannot be interrupted during their processing time. In the following, we denote by s i and s i the earliest and the latest start time of task i and by e i and e i the earliest and latest end time of task i (see Fig. 1). The cumulative constraint [1] ensures that the accumulated resource consumption does not exceed the maximum capacity C at any time t (see Fig. 2): ∀t ∈ Z : i∈Ω : si≤t