Hi,

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
message.

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.

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

Reply via email to