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