Skip to content

Commit

Permalink
Add colon to statistics output to conform with FlatZinc specification
Browse files Browse the repository at this point in the history
  • Loading branch information
guidotack committed Feb 13, 2019
1 parent 435cd86 commit 0f3b118
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ Date: 2019-02-14
This release fixes a number of minor issues and adds post events
to general tracers.

[ENTRY]
Module: flatzinc
What: bug
Rank: minor
[DESCRIPTION]
Add colon to statistics output to conform with FlatZinc specification.

[ENTRY]
Module: kernel
What: bug
Expand Down
20 changes: 10 additions & 10 deletions gecode/flatzinc/flatzinc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1904,20 +1904,20 @@ namespace Gecode { namespace FlatZinc {
double solveTime = (t_solve.stop() / 1000.0);
double initTime = totalTime - solveTime;
out << std::endl
<< "%%%mzn-stat initTime=" << initTime
<< "%%%mzn-stat: initTime=" << initTime
<< std::endl;
out << "%%%mzn-stat solveTime=" << solveTime
out << "%%%mzn-stat: solveTime=" << solveTime
<< std::endl;
out << "%%%mzn-stat solutions="
out << "%%%mzn-stat: solutions="
<< std::abs(noOfSolutions - findSol) << std::endl
<< "%%%mzn-stat variables="
<< "%%%mzn-stat: variables="
<< (intVarCount + boolVarCount + setVarCount) << std::endl
<< "%%%mzn-stat propagators=" << n_p << std::endl
<< "%%%mzn-stat propagations=" << sstat.propagate+stat.propagate << std::endl
<< "%%%mzn-stat nodes=" << stat.node << std::endl
<< "%%%mzn-stat failures=" << stat.fail << std::endl
<< "%%%mzn-stat restarts=" << stat.restart << std::endl
<< "%%%mzn-stat peakDepth=" << stat.depth << std::endl
<< "%%%mzn-stat: propagators=" << n_p << std::endl
<< "%%%mzn-stat: propagations=" << sstat.propagate+stat.propagate << std::endl
<< "%%%mzn-stat: nodes=" << stat.node << std::endl
<< "%%%mzn-stat: failures=" << stat.fail << std::endl
<< "%%%mzn-stat: restarts=" << stat.restart << std::endl
<< "%%%mzn-stat: peakDepth=" << stat.depth << std::endl
<< "%%%mzn-stat-end" << std::endl
<< std::endl;
}
Expand Down

0 comments on commit 0f3b118

Please sign in to comment.