使用AMPL的求解器CPLEX的静默模式 [英] Silent mode for solver CPLEX using AMPL

查看:107
本文介绍了使用AMPL的求解器CPLEX的静默模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何静默模式来使用CPLEX作为求解器来运行AMPL脚本.

Is there any silent mode to run a AMPL script using CPLEX as a solver.

我确定该选项

option solver_msg 0;

将使其静音,但仍将CPLEX版本号输出到控制台.

will make it silent but it still output CPLEX version number to the console.

我该如何使其完全保持沉默.因为我认为控制台输出会极大地花费运行时间.

How can I make it totally silence. Because I think the console output will dramatically cost running time.

推荐答案

您可以通过将所有输出重定向到/dev/null (或Windows上的 NUL )来抑制所有输出除了将 solver_msg 设置为0:

You can suppress all output by redirecting it to /dev/null (or NUL on Windows) in addition to setting solver_msg to 0:

option solver_msg 0;
solve > /dev/null;

也就是说,求解器的大部分运行时间通常都花费在优化算法上,而不是输出上.

That said, most of the solver running time is usually spent in optimization algorithms, not output.

这篇关于使用AMPL的求解器CPLEX的静默模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆