Initializing help system before first use

XPRSaddcbchgbranchobject

Purpose
Declares a callback function that will be called after the selection of a MIP entity to branch on. This callback allows the user to inspect and replace the Optimizer's choice of how to branch the current node. This callback will also be called in the case when there are no candidates to branch on, that is, when all MIP entities are already satisfied. This callback function will be called in addition to any callbacks already added by XPRSaddcbchgbranchobject.
Topic areas
Synopsis
int XPRS_CC XPRSaddcbchgbranchobject(XPRSprob prob, void (XPRS_CC *chgbranchobject)(XPRSprob cbprob, void* cbdata, XPRSbranchobject branch, XPRSbranchobject* p_newbranch), void* data, int priority);
Arguments
prob 
The current problem.
chgbranchobject 
The callback function, which takes four arguments: cbprob, cbdata, branch and p_newbranch. This function is called every time the Optimizer has selected a candidate entity for branching.
cbprob 
The problem passed to the callback function, chgbranchobject.
cbdata 
The user defined data passed as data when setting up the callback with XPRSaddcbchgbranchobject.
branch 
The candidate branching data selected by the Optimizer. Will be NULL if no candidates exist.
p_newbranch 
Optional new branching data to replace the Optimizer's selection. If branch or NULL is passed back, no change will be applied.
data 
A user-defined data to be passed to the callback function, chgbranchobject.
priority 
An integer that determines the order in which multiple 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.
Example
See also example mostviolated.c.
Further information
1. The branching data given by the Optimizer provides a linear description of how the Optimizer intends to branch on the selected candidate. This will often be one of standard MIP entities of the current problem, but can also be e.g. a split disjunction or a structural branch, if those features are turned on.
2. The functions XPRS_bo_getbranches, XPRS_bo_getbounds and XPRS_bo_getrows can be used to inspect the given branching data.
3. Refer to XPRS_bo_create on how to create a new branching data to replace the Optimizer's selection. Note that the new branching data should be created with a priority value no higher than the current data to guarantee it will be used for branching.
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.