You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This version included "globals.mzn" which is actually only needed in patrolV3.mzn. Removed for clarity.
Also
reformatted the constraints so that they look exactly as in patrolV1, no changes.
Shortened the long output command.
Interesting:
If the constraint about "not three night shifts" comes before the constraint "evening then not night" (in this change request), then a solution is found in 13s (on my machine).
If the constraint about "evening then not night" comes before the constraint "not three night shifts" (originally), then a solution is found in 33s (on my machine).
output ["Soldier "++show(s)++" on Day "++show(d)++" takes the "++show(roster[s,d])++" shift\n"++ifs==max(SOLDIER) thenshow(onEve[d])++"\n"else""endif | dinDAY, sinSOLDIER]++[show(sum(onEve))];
24
+
output ["Soldier \(s) on Day \(d) takes the \(roster[s,d]) shift\n"
0 commit comments