Modelling with Option Types in MiniZinc
Option types are a powerful abstraction that allows the concise modelling of combinatorial problems where some decisions are relevant only if other decisions are made. They have a wide variety of uses: for example in modelling optional tasks in scheduling, or exceptions to a usual rule. Option types represent objects which may or may not exist in the constraint problem being modelled, and can take an ordinary value or a special value ⊤ indicating they are absent. The key property of variables of option types is that if they take the value ⊤ then the constraints they appear in should act as if the variable was not in the original definition. In this paper, we explore the different ways that basic constraints can be extended to handle option types, and we show that extensions of global constraints to option types cover existing and common variants of these global constraints. We demonstrate how we have added option types to the constraint modelling language MiniZinc. Constraints over variables of option types can either be handled by transformation into regular variables without extending the requirements on underlying solvers, or they can be passed directly to solvers that support them natively.
KeywordsConstraint Programming Global Constraint Type Constructor Optional Variable Option Type
Unable to display preview. Download preview PDF.
- 3.Caballero, R., Stuckey, P.J., Tenoria-Fornes, A.: Finite type extensions in constraint programming. In: Schrijvers, T. (ed.) PPDP 2013, pp. 217–228. ACM Press (2013)Google Scholar
- 4.Castro, C., Manzano, S.: Variable and value ordering when solving balanced academic curriculum problems (2001), http://arxiv.org/abs/cs/0110007
- 10.Kleene, S.C.: Introduction to Metamathematics. North Holland (1952)Google Scholar
- 11.Laborie, P., Rogerie, J.: Reasoning with conditional time-intervals. In: Wilson, D.C., Lane, H.C. (eds.) FLAIRS 2008, pp. 555–560. AAAI Press (2008)Google Scholar
- 12.Laborie, P., Rogerie, J., Shaw, P., Vilím, P.: Reasoning with conditional time-intervals part II: An algebraical model for resources. In: Lane, H.C., Guesgen, H.W. (eds.) FLAIRS 2009, pp. 201–206. AAAI Press (2009)Google Scholar
- 13.Mittal, S., Falkenhainer, B.: Dynamic constraint satisfaction problems. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), pp. 25–32 (1990)Google Scholar
- 18.Łukasiewicz, J.: On three-valued logic. In: Borkowski, L. (ed.) Selected works by Jan Łukasiewicz, pp. 87–88. North Holland (1970)Google Scholar