MiniZinc: Towards a Standard CP Modelling Language
There is no standard modelling language for constraint programming (CP) problems. Most solvers have their own modelling language. This makes it difficult for modellers to experiment with different solvers for a problem.
In this paper we present MiniZinc, a simple but expressive CP modelling language which is suitable for modelling problems for a range of solvers and provides a reasonable compromise between many design possibilities. Equally importantly, we also propose a low-level solver-input language called FlatZinc, and a straightforward translation from MiniZinc to FlatZinc that preserves all solver-supported global constraints. This lets a solver writer support MiniZinc with a minimum of effort—they only need to provide a simple FlatZinc front-end to their solver, and then combine it with an existing MiniZinc-to-FlatZinc translator. Such a front-end may then serve as a stepping stone towards a full MiniZinc implementation that is more tailored to the particular solver.
A standard language for modelling CP problems will encourage experimentation with and comparisons between different solvers. Although MiniZinc is not perfect—no standard modelling language will be—we believe its simplicity, expressiveness, and ease of implementation make it a practical choice for a standard language.
KeywordsModelling Language Global Constraint Standard Language Array Access Element Constraint
Unable to display preview. Download preview PDF.
- 1.Schulte, C., Lagerkvist, M., Tack, G.: Gecode, http://www.gecode.org/
- 2.Apt, K., Wallace, M.: Constraint Logic Programming using Eclipse. Cambridge University Press, Cambridge (2006)Google Scholar
- 3.ILOG: ILOG Solver, http://www.ilog.com/products/solver/
- 4.Gent, I.P., Jefferson, C., Miguel, I.: Minion: A fast, scalable constraint solver. In: Proceedings of ECAI 2006, Riva del Garda, Italy (August 2006)Google Scholar
- 5.Laburthe, F.: CHOCO: implementing a CP kernel. In: Proceedings of TRICS 2000, Singapore, pp. 71–85 (2000)Google Scholar
- 6.Gent, I.P., Walsh, T.: CSPLIB: a benchmark library for constraints. In: Jaffar, J. (ed.) Principles and Practice of Constraint Programming – CP 1999. LNCS, vol. 1713, pp. 480–481. Springer, Heidelberg (1999)Google Scholar
- 10.Frisch, A.M., Grum, M., Jefferson, C., Hernandez, B.M., Miguel, I.: The design of ESSENCE: A constraint language for specifying combinatorial problems. In: Proceedings of IJCAI 2007, Hyderabad, India (January 2007)Google Scholar
- 11.Flener, P., Pearson, J., Ågren, M.: Introducing ESRA, a relational language for modelling combinatorial problems. In: Proceedings of LOPSTR 2003, Uppsala, Sweden, pp. 214–232 (August 2003)Google Scholar
- 12.Van Hentenryck, P.: The OPL Optimization Programming Language. MIT Press, Cambridge (1999)Google Scholar
- 13.Wallace, M.: Personal communication (January 2007)Google Scholar
- 14.van Dongen, M., et al.: Second international CSP solver competition, http://cpai.ucc.ie/06/Competition.html