跳至主内容
框架 无框架

类IloCplex::Aborter

定义文件: ilcplex/ilocplexi.h
IloCplex::Aborter的地图IloCplex::AborterIloCplex::Aborter

该类的实例可以优雅地终止 "IloCplex的求解和调整方法。 您可以将该类的一个实例传递给一个或多个 "IloCplex对象。 调用 "abort方法将终止 "IloCplex对象的求解或调整方法。

In particular, if you install an instance of this class in an instance of IloCplex, call the method IloCplex::solve, and later call the method IloCplex::Aborter::abort, then the solve will gracefully terminate, even if the methods are in separate threads. 例如,在图形用户界面应用程序中,当最终用户按下停止按钮时,CPLEX 就会终止。

方法概要
public voidabort()
public Aborter(IloEnv env)
public voidclear()
public voidend()
public IloBoolisAborted() const
方法详细信息

中止者

publicAborterIloEnv env)

构造 Aborter 类的实例。 It requires an instance of the same IloEnv as the IloCplex object with which to use the aborter.


abort

public voidabort()

终止求解和调整方法。


清除

公共 voidclear()

清除中止器。


结束

public voidend()

结束终止程序。


isAborted

publicIloBool isAborted() const

如果调用了 "abort,则返回IloTrue。