[gecode-users] Question about branching

Christian Schulte cschulte at kth.se
Tue Feb 10 14:52:37 CET 2009


Hi,

no there is no way to find the x, in particular as some branchings might not
have an array of variables.

There is not even the notion of a current branching (there are two current
branchings: one that is used for status() and the other that is used for
commit() during recomputation).

Branchings are designed to just implement a particular interface that's it.

Maybe you tell us what you want to do?

Then, reflection will be gone (see my next mail as to why) and there is
currently no way to get the actors (unless you iterate over the list of
actors, check how the function propagators() counting the number of
propagators is implemented).

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 Vincent Barichard
Sent: Monday, February 09, 2009 2:11 PM
To: users at gecode.org
Subject: [gecode-users] Question about branching

Hi,

I try to make a new search engine. In the member function "explore(void)" of

my engine I need to access to the "ViewArray x" of the current branching of 
the space.
I have two problems :
- First, how to get the current branching of a space? With reflexion I can
only 
get a SpecActor on a branching, but not the branching object itself.
The only way I found was to make some fields of the "Space" class being
public.
Furthermore I have no clue about the base class of the actor, so I must
assume 
that all branchings are instances of the "ViewValBranching" class.
- How to get the "ViewArray x" of a ViewValBranching ? As for previous
point, 
I have to make the field being public.

I have another question. I looked at the SVN trunk and I saw that reflexion
has 
been removed and won't be present in Gecode 3.0. Is there a way to get
(print) 
actors of a space? It is very usefull for debugging code and seing what 
happened.

Thank you very much for your help.

Cheers,
Vincent

_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list