Closed
Description
Yet another one :-)
Compiling the following model results in a FlatZinc model where the "domain" annotation is lost (see below).
var int: x;
var int: y;
var int: z;
constraint (x + y + 2 = z)::domain;
constraint z = 4;
solve satisfy;
Note also that in the resulting FlatZinc, shown below, "z" is annotated with "is_defined_var" while it does not appear any more in the constraint:
var int: x:: output_var;
var int: y:: output_var;
var 4..4: z:: output_var:: is_defined_var;
constraint int_lin_eq([1,1],[y,x],2);
solve satisfy;
When removing the constraint fixing "z", everything is fine: the "domain" annotation is back and "z" appears in the constraint defining it:
array [1..3] of int: X_INTRODUCED_2 = [1,1,-1];
var int: x:: output_var;
var int: y:: output_var;
var int: z:: output_var:: is_defined_var;
constraint int_lin_eq(X_INTRODUCED_2,[y,x,z],-2):: domain:: defines_var(z);
solve satisfy;
Metadata
Metadata
Assignees
Labels
No labels