You access the statistics before you actually start to search. That's wrong: the statistics returned is always wrt the current state of the search. So, what you want to do is to access stat() after you do the search.
Cheers Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ > -----Original Message----- > From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On > Behalf Of kel...@cretin.net > Sent: Tuesday, July 22, 2014 8:31 PM > To: users@gecode.org > Subject: Re: [gecode-users] node count > > > I don't really see what you are doing. > > > My code is basically: > > Search::Options so; > so.stop = CombinedStop::create(0, 0, 120000, true); > CombinedStop::installCtrlHandler(true); > DFS<BenchmarkBase> e(s, so); > Search::Statistics stat = e.statistics(); > BenchmarkBase* ex = e.next(); > while(ex != NULL) { > ex->print(out); > delete ex; > ex = e.next(); > } > std::cerr > << "\tpropagations: " << stat.propagate << std::endl > << "\tnodes: " << stat.node << std::endl > << "\tfailures: " << stat.fail << std::endl > << "\trestarts: " << stat.restart << std::endl > << "\tno-goods: " << stat.nogood << std::endl > << "\tpeak depth: " << stat.depth << std::endl > << std::endl; > > > In which my benchmarking model (a class derived from BenchmarkBase) uses my > custom brancher and value selection. When the val() method of my value > selection class is called, I am printing out some debugging information, so I can > see that it is making a value choice. > > I would have expected that `stat.node` would be increased each time the value > selection function is called, but it always returns `0`. > > Is that clearer? > > > But anyway: have you tried Gist to see what search does? > > I haven't tried gist as I'm running my code on a server without X installed. > I guess that's the next step if I can't figure out what's going on. > > Cheers, > Kellen > > _______________________________________________ > Gecode users mailing list > users@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users