[gecode-users] Executing code between branchers - the right way to go?
Christian Schulte
cschulte at kth.se
Wed Feb 13 17:03:56 CET 2013
Hi Conrad,
I am not so sure what you are really up to here but I think what you are
trying to do seems to be too advanced for the pre-defined branchers as
described in Chapter 7.
Did you have a look at Part B in MPG? There you have considerably more
freedom, in particular if you want the brancher to remember certain
aspects.
Sorry, I know this is not all too helpful.
Best
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 Conrad.Drescher at cs.ox.ac.uk
Sent: Tuesday, February 12, 2013 10:25 AM
To: users at gecode.org
Subject: [gecode-users] Executing code between branchers - the right way to
go?
Hello there,
I'd greatly appreciate feedback on what the Gecode-way of attacking the
following two issues is:
1) My model features set variables. I have a custom brancher that uses a
heuristics to include certain elements in pairs of set variables sets[i] and
sets[i+1]. Before moving on to the next pair of variables I'd like to fix
sets[i] and sets[i+1] to the elements in the glb, e.g. by posting an
additional constraint that the cardinality of sets[i] is sets[i].cardMin().
>From MPG 7.1.7 "Executing code between branchers" I cannot figure out how to
pass the index i to the more()-function, so some help on that would be
great. Or should I go for an assignment-brancher for set variables? Yet
something else?
2) Once I have assigned sets[i] and sets[i+1] I'd like to store the pair as
a no-good combination not to be tried again for any consecutive pair of set
variables. Actually it's a bit more complicated, as for the nogood I also
need to consider certain values not in sets[i] and sets[i+1]. I only want to
check for no-goods once I have assigned another pair of set variables. Would
you recommend going for a hash of no-goods? And could this be maintained in
a way similar to what is sketched in MPG 7.1.7?
Alternatively, I could post a constraint that excludes the no-good and use a
custom propagator to ensure this is only checked once the respective
variables are assigned.
Thanks for reading; any input is much appreciated!
Cheers,
Conrad
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list