Nurse Scheduling via Answer Set Programming

  • Carmine DodaroEmail author
  • Marco Maratea
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10377)


The Nurse Scheduling problem (NSP) is a combinatorial problem that consists of assigning nurses to shifts according to given practical constraints. In previous years, several approaches have been proposed to solve different variants of the NSP. In this paper, an ASP encoding for one of these variants is presented, whose requirements have been provided by an Italian hospital. We also design a second encoding for the computation of “optimal” schedules. Finally, an experimental analysis has been conducted on real data provided by the Italian hospital using both encodings. Results are very positive: the state-of-the-art ASP system clingo is able to compute one year schedules in few minutes, and it scales well even when more than one hundred nurses are considered.


Answer Set Programming Scheduling Nurse Scheduling Problem 



We would like to thank Nextage srl for providing partial funding for this work. The funding has been provided in the framework of a research grant by the Liguria POR-FESR 2014–2020 programme.


  1. 1.
    Azaiez, M.N., Sharif, S.S.A.: A 0–1 goal programming model for nurse scheduling. Comput. OR 32, 491–507 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Bard, J.F., Purnomo, H.W.: Preference scheduling for nurses using column generation. Eur. J. Oper. Res. 164(2), 510–534 (2005)CrossRefzbMATHGoogle Scholar
  3. 3.
    Aickelin, U., Dowsland, K.A.: An indirect genetic algorithm for a nurse-scheduling problem. Comput. OR 31(5), 761–778 (2004)CrossRefzbMATHGoogle Scholar
  4. 4.
    Topaloglu, S., Selim, H.: Nurse scheduling using fuzzy modeling approach. Fuzzy Sets Syst. 161(11), 1543–1563 (2010). MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Gutjahr, W.J., Rauner, M.S.: An ACO algorithm for a dynamic regional nurse-scheduling problem in Austria. Comput. OR 34(3), 642–666 (2007)CrossRefzbMATHGoogle Scholar
  6. 6.
    Millar, H.H., Kiragu, M.: Cyclic and non-cyclic scheduling of 12 h shift nurses by network programming. Eur. J. Oper. Res. 104(3), 582–592 (1998)CrossRefzbMATHGoogle Scholar
  7. 7.
    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)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Cheang, B., Li, H., Lim, A., Rodrigues, B.: Nurse rostering problems - a bibliographic survey. Eur. J. Oper. Res. 151(3), 447–460 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    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).
  10. 10.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9(3/4), 365–386 (1991)CrossRefzbMATHGoogle Scholar
  11. 11.
    Alviano, M., Dodaro, C.: Anytime answer set optimization via unsatisfiable core shrinking. TPLP 16(5–6), 533–551 (2016)MathSciNetGoogle Scholar
  12. 12.
    Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T., Schneider, M.T.: Potassco: the potsdam answer set solving collection. AI Commun. 24(2), 107–124 (2011)MathSciNetzbMATHGoogle Scholar
  13. 13.
    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). doi: 10.1007/3-540-45402-0_39 CrossRefGoogle Scholar
  14. 14.
    Erdem, E., Öztok, U.: Generating explanations for biomedical queries. TPLP 15(1), 35–78 (2015)MathSciNetGoogle Scholar
  15. 15.
    Koponen, L., Oikarinen, E., Janhunen, T., Säilä, L.: Optimizing phylogenetic supertrees using answer set programming. TPLP 15(4–5), 604–619 (2015)MathSciNetGoogle Scholar
  16. 16.
    Marileo, M.C., Bertossi, L.E.: The consistency extractor system: Answer set programs for consistent query answering in databases. Data Knowl. Eng. 69(6), 545–572 (2010)CrossRefGoogle Scholar
  17. 17.
    Abseher, M., Gebser, M., Musliu, N., Schaub, T., Woltran, S.: Shift design with answer set programming. Fundam. Inform. 147(1), 1–25 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Dodaro, C., Gasteiger, P., Leone, N., Musitsch, B., Ricca, F., Schekotihin, K.: Combining answer set programming and domain heuristics for solving hard industrial problems (application paper). TPLP 16(5–6), 653–669 (2016)MathSciNetGoogle Scholar
  19. 19.
    Dodaro, C., Leone, N., Nardi, B., Ricca, F.: Allotment problem in travel industry: a solution based on ASP. In: Cate, B., Mileo, A. (eds.) RR 2015. LNCS, vol. 9209, pp. 77–92. Springer, Cham (2015). doi: 10.1007/978-3-319-22002-4_7 CrossRefGoogle Scholar
  20. 20.
    Alviano, M., Dodaro, C., Leone, N., Ricca, F.: Advances in WASP. In: Calimeri, F., Ianni, G., Truszczynski, M. (eds.) LPNMR 2015. LNCS (LNAI), vol. 9345, pp. 40–54. Springer, Cham (2015). doi: 10.1007/978-3-319-23264-5_5 CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.DIBRISUniversity of GenovaGenoaItaly

Personalised recommendations