Initializing help system before first use

problem.addBarIterationCallback

Purpose
Declares a barrier iteration callback function, called after each iteration during the interior point algorithm, with the ability to access the current barrier solution/slack/duals or reduced cost values, and to ask barrier to stop. This callback function will be called in addition to any callbacks already added by problem.addBarIterationCallback. This functionality is not available for the hybrid gradient method.
Topic areas
Callback, Barrier
Synopsis
problem.addBarIterationCallback(bariteration, data=None, priority=0)
bariteration(cbprob, cbdata, action)
Arguments
bariteration 
The callback function, which takes arguments cbprob, cbdata, and action serving as an integer return value. This function is called at every barrier iteration.
data 
A user-defined data to be passed to the callback function, bariteration.
priority 
An integer that determines the order in which callbacks of this type 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.
cbprob 
The problem passed to the callback function, bariteration.
cbdata 
The user-defined data passed as data when setting up the callback.
action 
Defines a return value controlling barrier:
<0 
continue with the next iteration;
=0 
let barrier decide (use default stopping criteria);
barrier stops with status not defined;
barrier stops with optimal status;
barrier stops with dual infeasible status;
barrier stops wih primal infeasible status.
Further information
1. Only the functions for retrieving the solution and the attribute/control value retrieving and setting routines are expected to be called from the callback.
2. General barrier iteration values are available via the following attributes:
3. Please note that these values refer to the scaled and presolved problem used by barrier, and may differ from the ones calculated from the postsolved solution returned by problem.getCallbackSolution.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.