Skip to main content

Constraint Propagation on GPU: A Case Study for the Cumulative Constraint

  • Conference paper
  • First Online:
Integration of Constraint Programming, Artificial Intelligence, and Operations Research (CPAIOR 2023)

Abstract

The Cumulative constraint is one of the most important global constraints, as it naturally arises in a variety of problems related to scheduling with limited resources. Devising fast propagation algorithms that run at every node of the search tree is critical to enable the resolution of a wide range of applications. Since its introduction, numerous propagation algorithms have been proposed, providing different tradeoffs between computational complexity and filtering power.

Motivated by the impressive computational power that modern GPUs provide, this paper explores the use of GPUs to speed up the propagation of the Cumulative constraint. The paper describes the development of a GPU-driven propagation algorithm, motivates the design choices, and provides solutions for several design challenges. The implementation is evaluated in comparison with state-of-the-art constraint solvers on different benchmarks from the literature. The results suggest that GPU-accelerated constraint propagators can be competitive by providing strong filtering in a reasonable amount of time.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    From now on we will use \( RI \) to refer both to the set and to the relative vector.

References

  1. Aggoun, A., Beldiceanu, N.: Extending CHIP in order to solve complex scheduling and placement problems. Math. Comput. Model. 17, 57–73 (1993). https://doi.org/10.1016/0895-7177(93)90068-a

    Article  Google Scholar 

  2. Apt, K.: Principles of Constraint Programming. Cambridge University Press (2003). https://doi.org/10.1017/cbo9780511615320

  3. Artigues, C., Demassey, S., Nron, E. (eds.): Resource-Constrained Project Scheduling. ISTE (2008). https://doi.org/10.1002/9780470611227

  4. Baptiste, P., Le Pape, C., Nuijten, W.: Satisfiability tests and time-bound adjustments for cumulative scheduling problems. Ann. Oper. Res. 92, 305–333 (1999). https://doi.org/10.1023/a:1018995000688

    Article  MathSciNet  MATH  Google Scholar 

  5. Baptiste, P., Le Pape, C.: Constraint propagation and decomposition techniques for highly disjunctive and highly cumulative project scheduling problems. In: Smolka, G. (ed.) CP 1997. LNCS, pp. 375–389. Springer, Heidelberg (1997). https://doi.org/10.1007/bfb0017454

    Chapter  Google Scholar 

  6. Baptiste, P., Le Pape, C., Nuijten, W.: Constraint-Based Scheduling. Springer, Heidelberg (2001). https://doi.org/10.1007/978-1-4615-1479-4

    Book  MATH  Google Scholar 

  7. 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). https://doi.org/10.1007/3-540-46135-3_5

    Chapter  Google Scholar 

  8. Carlier, J., Néron, E.: On linear lower bounds for the resource constrained project scheduling problem. Eur. J. Oper. Res. 149(2), 314–324 (2003). https://doi.org/10.1016/s0377-2217(02)00763-4

    Article  MathSciNet  MATH  Google Scholar 

  9. Van Cauwelaert, S., Lombardi, M., Schaus, P.: Understanding the potential of propagators. In: Michel, L. (ed.) CPAIOR 2015. LNCS, vol. 9075, pp. 427–436. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-18008-3_29

    Chapter  MATH  Google Scholar 

  10. Cheng, J., Grossman, M., McKercher, T.: Professional CUDA C Programming. EBL-Schweitzer. Wiley (2014). https://www.wiley.com/en-us/Professional+CUDA+C+Programming-p-9781118739310

  11. Collevati, M., Dovier, A., Formisano, A.: GPU parallelism for SAT solving heuristics. In: Calegari, R., Ciatto, G., Omicini, A. (eds.) Proceedings of the CILC 2022. CEUR Workshop Proceedings, vol. 3204, pp. 17–31. CEUR-WS.org (2022)

    Google Scholar 

  12. Dal Palù, A., Dovier, A., Formisano, A., Pontelli, E.: CUD@SAT: SAT solving on GPUs. J. Exp. Theor. Artif. Intell. 27(3), 293–316 (2015). https://doi.org/10.1080/0952813X.2014.954274

    Article  Google Scholar 

  13. Derrien, A., Petit, T.: A new characterization of relevant intervals for energetic reasoning. In: O’Sullivan, B. (ed.) CP 2014. LNCS, vol. 8656, pp. 289–297. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10428-7_22

    Chapter  Google Scholar 

  14. Dovier, A., Formisano, A., Pontelli, E.: Parallel answer set programming. In: Hamadi, Y., Sais, L. (eds.) Handbook of Parallel Constraint Reasoning, pp. 237–282. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-63516-3_7

    Chapter  Google Scholar 

  15. Dovier, A., Formisano, A., Vella, F.: GPU-based parallelism for ASP-solving. In: Hofstedt, P., Abreu, S., John, U., Kuchen, H., Seipel, D. (eds.) INAP/WLP/WFLP -2019. LNCS (LNAI), vol. 12057, pp. 3–23. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-46714-2_1

    Chapter  Google Scholar 

  16. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., USA (1990)

    Google Scholar 

  17. Gay, S., Hartert, R., Schaus, P.: Simple and scalable time-table filtering for the cumulative constraint. In: Pesant, G. (ed.) CP 2015. LNCS, vol. 9255, pp. 149–157. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23219-5_11

    Chapter  MATH  Google Scholar 

  18. Gecode Team: GECODE. https://github.com/Gecode/gecode

  19. Gentzel, R., Michel, L., van Hoeve, W.-J.: HADDOCK: a language and architecture for decision diagram compilation. In: Simonis, H. (ed.) CP 2020. LNCS, vol. 12333, pp. 531–547. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58475-7_31

    Chapter  Google Scholar 

  20. Gingras, V., Quimper, C.G.: Generalizing the edge-finder rule for the cumulative constraint. In: Kambhampati, S. (ed.) Proceedings IJCAI 2016, pp. 3103–3109. IJCAI/AAAI Press (2016)

    Google Scholar 

  21. JaCoP Team: JaCoP. https://github.com/radsz/jacop

  22. Kameugne, R., Betmbe Fetgo, S., Gingras, V., Ouellet, Y., Quimper, C.-G.: Horizontally elastic not-first/not-last filtering algorithm for cumulative resource constraint. In: van Hoeve, W.-J. (ed.) CPAIOR 2018. LNCS, vol. 10848, pp. 316–332. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93031-2_23

    Chapter  MATH  Google Scholar 

  23. Kameugne, R., Fotso, L.P.: A cumulative not-first/not-last filtering algorithm in \(\cal{O} (n^2\log n)\). Indian J. Pure Appl. Math. 44(1), 95–115 (2013). https://doi.org/10.1007/s13226-013-0005-z

    Article  MathSciNet  MATH  Google Scholar 

  24. 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). https://doi.org/10.1007/978-3-642-23786-7_37

    Chapter  Google Scholar 

  25. Kolisch, R., Sprecher, A.: PSPLIB - a project scheduling problem library. Eur. J. Oper. Res. 96(1), 205–216 (1997). https://doi.org/10.1016/s0377-2217(96)00170-1

    Article  MATH  Google Scholar 

  26. Lahrichi, A.: Scheduling: the notions of hump, compulsory parts and their use in cumulative problems. Comptes Rendus De L Academie Des Sciences Serie I-mathematique 294(6), 209–211 (1982)

    Google Scholar 

  27. Letort, A., Beldiceanu, N., Carlsson, M.: A scalable sweep algorithm for the cumulative constraint. In: Milano, M. (ed.) CP 2012. LNCS, pp. 439–454. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33558-7_33

    Chapter  Google Scholar 

  28. Lopez, P.: Energy-based approach for task scheduling under time and resource constraints. Ph.D. thesis, Université Paul Sabatier-Toulouse III (1991)

    Google Scholar 

  29. Mercier, L., Van Hentenryck, P.: Edge finding for cumulative scheduling. INFORMS J. Comput. 20(1), 143–153 (2008). https://doi.org/10.1287/ijoc.1070.0226

    Article  MathSciNet  MATH  Google Scholar 

  30. Michel, L., Schaus, P., Van Hentenryck, P.: MiniCP: a lightweight solver for constraint programming. Math. Program. Comput. 13(1), 133–184 (2021). https://doi.org/10.1007/s12532-020-00190-7

    Article  MathSciNet  MATH  Google Scholar 

  31. MiniZinc Team: MiniZinc Challenge 2022 Results. https://www.minizinc.org/challenge2022/results2022.html

  32. MiniZinc Team: The MiniZinc Benchmark Suite. https://github.com/MiniZinc/minizinc-benchmarks

  33. Nuijten, W.: Time and resource constrained scheduling: a constraint satisfaction approach. Ph.D. thesis, Eindhoven University of Technology (1994)

    Google Scholar 

  34. Nvidia Team: CUDA. https://developer.nvidia.com/cuda-toolkit

  35. Ouellet, P., Quimper, C.-G.: Time-table extended-edge-finding for the cumulative constraint. In: Schulte, C. (ed.) CP 2013. LNCS, vol. 8124, pp. 562–577. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40627-0_42

    Chapter  Google Scholar 

  36. Ouellet, Y., Quimper, C.-G.: A \(O(n \log ^2 n)\) checker and \(O(n^2 \log n)\) filtering algorithm for the energetic reasoning. In: van Hoeve, W.-J. (ed.) CPAIOR 2018. LNCS, vol. 10848, pp. 477–494. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93031-2_34

    Chapter  MATH  Google Scholar 

  37. Rossi, F., van Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming, Foundations of Artificial Intelligence, vol. 2. Elsevier (2006). https://www.sciencedirect.com/science/bookseries/15746526/2

  38. Sanders, J., Kandrot, E.: CUDA by Example: An Introduction to General-Purpose GPU Programming. Pearson Education (2010). https://developer.nvidia.com/cuda-example

  39. Schutt, A., Wolf, A.: A new \({\cal{O}}(n^2\log n)\) not-first/not-last pruning algorithm for cumulative resource constraints. In: Cohen, D. (ed.) CP 2010. LNCS, vol. 6308, pp. 445–459. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15396-9_36

    Chapter  Google Scholar 

  40. Schutt, A., Wolf, A., Schrader, G.: Not-first and not-last detection for cumulative scheduling in \({\cal{O}}(n^3\log n)\). In: Umeda, M., Wolf, A., Bartenstein, O., Geske, U., Seipel, D., Takata, O. (eds.) INAP 2005. LNCS (LNAI), vol. 4369, pp. 66–80. Springer, Heidelberg (2006). https://doi.org/10.1007/11963578_6

    Chapter  Google Scholar 

  41. Tardivo, F.: Fzn-minicpp. https://bitbucket.org/constraint-programming/fzn-minicpp

  42. Tardivo, F.: Libfzn. https://bitbucket.org/constraint-programming/libfzn

  43. Tardivo, F.: MiniCPP-Benchmarks. https://bitbucket.org/constraint-programming/minicpp-benchmarks

  44. Tardivo, F., Dovier, A., Formisano, A., Michel, L., Pontelli, E.: Constraints propagation on GPU: a case study for AllDifferent. In: Calegari, R., Ciatto, G., Omicini, A. (eds.) Proceedings of CILC 2022. CEUR Workshop Proceedings, vol. 3204, pp. 61–74. CEUR-WS.org (2022)

    Google Scholar 

  45. Tesch, A.: A nearly exact propagation algorithm for energetic reasoning in \(\cal{O}(n^2 \log n)\). In: Rueher, M. (ed.) CP 2016. LNCS, vol. 9892, pp. 493–519. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-44953-1_32

    Chapter  Google Scholar 

  46. Tesch, A.: Improving energetic propagations for cumulative scheduling. In: Hooker, J. (ed.) CP 2018. LNCS, vol. 11008, pp. 629–645. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98334-9_41

    Chapter  Google Scholar 

  47. Vilím, P.: Edge finding filtering algorithm for discrete cumulative resources in \({\cal{O}}(kn \, {\rm log} \, n)\). In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 802–816. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04244-7_62

    Chapter  Google Scholar 

  48. 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). https://doi.org/10.1007/978-3-642-21311-3_22

    Chapter  MATH  Google Scholar 

Download references

Acknowledgements

Agostino Dovier and Andrea Formisano are partially supported by Interdepartment Project on AI and by INdAM-GNCS projects CUP E55F22000270001 and CUP E53C22001930001. Laurent Michel is partially supported by Synchrony.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fabio Tardivo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Tardivo, F., Dovier, A., Formisano, A., Michel, L., Pontelli, E. (2023). Constraint Propagation on GPU: A Case Study for the Cumulative Constraint. In: Cire, A.A. (eds) Integration of Constraint Programming, Artificial Intelligence, and Operations Research. CPAIOR 2023. Lecture Notes in Computer Science, vol 13884. Springer, Cham. https://doi.org/10.1007/978-3-031-33271-5_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-33271-5_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-33270-8

  • Online ISBN: 978-3-031-33271-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics