Re: [gecode-users] Why are my variables not constrained

2008-10-06 Thread Guido Tack
Denys Duchier wrote: > Guido Tack <[EMAIL PROTECTED]> writes: > >> Otherwise, the post statement returns a BoolVar that is constrained >> to >> the truth value of the equivalence. Unfortunately, gcc doesn't warn >> about the ignored return value (I don't know about Microsoft cl)! > > you can as

Re: [gecode-users] Why are my variables not constrained

2008-10-06 Thread Denys Duchier
Guido Tack <[EMAIL PROTECTED]> writes: > Otherwise, the post statement returns a BoolVar that is constrained to > the truth value of the equivalence. Unfortunately, gcc doesn't warn > about the ignored return value (I don't know about Microsoft cl)! you can ask gcc to warn on ignored return

Re: [gecode-users] Why are my variables not constrained

2008-10-05 Thread Max
Thank you very much, it now works as intended. Great ! I hope i will get along with the documentation, it is hard to find things like tt or eqv or the function how to branch manually or something. I will keep annoying you if i have further questions. Thank you all for the help. Best regards. Max

Re: [gecode-users] Why are my variables not constrained

2008-10-05 Thread Guido Tack
Max wrote: > Furthermore the constraint is never applied. > > x(this,3,0,1500) > > > post(this, eqv((x[0] > x[1] + 30), y)); Sorry, I just realized a problem with this statement... It should rather read post(this, tt( eqv((x[0] > x[1] + 30), y)) ); Otherwise, the post statement returns a Bool

Re: [gecode-users] Why are my variables not constrained

2008-10-04 Thread Guido Tack
Hi! This problem is going to be in the FAQ we're preparing... ;-) When you post a constraint, only the immediate consequences are sometimes propagated to the variables. You have to start constraint propagation by asking the space for its status (using the status() function). And of course

Re: [gecode-users] Why are my variables not constrained

2008-10-04 Thread Max
Furthermore the constraint is never applied. x(this,3,0,1500) post(this, eqv((x[0] > x[1] + 30), y)); post(this, x[2] - x[0] == 45); post(this, x[0] == 2); // 2 cant be greater than x[1]+30 post(this, y == 1); // the constrained must hold branch(this, x, INT_VAR_SIZE_MIN, INT_VAL_SPLIT_MA