MiniZinc:无统计输出

MiniZinc: No statistics output

Minizinc documentation 声明可以通过在表单中​​添加特殊行来将诊断统计信息打印到输出流中

%%%mzn-stat: <name>=<value>

其中 <value> 可以是多种诊断之一。但是,添加行

%%%mzn-stat: n_failures=failures

不改变输出。使用 -s 标志输出一些但不是全部可用统计信息,但仅使用 gecode-- Chuffed 而是打印一个数字列表,我只能假设这些数字对应于那些变量.

遇到运行问题时如何更好地控制统计输出?他们是否非常依赖求解器的选择?

Are they [the statistics] very dependent on the choice of solver?

我认为这是显而易见的期望。

我不确定,但我认为您误解了文档。代码:

%%%mzn-stat: <name>=<value>

应该由 FlatZinc 求解器作为输出打印,而不是出现在 FlatZinc 输入模型中(显然会被忽略,因为它以注释前缀开头%).


documentation 说:

FlatZinc solvers can output statistics in a standard format so that it can be read by scripts, for example, in order to run experiments and automatically aggregate the results.

注意使用 can 而不是 must.

How can I better control the output of statistics while running problems?

  1. 参考每个工具的文档,如果有,请尝试使用该工具或联系作者。

  2. 如果您注意到大多数其余工具实际上都遵循给定格式,则可能会联系作者并建议采用给定格式。如果很多这种类型的请求开始排队,迟早会有不同。