[gecode-users] status of Space* in Branching::copy

Guido Tack tack at ps.uni-sb.de
Wed Sep 5 21:10:15 CEST 2007


Filip Konvička wrote:

> one thing that keeps me occupied: when a branching or propagator is
> cloned, the space instance it is passed is just partially constructed.
> This makes it difficult to make references to any data inside the  
> space
> (which is simply not there yet in e.g. Branching::copy). Is there no
> other way? I understand that the branching/propagator cloning takes
> place in Space copy ctor, but it would be far more convenient for  
> me to
> get a fully-constructed space in Branching::copy. (For example, I'm
> unable to construct some non-trivial references to space's data in my
> branching, as this initialization can't be moved out of the  
> constructor.)

That's just not possible in the current architecture.  If I  
understand you correctly, you need to make sure that some object is  
cloned before all actors (propagators & branchings) are. That way,  
you can be sure that that object is initialized when your  
Branching::copy is called.  I have something like that in a private  
branch, I'll dig a bit and let you know.

Cheers,
	Guido





More information about the gecode-users mailing list