Another question arised when posting this


        branch(*this, A, ..);
        branch( *this, &checkA );
        branch(*this, B, ..);
        wait( *this, A+B, &checkB );

I thought about replacing the wait with another branch call. But are branchers always called even if all variables are assigned?
Or is the given solution better than the "4-branch-option"?

And where is the true difference also for performance etc.? Guess the wait call does more checks on the domains?!?

Thanks,
Martin


Am 30.04.2013 09:58, schrieb Martin Mann:

Hi Christian,

guessed as much.. mhh.. think the additional bool var wont be a problem
but I will give the branch call with &checkA a first try, since it keeps
the CSP small without further variables etc.

Thanks for you help,
Martin


Am 29.04.2013 20:06, schrieb Christian Schulte:
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-boun...@gecode.org [mailto:users-boun...@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@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to