[gecode-users] Output control for the Script class
a.pretto at miriade.it
Mon May 21 16:31:05 CEST 2012
I'am using Gecode for a project at work (I'am using Script class) and I
needed to separate Gecode message (timing, statistics etc..) from
solutions. That's because solutions "goes out" in a certain format that
another process have to decode, so I cannot mix solutions with Gecode
The simplest solution I found was to change cout to clog everywhere in
ScriptBase::run, everywhere BUT when calling ex->print() which print the
solution. This is enough to have Gecode messages to standard log and
solutions to standard output, and now I can redirect them separately.
I would like to have this kind behavior on future releases of
Gecode. Flatzinc has already some options that do something like that (-s
and -o, I think), I want to implement something similar and send some
patches if you agree (it's pretty simple from what I see).
Tell me what you think about it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users