Package cplex :: Module callbacks :: Class Callback
 

Class Callback


Base class for Cplex callback classes.
Instance Methods
 
__call__(self)
Method to be overridden by user-defined callback class.
 
abort(self)
Terminates optimization.
 
get_end_time(self)
Returns a time stamp for computing the time limit.
 
get_end_dettime(self)
Returns a deterministic time stamp in ticks.
 
get_start_time(self)
Returns a time stamp specifying when the solving process started.
 
get_start_dettime(self)
Returns a deterministic time stamp specifying when the solving process started.
 
get_time(self)
Returns a time stamp for the current time.
 
get_dettime(self)
Returns a deterministic time stamp for the current time.
Method Details

__call__(self)
(Call operator)

 

Method to be overridden by user-defined callback class.

See the Cplex.register_callback method.

abort(self)

 

Terminates optimization.

Note
A call to abort should be followed immediately by a return statement. Calling other callback methods may override the effect of the abort statement.

get_end_time(self)

 

Returns a time stamp for computing the time limit.

Subtracting the return value of Callback.get_time() from the return value of this method yields the time remaining in seconds.

The interpretation of this value as wall clock time or CPU time is controlled by the parameter clocktype.

get_end_dettime(self)

 

Returns a deterministic time stamp in ticks.

Subtracting the return value of Callback.get_dettime() from the return value of this method yields the time remaining in deterministic ticks.

get_start_time(self)

 

Returns a time stamp specifying when the solving process started.

To compute elapsed time in seconds, subtract the result of Callback.get_time() from the result of this method. This computation yields either wallclock time (also known as real time) or CPU time, depending on the clock set by the clocktype parameter.

get_start_dettime(self)

 

Returns a deterministic time stamp specifying when the solving process started.

To compute elapsed deterministic time in ticks, subtract the result of Callback.get_dettime() from the result of this method.

get_time(self)

 

Returns a time stamp for the current time.

Subtracting the return value of this method from the return value of Callback.get_end_time() yields the time remaining in seconds.

The interpretation of this value as wall clock time or CPU time is controlled by the parameter clocktype.

get_dettime(self)

 

Returns a deterministic time stamp for the current time.

Subtracting the return value of this method from the return value of Callback.get_end_dettime() yields the time remaining in deterministic ticks.