Skip to main content
FRAMES NO FRAMES

Class IloCplex::Aborter

Definition file: ilcplex/ilocplexi.h
Map of IloCplex::AborterIloCplex::AborterIloCplex::Aborter

An instance of this class gracefully terminates the solving and tuning methods of IloCplex. You can pass an instance of this class to one or more IloCplex objects. Calling the method abort will then terminate the solve or tuning method of the IloCplex object.

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. This convention makes it possible, for example, in a GUI application to terminate CPLEX when an end user presses a stop button.

Method Summary
public voidabort()
public Aborter(IloEnv env)
public voidclear()
public voidend()
public IloBoolisAborted() const
Method Detail

Aborter

public Aborter(IloEnv env)

Constructs an instance of the Aborter class. It requires an instance of the same IloEnv as the IloCplex object with which to use the aborter.


abort

public void abort()

Aborts the solving and tuning methods.


clear

public void clear()

Clears the aborter.


end

public void end()

Ends the aborter.


isAborted

public IloBool isAborted() const

Returns IloTrue if abort has been called.