<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Minizinc on Hillel Wayne</title>
    <link>https://www.hillelwayne.com/tags/minizinc/</link>
    <description>Recent content in Minizinc on Hillel Wayne</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 30 Sep 2018 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://www.hillelwayne.com/tags/minizinc/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Optimizing MiniZinc</title>
      <link>https://www.hillelwayne.com/post/minizinc-2/</link>
      <pubDate>Sun, 30 Sep 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/minizinc-2/</guid>
      <description>This is part two of a two-part article. Part one is here.
Last time we left off with this model:
include &amp;quot;globals.mzn&amp;quot;; enum DAYS; enum ROOMS; enum TIMES; enum talks; constraint assert(card(DAYS) * card(ROOMS) * card(TIMES) == card(talks), &amp;quot;Number of slots must match number of talks&amp;quot;); 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; constraint forall(p in people) ( score[p] = sum([if exists (r in ROOMS) (pref[p, sched[d, t, r]] = 4) then 1 else 0 endif | d in DAYS, t in TIMES] ) ); solve maximize sum(score); output [&amp;quot;SCORE: \(sum(score)) \n\n&amp;quot;] ++ [show(sched[d, t, r]) ++ &amp;quot; &amp;quot; ++ if r == card(ROOMS) then if t == card(TIMES) then &amp;quot;\n\n&amp;quot; else &amp;quot;\n&amp;quot; endif else &amp;quot;&amp;quot; endif | d in DAYS, t in TIMES, r in ROOMS];  We wanted to run it for two days, four time slots, and three rooms.</description>
    </item>
    
    <item>
      <title>Constraint Solving with Minizinc</title>
      <link>https://www.hillelwayne.com/post/minizinc/</link>
      <pubDate>Mon, 24 Sep 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/minizinc/</guid>
      <description>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&amp;rsquo;d write about it here. This is actually going to be a two part article. Right now we&amp;rsquo;re talking about what it is and how it works, and in the next post we&amp;rsquo;ll talk about optimizing models.
MiniZinc is a constraint solving language designed for modeling optimization problems.</description>
    </item>
    
  </channel>
</rss>