On 30 Sep 2011, at 18:12, Nacho Castiñeiras wrote: > Hi, > is it possible to redirect the output of the MinimizeScript "print" function > to > an external file? > > I have looked to the examples of the Gecode distribution and the print > function > is always implicitly called by the MinimizeScript::run method.
It's possible, but you will have to run the search yourself instead of through the MinimizeScript::run method. See the "send most money" example from Sect. 3.2 of MPG: http://www.gecode.org/doc-latest/MPG/send-most-money-with-cost.cpp Then you can call the print function yourself for each solution (or only for the last one if that's what you need), and pass a std::ostream that writes to a file. 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
