We found the problem. It's in one of our custom constraint propagators. Adding the (inactive) constraint changes the variable selection order (we use INT_VAR_DEGREE_MAX) and that changes the behaviour of the propagator.
Anton On 15 May 2014, at 15:03, Anton Dries <anton.dr...@cs.kuleuven.be> wrote: > Hi all, > > We are working on a complex program based on Gecode (complex in a sense that > it generates models on-the-fly and post dynamic constraints during solving). > > We have run into a bug that we find hard to explain. > I have narrowed it down to posting a single constraint: > > void postConstraint(Space& home, IntVarArray iva, int i) { > BoolVar p(home,0,1); > rel(home, iva[i], IRT_EQ, 0, p); > } > > We get a different set of results depending on whether we call this function > or not. > My question is: what are the side effects of posting such a constraint? > Or, more specific: > - As I understand, it shouldn't change the set of results because the > variable 'p' is not constrained. Is this correct? > - Could posting this constraint change the order in which results are found? > > I'm sorry for the vagueness of this question, but the bug is very hard to > reproduce and I just want to rule out any misconceptions I might have about > what is supposed to happen here. > > > Best regards, > Anton > > -- > dr. ir. Anton Dries > Post-doctoral researcher > Dept. of Computer Science > DTAI/ML - KU Leuven Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users