[gecode-users] Implementing No-goods
Kish Shen
kisshen at cisco.com
Fri Sep 13 06:11:58 CEST 2013
Hi Christian,
Thanks for your reply!
On 12/09/2013 09:22, Christian Schulte wrote:
> Please re-read MPG on how restart-based search works: the no-goods are
> posted in the master space (that's why the master() function does it) and
> are hence re-used for each restart (as it starts from the master).
>
I was thinking about what happens when there is more than one search,
i.e. after a search -- search1 -- in a space (using a subset of
variables of the space), another search (with a different subset of
variables) -- search2 -- is done on the space. Each of these search will
use their own search engines, and can use different search engines, with
different options.
I understand that the no-goods are posted in the master space, but I
assume the master space in search1 is not the same as search2. My
question was if the no-goods gathered in search1 will be posted in
search2 (assuming both are doing a restart search with no-goods).
As far as I can see, there is no need to post these no-goods from
search1, because a different subset of variables are used in search2,
and in addition I assume the no-goods from search1 will be represented
as constraints in the master space of search2.
> If you do nothing extra (such as randomization or BAB where the constrain()
> function is called on the master etc) restarting after having found a
> solution will produce the same solution again.
>
I am thinking here of what to do with next() when using a restart DFS
search engine in the context of the ECLiPSe interface.
For Gecode, I can understand that you want to leave any extra thing to
be done to the user.
For the interface, the user is programming in ECLiPSe, and anything
extra must be done by the interface. After obtaining a solution, I want
a call to next() to return a different answer (if this exist), and
potentially to be able to return all the solutions, as in a non-restart
DFS. The only way I can think of doing this is to post the previous
solution as a no-good, and this has to be done regardless of what
nogoods_limit is. Is this possible, and/or is there some other way of
ensuring that the previous solution will not be returned?
Cheers,
Kish
More information about the users
mailing list