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
I have a large model, but managed to find the following minimal example which shows my issue:
var int: a;
var int: b;
constraint a mod b != 0;
solve satisfy;
I do not want to give bounds to variables a and b because in my full model, I don't know what those bounds should be.
Full error message is:
Error: Unknown character in line no. 6
Error: undefined identifier infinity in line no. 6
Error: syntax error, unexpected FZ_DOTDOT, expecting ')' or ',' in line no. 6
=====ERROR=====
var int: a:: output_var;
var int: b:: output_var;
var int: X_INTRODUCED_0_ ::var_is_introduced ;
constraint int_ne(b,0);
constraint int_mod(a,b,X_INTRODUCED_0_);
constraint set_in(X_INTRODUCED_0_,-infinity..-1 union {} union 1..infinity);
solve satisfy;
Activity
a1880 commentedon Mar 3, 2021
Looks like a bug.
A workaround for modulo/divisibility:
constraint (b * (a div b)) == a;or
constraint (a - b*(a div b)) == 0;Compile infinite domains with holes into constraints. Fixes #457.