対応するパラメータは設定されていますが、CEPLEXが端末にロットを印刷します
質問
CPPでCPPを使用しています。 Googlingの後、CEPLECTがターミナルへの印刷を避けるために設定する必要があるパラメータを見つけました。
IloCplex cplex(model);
std::ofstream logfile("cplex.log");
cplex.setOut(logfile);
cplex.setWarning(logfile);
cplex.setError(logfile);
cplex.setParam(IloCplex::MIPInterval, 1000);//Controls the frequency of node logging when MIPDISPLAY is set higher than 1.
cplex.setParam(IloCplex::MIPDisplay, 0);//MIP node log display information-No display until optimal solution has been found
cplex.setParam(IloCplex::SimDisplay, 0);//No iteration messages until solution
cplex.setParam(IloCplex::BarDisplay, 0);//No progress information
cplex.setParam(IloCplex::NetDisplay, 0);//Network logging display indicator
if ( !cplex.solve() ) {
....
}
.
しかしそれでもCplexはそのようなことを印刷します:
Warning: Bound infeasibility column 'x11'.
Presolve time = 0.00 sec. (0.00 ticks)
Root node processing (before b&c):
Real time = 0.00 sec. (0.01 ticks)
Parallel b&c, 4 threads:
Real time = 0.00 sec. (0.00 ticks)
Sync time (average) = 0.00 sec.
Wait time (average) = 0.00 sec.
------------
Total (root+branch&cut) = 0.00 sec. (0.01 ticks)
.
印刷を避ける方法はありますか?
解決 2
これは、CPLEXパラメータDOCに
cplex.setOut(env.getNullStream());
cplex.setWarning(env.getNullStream());
cplex.setError(env.getNullStream());
. 他のヒント
setOut
クラスからIloAlgorithm
メソッドを使用する(IloCplex
から継承)。NULL出力ストリームをパラメータとして設定し、画面上のメッセージのログ記録を防ぐことができます。
所属していません StackOverflow