Change propagator argument parameters between Branch and Bound solutions

14 views
Skip to first unread message

John

unread,
Jun 13, 2022, 12:03:11 PM6/13/22
to Gecode
Hello. I would like to use Branch and Bound with a custom propagator, and each time a solution is found, to access the solution and use it to change some argument parameters of the propagator, for the search of the next solution. The motivation is that as BAB restricts the cost of the solutions more and more, the propagator can also adapt using the latest solution and perform more optimized internal reasoning. What is the best way to achieve this in Gecode? 

Thank you.

Mikael Zayenz Lagerkvist

unread,
Jun 14, 2022, 1:00:16 AM6/14/22
to gec...@googlegroups.com
Hi John,

While Gecode has support for standard cost-variable optimization via
e.g. IntMinimizeSpace, the base construction is more general. When
search recommences after a solution has been found in BAB search, the
constrain method is called for the current Space with the last
solution found (https://www.gecode.org/doc-latest/reference/group__TaskModelScript.html#ga90b963e8bbaa9c832f97a5bc9598b455).
This can be used for "just" updating the bounds on an integer
variable, but also for other types of information. See also chapter
2.5 in MPG.

For storing and accessing the data, a shared object that is also
stored in the Space is probably a good idea, depending on the type of
information needed. See chapter 31.3 in MPG.

Cheers,
Mikael
> --
> You received this message because you are subscribed to the Google Groups "Gecode" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gecode+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gecode/2cd23ce6-681b-4771-997a-8c1974980113n%40googlegroups.com.



--
Mikael Zayenz Lagerkvist
Reply all
Reply to author
Forward
0 new messages