This is part two of a two-part article. Part one is here. Last time we left off with this model: include "globals.mzn"; enum DAYS; enum ROOMS; enum TIMES; enum talks; constraint assert(card(DAYS) * card(ROOMS) * card(TIMES) == card(talks), "Number of slots must match number of talks"); enum people; array[people, talks] of 0..4: pref; array[DAYS, TIMES, ROOMS] of var talks: sched; constraint alldifferent (d in DAYS, t in TIMES, r in ROOMS) (sched[d, t, r]); array[people] of var int: score; con...| Hillel Wayne
This is part one of a two-part article. Part two is here. A while back somebody told me to check out MiniZinc. Eventually I did and really enjoyed it, so figured I’d write about it here. This is actually going to be a two part article. Right now we’re talking about what it is and how it works, and in the next post we’ll talk about optimizing models. MiniZinc is a constraint solving language designed for modeling optimization problems.| Hillel Wayne