Advertisement

Compiling Conditional Constraints

  • Peter J. Stuckey
  • Guido TackEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11802)

Abstract

Conditionals are a core concept in all programming languages. They are also a natural and powerful mechanism for expressing complex constraints in constraint modelling languages. The behaviour of conditionals is complicated by undefinedness. In this paper we show how to most effectively translate conditional constraints for underlying solvers. We show that the simple translation into implications can be improved, at least in terms of reasoning strength, for both constraint programming and mixed integer programming solvers. Unit testing shows that the new translations are more efficient, but the benefits are not so clear on full models where the interaction with other features such as learning is more complicated.

Keywords

Constraint modelling Conditional constraints MiniZinc 

Notes

Acknowledgements

We would like to thank the anonymous reviewers for their comments that helped improve this paper. This work was partly sponsored by the Australian Research Council grant DP180100151.

References

  1. 1.
    Bacchus, F., Walsh, T.: Propagating logical combinations of constraints. In: Kaelbling, L.P., Saffiotti, A. (eds.) IJCAI-05, Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, Edinburgh, Scotland, UK, 30 July - 5 August 2005, pp. 35–40 (2005)Google Scholar
  2. 2.
    Belov, G., Stuckey, P.J., Tack, G., Wallace, M.: Improved linearization of constraint programming models. In: Rueher, M. (ed.) CP 2016. LNCS, vol. 9892, pp. 49–65. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-44953-1_4CrossRefGoogle Scholar
  3. 3.
    Fourer, R., Kernighan, B.: AMPL: A Modeling Language for Mathematical Programming. Duxbury, Massachusetts (2002)Google Scholar
  4. 4.
    Frisch, A.M., Stuckey, P.J.: The proper treatment of undefinedness in constraint languages. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 367–382. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-04244-7_30CrossRefGoogle Scholar
  5. 5.
    Frisch, A.M., Harvey, W., Jefferson, C., Hernández, B.M., Miguel, I.: Essence: a constraint language for specifying combinatorial problems. Constraints 13(3), 268–306 (2008)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Hooker, J.N.: Integrated Methods for Optimization, 2nd edn. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-1-4614-1900-6CrossRefzbMATHGoogle Scholar
  7. 7.
    Jefferson, C., Moore, N.C.A., Nightingale, P., Petrie, K.E.: Implementing logical connectives in constraint programming. Artif. Intell. 174(16–17), 1407–1429 (2010)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Lhomme, O.: Arc-consistency filtering algorithms for logical combinations of constraints. In: Régin, J.-C., Rueher, M. (eds.) CPAIOR 2004. LNCS, vol. 3011, pp. 209–224. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-24664-0_15CrossRefzbMATHGoogle Scholar
  9. 9.
    McKinnon, K.I.M., Williams, H.P.: Constructing integer programming models by the predicate calculus. Ann. Oper. Res. 21(1), 227–245 (1989)CrossRefGoogle Scholar
  10. 10.
    Nethercote, N., Stuckey, P.J., Becket, R., Brand, S., Duck, G.J., Tack, G.: MiniZinc: towards a standard CP modelling language. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 529–543. Springer, Heidelberg (2007).  https://doi.org/10.1007/978-3-540-74970-7_38CrossRefGoogle Scholar
  11. 11.
    Nightingale, P.: Savile Row, a constraint modelling assistant (2018). http://savilerow.cs.st-andrews.ac.uk/
  12. 12.
    Van Hentenrcyk, P.: The OPL Optimization Programming Language. MIT Press, Cambridge (1999)Google Scholar
  13. 13.
    Van Hentenryck, P., Saraswat, V., Deville, Y.: Design, implementation, and evaluation of the constraint language cc(FD). In: Podelski, A. (ed.) TCS School 1994. LNCS, vol. 910, pp. 293–316. Springer, Heidelberg (1995).  https://doi.org/10.1007/3-540-59155-9_15CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Monash UniversityMelbourneAustralia
  2. 2.Data61, CSIROMelbourneAustralia

Personalised recommendations