Initializing help system before first use

problem.addcbchecktime

problem.addcbchecktime


Purpose
Declares a callback function which is called every time the Optimizer checks if the time limit has been reached. This callback function will be called in addition to any callbacks already added by addcbchecktime.
Synopsis
problem.addcbchecktime(callback, data, priority) ret = callback(prob, data)
Arguments
prob 
The current problem.
callback 
The callback function which takes two arguments, prob and data, and has an integer return value. This function is called every time the Optimizer checks against the time limit.
prob 
The problem passed to the callback function, callback.
data 
The user-defined object passed as data when setting up the callback with addcbchecktime.
priority 
An integer that determines the order in which multiple checktime callbacks will be invoked. The callback added with a higher priority will be called before a callback with a lower priority. Set to 0 if not required.
Further information
If the callback function returns a nonzero value the solution process will be interrupted.
Related topics