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
$ dpkg -l | grep -i minizinc
ii minizinc 2.8.3+dfsg1-1 amd64 constraint modelling language and tool chain
ii minizinc-ide 2.8.2-1+b1 amd64 MiniZinc constraint modelling language IDE
... which seems a bit older than the newest release, so maybe it's fixed already?
predicate p(array[$$E] of var bool: b) =
let {
var bool: zero = not exists(b);
} in
true;
enum SWITCHES = _(1..2);
array[SWITCHES] of var bool: v;
constraint p(v);
unreduced
include "link_set_to_booleans.mzn";
predicate link_var_to_booleans(var $$E: s, array[$$E] of var bool: b) =
link_set_to_booleans({s}, b);
% There doesn't seem to be a way to write this in terms of `link_var_to_booleans`.
predicate link_var_to_booleans_or_zero(var $$I: s, array[$$E] of var bool: b) =
let {
constraint assert(not(0 in index_set(b)), "");
constraint assert(({0}++index_set(b)) == lb(s)..ub(s), "");
var index_set(b): t;
var bool: zero = not exists(b);
} in
forall(i in index_set(b))( b[i] == (i == s) );
int: NUM_SWITCHES = 2;
enum SWITCHES = _(1..NUM_SWITCHES);
enum FRAMES = _(1..3);
array[FRAMES,SWITCHES] of var bool: SwitchDrivePowerEnable;
array[FRAMES] of var 0..NUM_SWITCHES: SwitchDrivePowerEnableIndex;
constraint forall (f in FRAMES)(
link_var_to_booleans_or_zero(SwitchDrivePowerEnableIndex[f], SwitchDrivePowerEnable[f,..])
);
Seems to be fixed in the latest release. I'm a bit surprised that you get an assertion failure, which suggests that this is a debug build of MiniZinc. Is this just the standard Debian package?
On debian sid:
... which seems a bit older than the newest release, so maybe it's fixed already?
unreduced
The text was updated successfully, but these errors were encountered: