[gecode-users] How to wait for a variable

Max Ostrowski ChaosAngel at gmx.de
Thu Jul 28 16:11:49 CEST 2011


Hi, i want to use the wait function to get notified what a certain variable has been assigned.
And i want to do this for some variables, to finally to something with them.
so i want to have

wait(*this,a,&foo);
wait(*this,b,&foo);

And in my function foo i want to add the variables into a list or something like this.

void foo(Space&, Var a)
{
    do something with a

}

but as foo does not get any information about which variable has been assigned i can not use it.
Is there another method to find out/get notified when a variable has been assigned, without going through the list of variables and testing each of it.

If the expected function would like to have a boost function pointer this would be great.
Then you could bind additional information to figure out which variable.
This would also be advantageous if you have several Spaces running in parallel, there is no easy way to figure out which one triggered the callback.

Best,
Max
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



More information about the users mailing list