problem.gettolset
problem.gettolset |
Purpose
Retrieve the values of a set of convergence tolerances for an SLP problem
Synopsis
status = problem.gettolset (nslptol, tols)
Arguments
nslptol
|
The index of the tolerance set.
|
status
|
The bit-map of status settings.
|
Tols
|
Array of 9 double-precision values to hold the tolerances. May be
None if not required.
|
Example
The following example retrieves the values for tolerance set 3 and prints those which are set:
tols = [] status = p.gettolset (3, Tols) for i in range(9): if status & (1<<i): print ("Tolerance {0} = {1}".format (i,Tols[i]))
Further information
If Tols is None, then the corresponding information will not be returned.
If Tols is not None, 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