[gecode-users] order of "wait" statements maintained?

Christian Schulte cschulte at kth.se
Mon Apr 29 20:06:02 CEST 2013


Hi Martin,

There is no order among several waits. You could either use branch with a
function as you suggested (calling status is in fact fine) or you could
encode the order yourself. Make checkA and checkB assign a variable and then
you wait on these variables as well. Would that do?

Cheers
Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> Behalf Of Martin Mann
> Sent: Monday, April 29, 2013 5:39 PM
> To: gecode user list
> Subject: [gecode-users] order of "wait" statements maintained?
> 
> 
> Hi everybody,
> 
> for some processing, I post something like this in my Space constructor
> 
>    wait( *this,   A, &checkA);
>    wait( *this,   B, &checkB);
>    wait( *this, A+B, &printAB);
> 
>    branch( *this, A, .. );
>    branch( *this, B, .. );
> 
> to do some dedicated successive checks on assignments of A, B and both A
and
> B.
> 
> Since my last printAB depends on the outcome of both checkA and checkB
(both
> might make the CSP fail) I need to know if the processing order of the
wait
> statements the same as their posting order within the constructor... :/
> 
> Or is there a better solution to that as posting an according branching
like
> 
>    branch( *this, &checkA );
> 
> where I first have to trigger constraint propagation in order to ensure
> assignment... !??!
> 
> Thanks for your help,
> Martin
> 
> 
> --
> Dr. Martin Mann, Postdoc
> Bioinformatics - Inst. of Computer Science Albert-Ludwigs-University
Freiburg
> Tel: ++49-761-203-8254
> Fax: ++49-761-203-7462
> http://www.bioinf.uni-freiburg.de/~mmann/
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list