Closed LebedevRI closed 2 months ago
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?
Yes, i'm also surprised that a standard debian package is built in non-Release build mode.
On debian sid:
... which seems a bit older than the newest release, so maybe it's fixed already?
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,..]) ); ```