[gecode-users] Writing a Branching

Malcolm Ryan malcolmr at cse.unsw.edu.au
Thu Nov 22 08:32:22 CET 2007


On 22/11/2007, at 5:13 PM, Mikael Zayenz Lagerkvist wrote:

> No, the standard branching class is not exposed in Java. On the other
> hand, I'm not sure what you aim to do. You can have more than one
> branching in a Space, so you can have a standard branching
> instantiating all variables after your custom branching is finished.

I am dealing with collections of variables which represent a variable- 
length plan. So there is a "length" variable and a collection of  
"element" variables. The element variables beyond the length value  
have no significance. I do not wish to waste time choosing bindings  
for them. So essentially my Branching just looks at elements 0  
through length.min() - 1.

Having determined this set, I then want to choose one variable and  
assign it a value. I would like to experiment with a range of ways of  
choosing this variable and value, including all the standard ways. In  
would be easier if I could use an existing implementation to do this.

> Note that we currently do not support subclassing BranchingDesc in
> Java, instead we supply a single one called JavaBranchingDesc which
> has two integer memebers (accessed through pos() and val()). This will
> most probably be changed for Gecode/J 2.0.0.

I hope so. My problem is more naturally structured as a collection of  
lists. Representing a variable choice as a single integer involves a  
rather arbitrary encoding.

What is the timeframe for Gecode/J 2.0.0?

> Note that there is a bug in Gecode 1.3.1 that forces you to post all
> branchings in the root-space.

I don't understand. What would the alternative be? Can you have  
nested spaces? How?

Malcolm

--
Many clever men like you have trusted to civilisation.
Many clever Babylonians, many clever Egyptians,
Many clever men at the end of Rome.
                               - G.K.Chesterton, The Napoleon of  
Notting Hill







More information about the gecode-users mailing list