[gecode-users] Constraint posting side effects

Anton Dries anton.dries at cs.kuleuven.be
Thu May 15 15:03:21 CEST 2014


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



More information about the users mailing list