[gecode-users] Output control for the Script class
cschulte at kth.se
Tue May 22 09:32:55 CEST 2012
If you send me the patches, I can have a look. I am not that sure because
there is always the option to not use the driver but use a search engine
Christian Schulte, <http://www.ict.kth.se/~cschulte/>
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Andrea Pretto
Sent: Monday, May 21, 2012 4:31 PM
To: users at gecode.org
Subject: [gecode-users] Output control for the Script class
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users