[gecode-users] view selection combinator

Martin Mann mmann at informatik.uni-freiburg.de
Thu Nov 23 00:35:12 CET 2006


Hello,

I had the idea to write a hierarchical combinator VC (will be a 
viewselector itself) for two ViewSelectors V1 and V2, that does the 
following: for a view v it first asks V1 about v. if V1 says "better" v 
is accepted (VC returns VSS_SELECT). if V1 says "equal" VC asks V2 about 
v. if V2 says "better" v is accepted by VB else rejected or "equal" 
returned.

The application is a free combination of existing view selections for 
test reasons and to find the best view selection for my problem. I think 
this is something other may be interested in too. For instance you ve 
got a fast V1 for a first ordering and a more expensive V2 for a 
detailed selection. a combinator would be great, because otherwise you 
ve got to apply the expensive V2 always to all views.

Now comes my problem: the possible return values of ViewSelectors:

enum  	Gecode::ViewSelStatus {
    Gecode::VSS_NONE,   // not better
    Gecode::VSS_SELECT, // is better
    Gecode::VSS_COMMIT  // is the best ever
}

i ve got no possibility to get or return the information "is as good as 
last best seen". as far as i can see it wont be a big deal to introduce 
this into the enum and the existing standard viewselectors if you think 
that it is worthy. e.g. as second a VSS_ALIKE. by that you wont change 
your interface and no changes in the branchings are neccessary.
I can send you the template code of the combinator when its done if you 
like the idea.. ;)

maybe the "alike" information can be usefull somewhere else too. but 
right now i ve got no further good idea.

thanks for interest,

martin




More information about the gecode-users mailing list