An Advanced Answer Set Programming Encoding for Nurse Scheduling
The goal of the Nurse Scheduling Problem (NSP) is to find an assignment of nurses to shifts according to specific requirements. Given its practical relevance, many researchers have developed different strategies for solving several variants of the problem. One of such variants was recently addressed by an approach based on Answer Set Programming (ASP), obtaining promising results. Nonetheless, the original ASP encoding presents some intrinsic weaknesses, which are identified and eventually circumvented in this paper. The new encoding is designed by taking into account both intrinsic properties of NSP and internal details of ASP solvers, such as cardinality and weight constraint propagators. The performance gain of clingo and wasp is empirically verified on instances from ASP literature. As an additional contribution, the performance of clingo and wasp is compared to other declarative frameworks, namely SAT and ILP; the best performance is obtained by clingo running the new ASP encoding.
KeywordsAnswer Set Programming Knowledge representation and reasoning Nurse Scheduling
We would like to thank Nextage srl for providing support for this work. Mario Alviano has been partially supported by the Italian Ministry for Economic Development (MISE) under project “PIUCultura – Paradigmi Innovativi per l’Utilizzo della Cultura” (no. F/020016/01-02/X27), and under project “Smarter Solutions in the Big Data World (S2BDW)” (no. F/050389/01-03/X32) funded within the call “HORIZON2020” PON I&C 2014-2020, and by Gruppo Nazionale per il Calcolo Scientifico (GNCS-INdAM).
- 1.The website of Gurobi. http://www.gurobi.com
- 6.Alviano, M., Dodaro, C., Ricca, F.: A MaxSAT algorithm using cardinality constraints of bounded size. In: IJCAI 2015, pp. 2677–2683. AAAI Press (2015)Google Scholar
- 10.Balduccini, M., Gelfond, M., Watson, R., Nogueira, M.: The USA-advisor: a case study in answer set planning. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS (LNAI), vol. 2173, pp. 439–442. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45402-0_39 CrossRefGoogle Scholar
- 14.Burke, E.K., Causmaecker, P.D., Berghe, G.V., Landeghem, H.V.: The state of the art of nurse rostering. J. Sched. 7(6), 441–499 (2004). https://doi.org/10.1023/B:JOSH.0000046076.75950.0b CrossRefzbMATHMathSciNetGoogle Scholar
- 15.Calimeri, F., Faber, W., Gebser, M., Ianni, G., Kaminski, R., Krennwallner, T., Leone, N., Ricca, F., Schaub, T.: ASP-Core-2 Input Language Format (2013). https://www.mat.unical.it/aspcomp.2013/files/ASP-CORE-2.01c.pdf
- 24.Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Wanko, P.: Theory solving made easy with Clingo 5. In: ICLP TCs. OASICS, vol. 52, pp. 2:1–2:15. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2016). https://doi.org/10.4230/OASIcs.ICLP.2016.2