XSLPgettolset
XSLPgettolset |
Purpose
Retrieve the values of a set of convergence tolerances for an SLP problem
Synopsis
int XPRS_CC XSLPgettolset(XSLPprob Prob, int nSLPTol, int *Status, double *Tols);
Arguments
Prob
|
The current SLP problem.
|
nSLPTol
|
The index of the tolerance set.
|
Status
|
Address of integer to receive the bit-map of status settings. May be
NULL if not required.
|
Tols
|
Array of 9 double-precision values to hold the tolerances. May be
NULL if not required.
|
Example
The following example retrieves the values for tolerance set 3 and prints those which are set:
double Tols[9]; int i, Status; XSLPgettolset(Prob, 3, &Status, Tols); for (i=0;i<9;i++) if (Status & (1<<i)) printf("\nTolerance %d = %lg",i,Tols[i]);
Further information
If Status or Tols is NULL, then the corresponding information will not be returned.
If Tols is not NULL, then a set of 9 values will always be returned. Status indicates which of these values is active as follows. Bit n of Status is set if Tols[n] is active, where n is:
Entry / Bit | Tolerance | XSLP constant | XSLP bit constant |
---|---|---|---|
0 | Closure tolerance (TC) | XSLP_TOLSET_TC | XSLP_TOLSETBIT_TC |
1 | Absolute delta tolerance (TA) | XSLP_TOLSET_TA | XSLP_TOLSETBIT_TA |
2 | Relative delta tolerance (RA) | XSLP_TOLSET_RA | XSLP_TOLSETBIT_RA |
3 | Absolute coefficient tolerance (TM) | XSLP_TOLSET_TM | XSLP_TOLSETBIT_TM |
4 | Relative coefficient tolerance (RM) | XSLP_TOLSET_RM | XSLP_TOLSETBIT_RM |
5 | Absolute impact tolerance (TI) | XSLP_TOLSET_TI | XSLP_TOLSETBIT_TI |
6 | Relative impact tolerance (RI) | XSLP_TOLSET_RI | XSLP_TOLSETBIT_RI |
7 | Absolute slack tolerance (TS) | XSLP_TOLSET_TS | XSLP_TOLSETBIT_TS |
8 | Relative slack tolerance (RS) | XSLP_TOLSET_RS | XSLP_TOLSETBIT_RS |
The XSLP_TOLSET constants can be used to access the corresponding entry in the value arrays, while the XSLP_TOLSETBIT constants are used to set or retrieve which tolerance values are used for a given SLP variable.
Related topics