Search code examples
cplexampl

Silent mode for solver CPLEX using AMPL


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.


Solution

  • 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.