【问题标题】:How can I hide CPLEX's output in AMPL?如何在 AMPL 中隐藏 CPLEX 的输出?
【发布时间】:2013-11-28 04:24:33
【问题描述】:

我想隐藏类似的消息

CPLEX 12.5.1.0:整数不可行。
319 MIP 单纯形 迭代次数
0 个分支定界节点
没有依据。

我不介意隐藏成功的消息,但我不想要不成功的消息。

我试过了

  • option cplex_options 'wantsol=8';
  • option cplex_options 'logfile=rubbishFile.txt';
  • option cplex_options 'tunedisplay=0';
  • option cplex_options 'incompat=0';

但不工作。

【问题讨论】:

  • 我相信该消息实际上来自 AMPL。求解器将一个字符串返回给 AMPL 环境,并且是 AMPL 环境打印它。我不知道(尚)如何禁用它...但它几乎解释了为什么您无法在 CPLEX 中将其关闭。

标签: logging output solver cplex ampl


【解决方案1】:

我怀疑这些行实际上是由 AMPL 环境打印的。根据您的需要,请在抑制 CPLEX 的所有输出后尝试这些:

  • option cplex_options 'outlev=0';(这应该使 CPLEX 安静)和

  • option solver_msg 0;

  • solve >rubbishFile.txt;

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2020-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多