问题
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