" /> My Constraint Programming Blog: December 2008 Archives

Main | January 2009 »

December 29, 2008

Temporal reasoning model in MiniZinc

temporal_reasoning.mzn is a MiniZinc model of temporal reasoning. The example is from From Krzysztof R. Apt Principle of Constraint Programming, page 23ff:

The meeting ran non-stop the whole day.
Each person stayed at the meeting for a continous period of time.
The meeting began while Mr Jones was present and finished
while Ms White was present.
Ms_White arrived after the meeting has began.
In turn, Director Smith, was also present but he arrived after Jones had left.
Mr Brown talked to Ms White in presence of Smith.
Could possibly Jones and White have talked during this meeting?

The coding was inspired by the ECLiPSe (Prolog) model in Apt's presentation of chapter 2, ch2-sli.pdf.gz (gzipped PDF file), slides 15ff.


Also see My MiniZinc page for other MiniZinc models.

Welcome to my My Constraint Programming Blog

Welcome to my My Constraint Programming Blog!

This is an extension of my "normal" swedish blog hakank.blogg, and will contain news etc about constraint programming and related paradigms. It will also link to my newly written constraint programming models.

As stated (in swedish) in Constraint programming-nyheter samt nya MiniZinc-modeller (~ Constraint programming news and some new MiniZinc models) the target group for this kind of things (especially in swedish) is quite small. Hence this new blog, and in english.

Some links as introduction to what I have done so far:
* My Constraint Programming page

* My MiniZinc page
* My JaCoP page
* My Choco page

The latter three pages contains information about the systems and some models. I regard the MiniZinc page as my main constraint programming page, since MiniZinc is - as time of writing - my favorite system.

If you know swedish, you may also read the Constraint programming category at hakank.blogg.


News


And we start with some new MiniZinc models written this weekend.

Three Rosetta Code programs, just to test the limits of MiniZinc.

* 99_bottles_of_beer.mzn: 99 bottles of beer
* knapsack_problem.mzn: Knapsack problem
* pyramid_of_numbers.mzn: Pyramid of numbers

And then an operations research model.
* sportsScheduling.mzn Sport scheduling, using channeling for symmetry breaking. I didn't found out how to generate the channeling matrix automatically, so a Perl one-line is used instead (contained in the model). It was inspired by the Essence' model sportsScheduling.eprime from the Tailor (Minion) distribution.