Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
270 stars 74 forks source link

Flatzinc float_times leads to unsatisfiable model #20

Open anton3s opened 5 years ago

anton3s commented 5 years ago

Gecode 6.0.1 (and possibly previous versions) indicate that the following FlatZinc model is unsatisfiable even though it clearly shouldn't be (V14=0.288, V29=0.0864, V30=0.01728).

float: C1 = 0.8;
float: C2 = 0.36;
float: C3 = 0.2;
float: C4 = 0.3;
var 0.0 .. 1.0: V14 :: output_var;
var 0.0 .. 1.0: V29 :: output_var;
var 0.0 .. 1.0: V30 :: output_var;
constraint float_times(C1, C2, V14);
constraint float_times(C4, V14, V29);
constraint float_times(C3, V29, V30);
solve satisfy;

faulty_model.txt

fkonvick commented 1 year ago

Gecode 6.3.0 distributed with MiniZinc 2.6.4 yields the proper solution. @guidotack I propose to close this issue.