Purpose
Get
ranging information for a variable.
Synopsis
double XPRBgetvarrng(XPRBvar var, int rngtype);
Arguments
var
|
Reference to variable.
|
rngtype
|
The type of ranging information sought. This is one of:
XPRB_UPACT
|
|
XPRB_LOACT
|
|
XPRB_UUP
|
|
XPRB_UDN
|
|
XPRB_UCOST
|
|
XPRB_LCOST
|
|
|
Return value
Ranging information of the required type.
Example
This example retrieves the upper cost value for a variable.
XPRBprob expl2;
XPRBvar x1;
double ucval;
expl2 = XPRBnewprob("example2");
x1 = XPRBnewvar(expl2, XPRB_UI, "abc3", 1, 100);
...
XPRBsolve("expl2, l");
ucval = XPRBgetvarrng(x1, XPRB_UCOST);
Further information
This method can only be used after solving an LP problem. Ranging information for MIP problems can be obtained by fixing all
discrete variables to their solution values and re-solving the resulting LP problem.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.