A Scalable Sweep Algorithm for the cumulative Constraint

  • Arnaud Letort
  • Nicolas Beldiceanu
  • Mats Carlsson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7514)


This paper presents a sweep based algorithm for the cumulative constraint, which can operate in filtering mode as well as in greedy assignment mode. Given n tasks, this algorithm has a worst-case time complexity of O(n2). In practice, we use a variant with better average-case complexity but worst-case complexity of O(n2 logn), which goes down to O(n logn) when all tasks have unit duration, i.e. in the bin-packing case. Despite its worst-case time complexity, this algorithm scales well in practice, even when a significant number of tasks can be scheduled in parallel. It handles up to 1 million tasks in one single cumulative constraint in both Choco and SICStus.


Early Start Assembly Line Balance Late Start Assembly Line Balance Problem Sweep Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aggoun, A., Beldiceanu, N.: Extending CHIP in order to solve complex scheduling and placement problems. Mathl. Comput. Modelling 17(7), 57–73 (1993)CrossRefGoogle Scholar
  2. 2.
    Beldiceanu, N., Carlsson, M., Poder, E., Sadek, R., Truchet, C.: A Generic Geometrical Constraint Kernel in Space and Time for Handling Polymorphic k-Dimensional Objects. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 180–194. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Beldiceanu, N., Carlsson, M.: A New Multi-resource cumulatives Constraint with Negative Heights. In: Van Hentenryck, P. (ed.) CP 2002. LNCS, vol. 2470, pp. 63–79. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  4. 4.
    de Berg, M., van Kreveld, M., Overmars, M., Schwarzkopf, O.: Computational geometry - algorithms and Applications. Springer (1997)Google Scholar
  5. 5.
    Carlsson, M., et al.: SICStus Prolog User’s Manual. SICS, 4.2.1 edn. (2012),
  6. 6.
    Freuder, E., Lee, J., O’Sullivan, B., Pesant, G., Rossi, F., Sellman, M., Walsh, T.: The future of CP. Personal communication (2011)Google Scholar
  7. 7.
    Hermenier, F., Demassey, S., Lorca, X.: Bin Repacking Scheduling in Virtualized Datacenters. In: Lee, J. (ed.) CP 2011. LNCS, vol. 6876, pp. 27–41. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  8. 8.
    Hermenier, F., Lorca, X., Menaud, J.M., Muller, G., Lawall, J.: Entropy: a consolidation manager for clusters. In: VEE 2009, pp. 41–50. ACM (2009)Google Scholar
  9. 9.
    Kameugne, R., Fotso, L.P., Scott, J., Ngo-Kateu, Y.: A Quadratic Edge-Finding Filtering Algorithm for Cumulative Resource Constraints. In: Lee, J. (ed.) CP 2011. LNCS, vol. 6876, pp. 478–492. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. 10.
    O’Sullivan, B.: CP panel position - the future of CP. Personal communication (2011)Google Scholar
  11. 11.
    Pape, C.L.: Des systèmes d’ordonnacement flexibles et opportunistes. Ph.D. thesis, Université Paris IX (1988) (in French)Google Scholar
  12. 12.
    Régin, J.C., Rezgui, M.: Discussion about constraint programming bin packing models. In: AI for Data Center Management and Cloud Computing. AAAI (2011)Google Scholar
  13. 13.
    ROADEF: Challenge 2012 machine reassignment (2012),
  14. 14.
    Schaus, P., Deville, Y.: A global constraint for bin-packing with precedences: application to the assembly line balancing problem. In: AAAI 2008, pp. 369–374. AAAI Press (2008)Google Scholar
  15. 15.
    Schulte, C.: Comparing trailing and copying for constraint programming. In: Schreye, D.D. (ed.) ICLP 1999, pp. 275–289. The MIT Press (1999)Google Scholar
  16. 16.
    Schutt, A., Feydy, T., Stuckey, P.J., Wallace, M.G.: Why Cumulative Decomposition Is Not as Bad as It Sounds. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 746–761. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  17. 17.
    Shaw, P.: Using Constraint Programming and Local Search Methods to Solve Vehicle Routing Problems. In: Maher, M.J., Puget, J.-F. (eds.) CP 1998. LNCS, vol. 1520, pp. 417–431. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  18. 18.
    Shaw, P.: A Constraint for Bin Packing. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 648–662. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  19. 19.
    Team, C.: Choco: an open source Java CP library. Research report 10-02-INFO, Ecole des Mines de Nantes (2010),
  20. 20.
    Vilím, P.: Edge Finding Filtering Algorithm for Discrete Cumulative Resources in O(kn logn). In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 802–816. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  21. 21.
    Vilím, P.: Timetable Edge Finding Filtering Algorithm for Discrete Cumulative Resources. In: Achterberg, T., Beck, J.C. (eds.) CPAIOR 2011. LNCS, vol. 6697, pp. 230–245. Springer, Heidelberg (2011)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Arnaud Letort
    • 1
  • Nicolas Beldiceanu
    • 1
  • Mats Carlsson
    • 2
  1. 1.TASC team, (EMN-INRIA,LINA) Mines de NantesFrance
  2. 2.SICSKistaSweden

Personalised recommendations