Kish Shen wrote:
> I am trying to use a Stop object with my existing search engine code, but the
> program seem to crash when I try to run the code.
[...]
> Is this because the Stop Object was destroyed when I returned from the
> procedure that created it? I thought everything is copied in Gecode?
Yes. Only the data structures that live in spaces are copied, everything else
is just an ordinary C++ data structure. You'll have to create the Stop object
on the heap using new and keep track of it yourself.
> The Stop object is passed via the stop member of search options. Does this
> mean that only one stop object can be passed to the search engine?
> Is it possible to set more than one limit (e.g. for both node and time)?
Yes, you'll have to create a stop object that encapsulates several other stop
objects. For an example, see the Cutoff class in gecode/driver/script.hh.
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users