<p>Object-oriented programming is the dominant paradigm for general-purpose programming languages. While several attempts have been made to introduce object models into constraint modelling languages, these often have restrictions in terms of their expressivity, are not available in mainstream modelling languages, or are incompatible with modern solving technology. To address these challenges, this paper identifies essential requirements for expressive and elegant object-oriented constraint modelling. We propose an object model that supports decision variables of object type, objects referring to other objects, and, crucially, variable sets of objects, whose cardinality is decided by the solver. The object model is presented as an extension of the MiniZinc modelling language that can be translated into standard MiniZinc. A number of examples and a case study demonstrate the viability of the approach.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

MiniZinc with objects

  • Guido Tack,
  • Richard Comploi-Taupe,
  • Andreas Falkner,
  • Gottfried Schenner

摘要

Object-oriented programming is the dominant paradigm for general-purpose programming languages. While several attempts have been made to introduce object models into constraint modelling languages, these often have restrictions in terms of their expressivity, are not available in mainstream modelling languages, or are incompatible with modern solving technology. To address these challenges, this paper identifies essential requirements for expressive and elegant object-oriented constraint modelling. We propose an object model that supports decision variables of object type, objects referring to other objects, and, crucially, variable sets of objects, whose cardinality is decided by the solver. The object model is presented as an extension of the MiniZinc modelling language that can be translated into standard MiniZinc. A number of examples and a case study demonstrate the viability of the approach.