Initializing help system before first use

XPRBsetsosdir

XPRBsetsosdir


Purpose
Set a branching directive for a SOS.
Synopsis
int XPRBsetsosdir(XPRBsos sos, int type, double val);
Arguments
sos 
Reference to a previously created SOS.
type 
The directive type, which must be one of:
XPRB_PR 
priority;
XPRB_UP 
first branch upwards;
XPRB_DN 
first branch downwards;
XPRB_PU 
pseudo cost on branching upwards;
XPRB_PD 
pseudo cost on branching downwards.
val 
An argument dependent on the type of the directive being defined. If type is:
XPRB_PR 
val will be the priority value, an integer between 1 (highest) and 1000 (lowest), the default;
XPRB_UP 
no input is required — choose any value, e.g. 0;
XPRB_DN 
no input is required — choose any value, e.g. 0;
XPRB_PU 
val will be the value of the pseudo cost for the upward branch;
XPRB_PD 
val will be the value of the pseudo cost for the downward branch.
Return value
0 if function executed successfully, 1 otherwise.
Example
XPRBprob prob;
XPRBsos set1;
   ...
set1 = XPRBnewsos(prob, "sos1", XPRB_S1);
XPRBsetsosdir(set1, 5);
XPRBsetsosdir(set1, XPRB_DN, 0);
This gives a priority of 5 to the SOS set1 and sets branching downwards as the preferred direction for set1.
Further information
This function sets any type of branching directive available in Xpress. This may be a priority for branching on a SOS (type XPRB_PR), the preferred branching direction (types XPRB_UP, XPRB_DN) or the estimated cost incurred when branching on a SOS (types XPRB_PU, XPRB_PD). Several directives of different types may be set for a single set. Function XPRBsetvardir may be used to set a directive for a variable.
Related topics

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