Initializing help system before first use

problem.addCutRoundCallback

Purpose
Declares a callback function that is called when the Optimizer could separate cutting planes during the branch and bound search. The callback allows a user to add cuts managed by the Optimizer, through problem.addManagedCuts. It also allows the user some degree of control over when and how many rounds of cuts the Optimizer should apply for the local node of the branch-and-bound search. This callback function will be called in addition to any callbacks already added by problem.addCutRoundCallback.
Topic areas
Callback, Cuts
Synopsis
problem.addCutRoundCallback(cutround, data=None, priority=0)
cutround(cbprob, cbdata, ifxpresscuts, action)
Arguments
cutround 
The callback function, which takes arguments cbprob, cbdata, ifxpresscuts and action and has no return value. This function is called before each potential round of cut separation in the branch and bound search.
data 
A user-defined data to be passed to the callback function, cutround.
priority 
An integer that determines the order in which multiple 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.
cbprob 
The problem passed to the callback function, cutround.
cbdata 
The user-defined data passed as data when setting up the callback.
ifxpresscuts 
An integer set to 1 if the Optimizer will apply a round of cuts after this callback. 0 otherwise.
action 
An integer return value that specifies the action the Optimizer should take:
-1 
Continue unchanged. The default action.
No further rounds of cuts should be applied on this node.
The Optimizer should apply one more round of cutting, regardless of the value of ifxpresscuts
The Optimizer should process any changes applied during this callback and fire the callback again, but skip any Optimizer cutting.
Further information
1. Optimizer managed cuts can be added using problem.addManagedCuts. The Optimizer will check for any violated cuts, together with any new or violated Optimizer created cuts (if action is -1 or +1), to add to the problem.
2. It is possible to use problem.addCuts, problem.loadCuts and problem.delCuts to add and remove cutting planes and problem.chgBounds to tighten bounds, although it is recommended to use problem.addManagedCuts to provide new cutting planes to the Optimizer in this callback. Separation of delayed constraints is best done using either the optnode or preintsol callbacks.
3. It is possible to add new solutions using problem.addMipSol. These will be checked immediately after the callback, but adding solutions will not automatically trigger another firing of this callback.
4. If cutting planes are added with problem.addManagedCuts, the callback will be fired again after the reoptimization if and only if a non-zero value is returned in action.
5. If cuts are added directly to, or deleted from, the problem, or bounds are tightened, a reoptimization of the node LP relaxation will automatically be triggered open the return from the callback function. If separation of Optimizer cuts is enabled or managed cuts were added during the callback, such cuts will only be separated based on the new solution after reoptimization. The callback will be fired again if and only if a non-zero value is returned in action.
6. The attribute CUTROUNDS can be used for determining how many rounds of cuts has been applied on the current node.
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.