Cplex 关闭自动输出求解信息

来源:互联网 发布:汽车维修自学软件 编辑:程序博客网 时间:2024/05/21 17:40

messages to screen switch

Decides whether or not results are displayed on screen in an application of the C API.

Purpose

Messages to screen switch

C Name                  CPX_PARAM_SCRIND (int)
C++ Name                screen indicator not available in this API
Java Name               screen indicator not available in this API
.NET Name               screen indicator not available in this API
Python Name             screen indicator not available in this API
Interactive Optimizer   screen indicator not available in this interface
Identifier              1035

Description

Decides whether or not results are displayed on screen in an application of the Callable Library (C API). This parameter works by adding or removingstdout to or from the result, warning, and error channels. Consequently, good practice does not managestdout in those channels directly at the same time as using this parameter; otherwise, undefined behavior can occur.

To turn off output to the screen, in a C++ application, where cplex is an instance of the classIloCplex and env is an instance of the classIloEnv , the environment, use cplex.setOut(env.getNullStream()) .

In a Java application, usecplex.setOut(null).

In a .NET application, useCplex.SetOut(Null).

In a Python application, wherec is an instance of the class cplex.Cplex, use c.set_results_stream(None).

Table 1. ValuesValueSymbolMeaning0CPX_OFFTurn off display of messages to screen;default1CPX_ONDisplay messages on screen
原创粉丝点击