XPRBgetvarrng
XPRBgetvarrng |
Purpose
Synopsis
double XPRBgetvarrng(XPRBvar var, int rngtype);
Arguments
var
|
BCL reference to a variable.
|
||||||||||||
rngtype
|
The type of ranging information sought. This is one of:
|
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); ... XPRBlpoptimize("expl2, ""); ucval = XPRBgetvarrng(x1, XPRB_UCOST);
Further information
1. 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 (using
XPRSfixglobals) and re-solving the resulting LP problem.
2. For non-basic variables, the unit costs are always the (absolute) values of the reduced costs.
Related topics