Abstract
The Cumulative constraint is a foundamental global constraint, which naturally arises in a variety of problems related to scheduling with limited resources. Since its introduction, numerous propagation algorithms have been proposed, offering different tradeoffs between computational complexity and filtering power. Such diversity allows the resolution of a wide range of applications. Motivated by the impressive computational power that modern Graphical Processing Units (GPUs) provide, this paper explores the use of GPUs for the propagation of the Cumulative constraint. The paper describes the development of a GPU-Acceletated Propagator (GAP), 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 our approach is competitive, providing strong filtering in a reasonable amount of time.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Notes
From now on we will use \(\textit{RI}\) to refer both to the set and to the relative vector.
References
Artigues, C., Demassey, S., Nron, E. (2008). Resource-Constrained Project Scheduling: Models, Algorithms, Extensions and Applications. John Wiley & Sons, Ltd, Hoboken, NJ, USA. https://doi.org/10.1002/9780470611227
Ganian, R., Hamm, T., Mescoff, G. (2020). The complexity landscape of resource-constrained scheduling. In: Bessiere, C. (ed.), Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, (pp. 1741–1747). ijcai.org, California, USA. https://doi.org/10.24963/IJCAI.2020/241
Baptiste, P., Le Pape, C., Nuijten, W. (2001). Constraint-Based Scheduling. Springer Science, New York. https://doi.org/10.1007/978-1-4615-1479-4
Tardivo, F., Dovier, A., Formisano, A., Michel, L., Pontelli, E. (2023). Constraint propagation on GPU: A case study for the cumulative constraint. In: Ciré, A.A. (ed.) Integration of Constraint Programming, Artificial Intelligence, and Operations Research - 20th International Conference, CPAIOR 2023, Nice, France, May 29 - June 1, 2023, Proceedings. Lecture Notes in Computer Science, (vol. 13884, pp. 336–353). Springer. https://doi.org/10.1007/978-3-031-33271-5_22
Apt, K. (2003). Principles of Constraint Programming. Cambridge University Press, UK. https://doi.org/10.1017/cbo9780511615320
Rossi, F., van Beek, P., Walsh, T. (2006). Handbook of Constraint Programming. Foundations of Artificial Intelligence, (vol. 2.) Elsevier, Netherlands. https://www.sciencedirect.com/science/bookseries/15746526/2
Sanders, J., Kandrot, E. (2010). CUDA by Example: An Introduction to General-Purpose GPU Programming. Addison-Wesley Professional, USA. https://developer.nvidia.com/cuda-example
Cheng, J., Grossman, M., McKercher, T. (2014). Professional CUDA C Programming. EBL-Schweitzer. John Wiley & Sons, Ltd, Hoboken, NJ, USA. https://www.wiley.com/en-us/Professional+CUDA+C+Programming-p-9781118739310
Aggoun, A., & Beldiceanu, N. (1993). Extending CHIP in order to solve complex scheduling and placement problems. Mathematical and Computer Modelling, 57–73. https://doi.org/10.1016/0895-7177(93)90068-a
Hebrard, E. (2018). Reasoning about np-complete constraints. In: Lang, J. (ed.) Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, (pp. 5672–5676). Sweden. https://doi.org/10.24963/IJCAI.2018/807
Lahrichi, A. (1982). 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.
Beldiceanu, N., Carlsson, M. (2002). A new multi-resource cumulatives constraint with negative heights. In: Lecture Notes in Computer Science, (pp. 63–79). Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46135-3_5
Letort, A., Beldiceanu, N., Carlsson, M. (2012). A scalable sweep algorithm for the cumulative constraint. In: Lecture Notes in Computer Science, (pp. 439–454). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33558-7_33
Gay, S., Hartert, R., Schaus, P. (2015). Simple and scalable time-table filtering for the cumulative constraint. In: Pesant, G. (ed.) Principles and Practice of Constraint Programming, CP 2015. Lecture Notes in Computer Science, (vol. 9255). Springer, Cham. https://doi.org/10.1007/978-3-319-23219-5_11
Nuijten, W. (1994). Time and resource constrained scheduling: a constraint satisfaction approach. PhD thesis, Eindhoven University of Technology
Mercier, L., & Van Hentenryck, P. (2008). Edge finding for cumulative scheduling. INFORMS Journal on Computing, 20(1), 143–153. https://doi.org/10.1287/ijoc.1070.0226
Vilím, P. (2009). Edge finding filtering algorithm for discrete cumulative resources in \(\cal{O}(kn\log n)\). In: Principles and Practice of Constraint Programming - CP 2009, (pp. 802–816). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04244-7_62
Kameugne, R., Fotso, L.P., Scott, J., Ngo-Kateu, Y. (2011). A quadratic edge-finding filtering algorithm for cumulative resource constraints. In: Principles and Practice of Constraint Programming - CP 2011, (pp. 478–492). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23786-7_37
Ouellet, P., Quimper, C.-G. (2013). Time-table extended-edge-finding for the cumulative constraint. In: Lecture Notes in Computer Science, (pp. 562–577). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40627-0_42
Schutt, A., Feydy, T., Stuckey, P.J. (2013). Explaining time-table-edge-finding propagation for the cumulative resource constraint. In: Gomes, C.P., Sellmann, M. (eds.) Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, CPAIOR 2013. Lecture Notes in Computer Science, (vol. 7874, pp. 234–250). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38171-3_16
Gingras, V., Quimper, C. (2016). Generalizing the edge-finder rule for the cumulative constraint. In: Kambhampati, S. (ed.) Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI 2016, (pp. 3103–3109). IJCAI/AAAI Press, California, USA
Vilím, P. (2011). Timetable edge finding filtering algorithm for discrete cumulative resources. In: Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, (pp. 230–245). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21311-3_22
Fahimi, H., Ouellet, Y., & Quimper, C. (2018). Linear-time filtering algorithms for the disjunctive constraint and a quadratic filtering algorithm for the cumulative not-first not-last. Constraints An Int. J., 23(3), 272–293. https://doi.org/10.1007/S10601-018-9282-9
Schutt, A., Wolf, A., Schrader, G. (2005). 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.) Declarative Programming for Knowledge Management. Lecture Notes in Computer Science, (vol. 4369, pp. 66–80). Springer, Berlin Heidelberg. https://doi.org/10.1007/11963578_6
Schutt, A., Wolf, A. (2010). A new \(\cal{O}(n^2\log n)\) not-first/not-last pruning algorithm for cumulative resource constraints. In: Principles and Practice of Constraint Programming - CP 2010, (pp. 445–459). Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15396-9_36
Kameugne, R., & Fotso, L. P. (2013). A cumulative not-first/not-last filtering algorithm in \(\cal{O} (n^2\log n)\). Indian Journal of Pure and Applied Mathematics, 44(1), 95–115. https://doi.org/10.1007/s13226-013-0005-z
Kameugne, R., Betmbe Fetgo, S., Gingras, V., Ouellet, Y., Quimper, C.-G. (2018). Horizontally elastic not-first/not-last filtering algorithm for cumulative resource constraint. In: Integration of Constraint Programming, Artificial Intelligence, and Operations Research, (pp. 316–332). Springer, Cham. https://doi.org/10.1007/978-3-319-93031-2_23
Lopez, P. (1991). Energy-based approach for task scheduling under time and resource constraints. PhD thesis, Université Paul Sabatier-Toulouse III
Baptiste, P., Le Pape, C., & Nuijten, W. (1999). Satisfiability tests and time-bound adjustments for cumulative scheduling problems. Annals of Operations Research, 92, 305–333. https://doi.org/10.1023/a:1018995000688
Derrien, A., Petit, T. (2014). A new characterization of relevant intervals for energetic reasoning. In: Lecture Notes in Computer Science, (pp. 289–297). Springer, Cham. https://doi.org/10.1007/978-3-319-10428-7_22
Tesch, A. (2016). A nearly exact propagation algorithm for energetic reasoning in \(\cal{O}(n^2 \log n)\). In: Lecture Notes in Computer Science, (pp. 493–519). Springer, Cham. https://doi.org/10.1007/978-3-319-44953-1_32
Ouellet, Y., Quimper, C.-G. (2018). A \(\cal{O}(n \log ^2 n)\) checker and \(\cal{O}(n^2\log n)\) filtering algorithm for the energetic reasoning. In: Integration of Constraint Programming, Artificial Intelligence, and Operations Research, (pp. 477–494). Springer, Cham. https://doi.org/10.1007/978-3-319-93031-2_34
Tesch, A. (2018). Improving energetic propagations for cumulative scheduling. In: Lecture Notes in Computer Science, (pp. 629–645). Springer, Cham. https://doi.org/10.1007/978-3-319-98334-9_41
Dal Palù, A., Dovier, A., Formisano, A., & Pontelli, E. (2015). CUD@SAT: SAT solving on GPUs. Journal of Experimental & Theoretical Artificial Intelligence, 27(3), 293–316. https://doi.org/10.1080/0952813X.2014.954274
Collevati, M., Dovier, A., Formisano, A. (2022). GPU parallelism for SAT solving heuristics. In: Calegari, R., Ciatto, G., Omicini, A. (eds.) Proceedings of the CILC’22. CEUR Workshop Proceedings, (vol. 3204, pp. 17–31). CEUR-WS.org, RWTH Aachen University. https://ceur-ws.org/Vol-3204/paper_3.pdf
Dovier, A., Formisano, A., Pontelli, E. (2018). Parallel answer set programming. In: Hamadi, Y., Sais, L. (eds.) Handbook of Parallel Constraint Reasoning, (pp. 237–282). Springer, Cham. https://doi.org/10.1007/978-3-319-63516-3_7
Dovier, A., Formisano, A., Vella, F. (2020). GPU-Based Parallelism for ASP-Solving. In: Hofstedt, P., Abreu, S., John, U., Kuchen, H., Seipel, D. (eds.) Declarative Programming and Knowledge Management, INAP WLP WFLP 2019. Lecture Notes in Computer Science, (vol. 12057, pp. 3–23). Springer, Cham. https://doi.org/10.1007/978-3-030-46714-2_1
Tardivo, F., Dovier, A., Formisano, A., Michel, L., & Pontelli, E. (2023). Constraint propagation on GPU: A case study for the alldifferent constraint. Journal of Logic and Computation, 33(8), 1734–1752. https://doi.org/10.1093/LOGCOM/EXAD033
Nvidia Team. CUDA. https://developer.nvidia.com/cuda-toolkit
Tardivo, F. fzn-minicpp. MiniCPP backend for MiniZinc. https://bitbucket.org/constraint-programming/fzn-minicpp
Michel, L., Schaus, P., Van Hentenryck, P. (2021). MiniCP: a lightweight solver for constraint programming. Mathematical Programming Computation, 133–184. https://doi.org/10.1007/s12532-020-00190-7
Gentzel, R., Michel, L., van Hoeve, W.-J. (2020). HADDOCK: A language and architecture for decision diagram compilation. In: Lecture Notes in Computer Science, (pp. 531–547). Springer, Cham. https://doi.org/10.1007/978-3-030-58475-7_31
Tardivo, F. libfzn. Library to interact with MiniZinc. https://bitbucket.org/constraint-programming/libfzn
Chuffed Team. Chuffed. https://github.com/chuffed/chuffed
Tardivo, F., Chuffed Team. Chuffed. Chuffed with a GPU-accelerater propagator for Cumulative constraint. https://bitbucket.org/constraint-programming/chuffed
Kolisch, R., & Sprecher, A. (1997). PSPLIB - a project scheduling problem library. European Journal of Operational Research, 96(1), 205–216. https://doi.org/10.1016/s0377-2217(96)00170-1
Baptiste, P., Le Pape, C. (1997). Constraint propagation and decomposition techniques for highly disjunctive and highly cumulative project scheduling problems. In: Principles and Practice of Constraint Programming-CP97, (pp. 375–389). Springer, Berlin, Heidelberg. https://doi.org/10.1007/bfb0017454
Carlier, J., & Néron, E. (2003). On linear lower bounds for the resource constrained project scheduling problem. European Journal of Operational Research, 149(2), 314–324. https://doi.org/10.1016/s0377-2217(02)00763-4
MiniZinc Team. The MiniZinc Benchmark Suite. https://github.com/MiniZinc/minizinc-benchmarks
Tardivo, F. MiniCPP-Benchmarks. Set of benchmarks for GPU-accelerated constraints. https://bitbucket.org/constraint-programming/minicpp-benchmarks
Jacop Team. JaCoP. https://github.com/radsz/jacop
Gecode Team. GECODE. https://github.com/Gecode/gecode
MiniZinc Team. MiniZinc Challenge 2022 Results. https://www.minizinc.org/challenge2022/results2022.html
MiniZinc Team. MiniZinc Challenge 2023 Results. https://www.minizinc.org/challenge2023/results2023.html
Cauwelaert, S.V., Lombardi, M., Schaus, P. (2015). Understanding the potential of propagators. In: Integration of AI and OR Techniques in Constraint Programming. Springer, Cham. https://doi.org/10.1007/978-3-319-18008-3_29
Vilím, P., Laborie, P., Shaw, P. (2015). Failure-directed search for constraint-based scheduling. In: Michel, L. (ed.) Integration of AI and OR Techniques in Constraint Programming, CPAIOR 2015. Lecture Notes in Computer Science, vol. 9075, pp. 437–453. Springer, Barcelona, Spain. https://doi.org/10.1007/978-3-319-18008-3_30
Gay, S., Hartert, R., Lecoutre, C., Schaus, P. (2015). Conflict ordering search for scheduling problems. In: Pesant, G. (ed.) Principles and Practice of Constraint Programming, CP 2015. Lecture Notes in Computer Science, vol. 9255, pp. 140–148. Springer, Cham. https://doi.org/10.1007/978-3-319-23219-5_10
Schutt, A., Feydy, T., Stuckey, P. J., & Wallace, M. G. (2011). Explaining the cumulative propagator. Constraints An Int. J., 16(3), 250–282. https://doi.org/10.1007/S10601-010-9103-2
Acknowledgements
Agostino Dovier and Andrea Formisano are partially supported by Unione europea-Next Generation EU, Missione 4 Componente 2, by project MaPSART-“Future Artificial Intelligence (FAIR)”, PE00000013–CUP C63C22000770006, and by INdAM-GNCS project CUP E53C22001930001. Laurent Michel is partially supported by Synchrony. Enrico Pontelli and Fabio Tardivo are supported by NSF grants 2151254, 1914635, 2402128 and by a contract from Wallaroo Inc.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Tardivo, F., Dovier, A., Formisano, A. et al. Constraint propagation on GPU: a case study for the cumulative constraint. Constraints 29, 192–214 (2024). https://doi.org/10.1007/s10601-024-09371-w
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10601-024-09371-w