If you need information on how the solution process goes, it might be best
to not use the ::run method but to invoke a search engine manually. Please
see Chapter 2 in Modeling and Programming with Gecode how to do that.

 

Best

Christian

 

--

Christian Schulte, KTH, web.it.kth.se/~cschulte/

 

From: [email protected] [mailto:[email protected]] On Behalf
Of hamideh izadyar
Sent: Thursday, July 28, 2011 1:09 PM
To: [email protected]
Subject: [gecode-users] How to get the Status of the Solver

 

Hi,
I have written my code like this:

  SizeOptions opt("Scheduling");
  opt.size(5);
  opt.solutions(0);

  opt.search(Scheduling::SEARCH_BAB);
  opt.search(Scheduling::SEARCH_DFS, "dfs");
  opt.search(Scheduling::SEARCH_BAB, "bab");
  opt.search(Scheduling::SEARCH_RESTART, "restart");
  opt.parse(argc,argv);

  if (opt.search() == Scheduling::SEARCH_DFS) {
    Script::run<Scheduling, DFS, SizeOptions>(opt);
  } else if (opt.search() == Scheduling::SEARCH_RESTART) {
    MinimizeScript::run<Scheduling, Restart, SizeOptions>(opt);
  } else {
    MinimizeScript::run<Scheduling, BAB, SizeOptions>(opt);

I want to know how can I understand wether the solver founds a solution or
it fails?
Thanks
-- 
-------------------------------------------------------------------------

Hamideh Izadyar
Graduate Student
Computer Engineering Dep.
Sharif University of Technology
http://ce.sharif.edu/~izadyar <http://ce.sharif.edu/%7Eizadyar>  

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to