XPRBsetvardir
| XPRBsetvardir | 
  Purpose
 
  
  Synopsis
 
 int XPRBsetvardir(XPRBvar var, int type, double c); 
 
  Arguments
 
 | 
     var 
     | 
     BCL reference to a variable.
     | ||||||||||
| 
     type 
     | 
     Directive type, which must be one of:
     
 | ||||||||||
| 
     c 
     | 
     An argument dependent on the type of directive to be defined. Must be one of:
     
 | 
  Return value
 
 
 0 if function executed successfully, 1 otherwise.
 
  Example
 
 
 The following example gives a priority of
 10 to variable
 x1 and sets the preferred branching direction to be upwards.
 
 XPRBprob prob; XPRBvar x1; ... x1 = XPRBnewvar(prob, XPRB_UI, "abc3", 0, 100); XPRBsetvardir(x1, XPRB_PR, 10); XPRBsetvardir(x1, XPRB_UP, 0);
  Further information
 
 
 1. This function sets any type of branching directive available in Xpress. This may be a priority for branching on a variable (type
 XPRB_PR), the preferred branching direction (types
 XPRB_UP,
 XPRB_DN) or the estimated cost incurred when branching on a variable (types
 XPRB_PU,
 XPRB_PD). Several directives of different types may be set for a single variable.
 
 
 2. Note that it is only possibly to set branching directives for discrete variables (including semi-continuous and partial integer variables). Function
 XPRBsetsosdir may be used to set a directive for a SOS.
 
 
  Related topics
 
  
