XPRSsetcbsepnode


Purpose
Declares a separate callback function to specify how to separate a node in the Branch and Bound tree using a global object. A node can be separated by applying either cuts or bounds to each node. These are stored in the cut pool.
Synopsis
int XPRS_CC XPRSsetcbsepnode(XPRSprob prob, int (XPRS_CC *fse)(XPRSprob my_prob, void *my_object, int ibr, int iglsel, int ifup, double curval), void *object);
Arguments
prob 
The current problem.
fse 
The callback function, which takes six arguments, my_prob, my_object, ibr, iglsel, ifup and curval, and has an integer return value.
my_prob 
The problem passed to the callback function, fse.
my_object 
The user-defined object passed as object when setting up the callback with XPRSsetcbsepnode.
ibr 
The branch number.
iglsel 
The global entity number.
ifup 
The direction of branch on the global entity (same as ibr).
curval 
Current value of the global entity.
object 
A user-defined object to be passed to the callback function, fse .
Example
This example minimizes a problem, before defining a user separate callback function for the global search:
XPRSminim(prob,"");
XPRSsetcbsepnode(prob,nodeSep,NULL);
XPRSglobal(prob);
where the function nodeSep may be defined as follows:
int nodeSep(XPRSprob my_prob, void *my_object, int ibr, 
            int iglsel, int ifup, double curval)
{
  XPRScut index;
  double dbd;

  if( ifup )
  {   
    dbd = floor(xval);
    XPRSstorebounds(my_prob, 1, &iglsel, "U", &dbd, &index);
  }
  else
  {
    dbd = ceil(xval);
    XPRSstorebounds(my_prob, 1, &iglsel, "L", &dbd, &index);
  }
  XPRSsetbranchcuts(my_prob, 1, &index);
  return 0;
}
Further information
1. The user separate routine is called nbr times where nbr is returned by the estimate callback function, XPRSsetcbestimate. This allows multi-way branching to be performed.
2. The bounds and/or cuts to be applied at a node must be specified in the user separate routine by calling XPRSsetbranchcuts.
Related topics
XPRSsetbranchcuts, XPRSsetcbestimate, XPRSstorecuts.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.