[gecode-users] Stopping Gecode Engine gracefully

Guido Tack tack at gecode.org
Thu Apr 8 22:19:23 CEST 2010


Hi,

you can implement your own Stop object by inheriting from Search::Stop.  If you add it to the options of your search engine, the engine periodically calls its stop function.  Simply return true there to stop the search.

Gecode will always use all the heap it can get if it needs it, the limits in memory-config.hpp only affect in what chunks heap memory is allocated.  If you have memory problems, you should try different recomputation parameters (parameters c_d and a_d in the search options).

Cheers,
	Guido

Maity, Ashis K wrote:

> Hello,
> 
> How do I stop the Gecode engine gracefully at any time (driven by user's request) when I start it the following way? I know it can be stopped by setting time limit, node limit etc. But I want to stop engine at any time and collect the result until that point. Do I overload the run method to get access to Engine or is there another way?
> 
> 				MinimizeScript::run<Scheduler, BAB, SchedulerOptions>(opt); (Scheduler inherits MinimizeScript)
> 
> Also, I am running into memory trouble as heap memory is getting exhausted. Would increasing the heap size through memory-config.hpp help?
> 
> Thanks so much,
> 
> Ashis
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/







More information about the users mailing list