Initializing help system before first use

XPRSaddcbsepnode

Purpose
This subroutine is deprecated and will be removed in a future release. Please use branching objects instead, see XPRSaddcbchgbranchobject.
Declares a separate callback function to specify how to branch on a node in the branch and bound tree. A node can be branched by applying either cuts or bounds to each node. These are stored in the cut pool. This callback function will be called in addition to any callbacks already added by XPRSaddcbsepnode.
Synopsis
int XPRS_CC XPRSaddcbsepnode(XPRSprob prob, int (XPRS_CC *sepnode)(XPRSprob cbprob, void *cbdata, int branch, int entity, int up, double current), void *data, int priority);
Arguments
prob 
The current problem.
sepnode 
The callback function, which takes six arguments, cbprob, cbdata, branch, entity, up and current, and has an integer return value.
cbprob 
The problem passed to the callback function, sepnode.
cbdata 
The user-defined data passed as data when setting up the callback with XPRSaddcbsepnode.
branch 
The branch number.
entity 
The MIP entity number.
up 
The direction of branch on the MIP entity (same as branch).
current 
Current value of the MIP entity.
data 
A user-defined data to be passed to the callback function, sepnode .
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.
Example
This example solves a MIP, using a separation callback function to branch on fractional integer variables. It assumes the presence of an estimation callback function (not shown), defined by XPRSaddcbestimate, to identify a fractional integer variable.
 XPRSaddcbsepnode(prob,nodeSep,NULL,0);
 XPRSmipoptimize(prob,"");
where the function nodeSep may be defined as follows:
int nodeSep(XPRSprob cbprob, void *cbdata, int branch,
             int entity, int up, double current)
 {
   XPRScut index;
   double dbd;

   if( up )
   {
     dbd = floor(xval);
     XPRSstorebounds(cbprob, 1, &entity, "U", &dbd, &index);
   }
   else
   {
     dbd = ceil(xval);
     XPRSstorebounds(cbprob, 1, &entity, "L", &dbd, &index);
   }
   XPRSsetbranchbounds(prob, index);
   return 0;
 }
Further information
1. The return value of the sepnode callback function is currently ignored.
2. Consider using the more flexible branching objects, as described for the XPRS_bo_create function.
3. The user separate routine is called nbr times where nbr is returned by the estimate callback function, XPRSaddcbestimate. This allows multi-way branching to be performed.
4. The bounds and/or cuts to be applied at a node must be specified in the user separate routine by calling XPRSsetbranchbounds and/or XPRSsetbranchcuts.
Related topics

© 2001-2023 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.