[gecode-users] Custom BranchingDesc

Guido Tack tack at ps.uni-sb.de
Tue Jan 20 09:46:46 CET 2009


Malcolm Ryan wrote:

> What is the procedure for creating a custom BranchingDesc? There don't
> appear to be any examples which do this.

The only requirement is to inherit from BranchingDesc.  Then you put  
everything in the object that you need for the commit operation.

> What is the role of the
> size() method?

It's used for keeping track of the overall allocated memory (in engine- 
ctrl.hpp:70).  As BranchingDescs are allocated on the heap (in  
contrast to the space), their memory has to be counted extra.

> If my Branching::description() allocates a new
> BranchingDesc, when/where should it be deleted?

It's owned by whoever requests the description.  Usually,  
description() is called by a search engine, so the search engines own  
and delete the BranchingDescs (e.g. reco-stack.hpp:82).

Cheers,
	Guido





More information about the gecode-users mailing list