XPRBsetvardir
PurposeSynopsisint XPRBsetvardir(XPRBvar var, int type, double c);
Arguments
var BCL reference to a variable. type Directive type, which must be one of:
XPRB_PR XPRB_UP XPRB_DN XPRB_PU XPRB_PD c An argument dependent on the type of directive to be defined. Must be one of:
XPRB_PR XPRB_UP XPRB_DN XPRB_PU XPRB_PD Return value0 if function executed successfully, 1 otherwise.ExampleThe 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 information1. This function sets any type of branching directive available in Xpress-MP. 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
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.