XPRSaddcbcutround
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 XPRSaddmanagedcuts. 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 XPRSaddcbcutround.
Topic areas
Synopsis
int XPRS_CC XPRSaddcbcutround(XPRSprob prob, void (XPRS_CC *cutround)(XPRSprob cbprob, void *cbdata, int ifxpresscuts, int *p_action), void *data, int priority);
Arguments
|
prob
|
The current problem
|
||||||||
|
cutround
|
The callback function, which takes arguments
cbprob,
cbdata,
ifxpresscuts and
p_action and has no return value. This function is called before each potential round of cut separation in the branch and bound search. |
||||||||
|
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.
|
||||||||
|
p_action
|
An integer return value that specifies the action the Optimizer should take:
|
||||||||
|
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. |
Example
See also examples
els_managedcuts.c, els_usercuts.c.
Further information
1. Optimizer managed cuts can be added using
XPRSaddmanagedcuts. The Optimizer will check for any violated cuts, together with any new or violated Optimizer created cuts (if
p_action is
-1 or
+1), to add to the problem.
2. It is possible to use
XPRSaddcuts,
XPRSloadcuts and
XPRSdelcuts to add and remove cutting planes and
XPRSchgbounds to tighten bounds, although it is recommended to use
XPRSaddmanagedcuts 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
XPRSaddmipsol. 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
XPRSaddmanagedcuts, the callback will be fired again after the reoptimization if and only if a non-zero value is returned in
p_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 p_action.
6. The attribute
CUTROUNDS can be used for determining how many rounds of cuts has been applied on the current node.
Related topics
XPRSremovecbcutround,
XPRSaddmanagedcuts,
XPRSaddmipsol,
XPRSaddcuts,
XPRSloadcuts,
XPRSdelcuts,
XPRSchgbounds,
CUTROUNDS.
© 2001-2026 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.
