XPRBgetvarrng


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 
upper activity;
XPRB_LOACT 
lower activity;
XPRB_UUP 
upper unit cost;
XPRB_UDN 
lower unit cost
XPRB_UCOST 
upper cost;
XPRB_LCOST 
lower cost.
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
XPRBnewvar, XPRBgetctrrng.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.