Silent mode for solver CPLEX using AMPL

白昼怎懂夜的黑 提交于 2021-01-28 06:30:21

问题


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

I am sure the option

option solver_msg 0;

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.


回答1:


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.



来源:https://stackoverflow.com/questions/28973332/silent-mode-for-solver-cplex-using-ampl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!