Control Parameters
Various controls exist within Xpress-SLP to govern the solution procedure and the form of the output. Some of these take integer values and act as switches between various types of behavior. Many are tolerances on values related to the convergence criteria; these are all double precision. There are also a few controls which are character strings, setting names for structures. Any of these may be altered by the user to enhance performance of the SLP algorithm. In most cases, the default values provided have been found to work well in practice over a range of problems and caution should be exercised if they are changed.
Users of the Xpress-SLP function library are provided with the following set of functions for setting and obtaining control values:
XSLPgetintcontrol XSLPgetdblcontrol XSLPgetstrcontrol XSLPsetintcontrol XSLPsetdblcontrol XSLPsetstrcontrol All the controls as listed in this chapter are prefixed with XSLP_. It is possible to use the above functions with control parameters for the Xpress Optimizer (controls prefixed with XPRS_). For details of the Optimizer controls, see the Optimizer manual.
Example of the usage of the functions:
XSLPgetintcontrol(Prob, XSLP_PRESOLVE, &presolve); printf("The value of PRESOLVE was %d\n", presolve); XSLPsetintcontrol(Prob, XSLP_PRESOLVE, 1-presolve); printf("The value of PRESOLVE is now %d\n", 1-presolve);The following is a list of all the Xpress-SLP controls:
XSLP_ALGORITHM Bit map describing the SLP algorithm(s) to be usedXSLP_ATOL_A Absolute delta convergence toleranceXSLP_ATOL_R Relative delta convergence toleranceXSLP_AUGMENTATION Bit map describing the SLP augmentation method(s) to be usedXSLP_AUTOSAVE Frequency with which to save the modelXSLP_BARLIMIT Number of initial SLP iterations using the barrier methodXSLP_CASCADE Bit map describing the cascading to be usedXSLP_CASCADENLIMIT Maximum number of iterations for cascading with non-linear determining rowsXSLP_CASCADETOL_PA Absolute cascading print toleranceXSLP_CASCADETOL_PR Relative cascading print toleranceXSLP_CONTROL Bit map describing which Xpress-SLP functions also activate the corresponding Optimizer Library functionXSLP_CTOL Closure convergence toleranceXSLP_CVNAME Name of the set of character variables to be usedXSLP_DAMP Damping factor for updating values of variablesXSLP_DAMPEXPAND Multiplier to increase damping factor during dynamic dampingXSLP_DAMPMAX Maximum value for the damping factor of a variable during dynamic dampingXSLP_DAMPMIN Minimum value for the damping factor of a variable during dynamic dampingXSLP_DAMPSHRINK Multiplier to decrease damping factor during dynamic dampingXSLP_DAMPSTART SLP iteration at which damping is activatedXSLP_DCLIMIT Default iteration delay for delayed constraintsXSLP_DEFAULTIV Default initial value for an SLP variable if none is explicitly givenXSLP_DEFAULTSTEPBOUND Minimum initial value for the step bound of an SLP variable if none is explicitly givenXSLP_DELAYUPDATEROWS Number of SLP iterations before update rows are fully activatedXSLP_DELTA_A Absolute perturbation of values for calculating numerical derivativesXSLP_DELTA_R Relative perturbation of values for calculating numerical derivativesXSLP_DELTA_X Minimum absolute value of delta coefficients to be retainedXSLP_DELTA_Z Zero tolerance used when calculating numerical derivativesXSLP_DELTACOST Initial penalty cost multiplier for penalty delta vectorsXSLP_DELTACOSTFACTOR Factor for increasing cost multiplier on total penalty delta vectorsXSLP_DELTAFORMAT Formatting string for creation of names for SLP delta vectorsXSLP_DELTAMAXCOST Maximum penalty cost multiplier for penalty delta vectorsXSLP_DELTAOFFSET Position of first character of SLP variable name used to create name of delta vectorXSLP_DELTAZLIMIT Number of SLP iterations during which to apply XSLP_DELTA_ZXSLP_DERIVATIVES Method of calculating derivativesXSLP_DJTOL Tolerance on DJ value for determining if a variable is at its step boundXSLP_ECFCHECK Check feasibility at the point of linearization for extended convergence criteriaXSLP_ECFTOL_A Absolute tolerance on testing feasibility at the point of linearizationXSLP_ECFTOL_R Relative tolerance on testing feasibility at the point of linearizationXSLP_EQTOL_A Absolute tolerance on equality testing in logical functionsXSLP_EQTOL_R Relative tolerance on equality testing in logical functionsXSLP_ERRORCOST Initial penalty cost multiplier for penalty error vectorsXSLP_ERRORCOSTFACTOR Factor for increasing cost multiplier on total penalty error vectorsXSLP_ERRORMAXCOST Maximum penalty cost multiplier for penalty error vectorsXSLP_ERROROFFSET Position of first character of constraint name used to create name of penalty error vectorsXSLP_ERRORTOL_A Absolute tolerance for error vectorsXSLP_ERRORTOL_P Absolute tolerance for printing error vectorsXSLP_ESCALATION Factor for increasing cost multiplier on individual penalty error vectorsXSLP_ETOL_A Absolute tolerance on penalty vectorsXSLP_ETOL_R Relative tolerance on penalty vectorsXSLP_EVALUATE Evaluation strategy for user functionsXSLP_EVTOL_A Absolute tolerance on total penalty costsXSLP_EVTOL_R Relative tolerance on total penalty costsXSLP_EXCELVISIBLE Display of Excel when evaluating user functions written in ExcelXSLP_EXPAND Multiplier to increase a step boundXSLP_EXTRACVS Expansion number for character variablesXSLP_EXTRAUFS Expansion number for user functionsXSLP_EXTRAXVITEMS Expansion number for XV itemsXSLP_EXTRAXVS Expansion number for XVsXSLP_FUNCEVAL Bit map for determining the method of evaluating user functions and their derivativesXSLP_GRANULARITY Base for calculating penalty costsXSLP_INFEASLIMIT The maximum number of consecutive infeasible SLP iterations which can occur before Xpress-SLP terminatesXSLP_INFINITY Value returned by a divide-by-zero in a formulaXSLP_ITERLIMIT The maximum number of SLP iterationsXSLP_ITOL_A Absolute impact convergence toleranceXSLP_ITOL_R Relative impact convergence toleranceXSLP_IVNAME Name of the set of initial values to be usedXSLP_LOG Level of printing during SLP iterationsXSLP_MAXTIME The maximum time in seconds that the SLP optimization will run before it terminatesXSLP_MAXWEIGHT Maximum penalty weight for delta or error vectorsXSLP_MEM_CALCSTACK Memory allocation for formula calculationsXSLP_MEM_COEF Memory allocation for nonlinear coefficientsXSLP_MEM_COL Memory allocation for additional information on matrix columnsXSLP_MEM_CVAR Memory allocation for character variablesXSLP_MEM_DERIVATIVES Memory allocation for analytic derivativesXSLP_MEM_EXCELDOUBLE Memory allocation for return values from Excel user functionsXSLP_MEM_FORMULA Memory allocation for formulaeXSLP_MEM_FORMULAHASH Memory allocation for internal formula arrayXSLP_MEM_FORMULAVALUE Memory allocation for formula values and derivativesXSLP_MEM_ITERLOG Memory allocation for SLP iteration summaryXSLP_MEM_RETURNARRAY Memory allocation for return values from multi-valued user functionXSLP_MEM_ROW Memory allocation for additional information on matrix rowsXSLP_MEM_STACK Memory allocation for parsed formulae, analytic derivativesXSLP_MEM_STRING Memory allocation for strings of all typesXSLP_MEM_TOL Memory allocation for tolerance setsXSLP_MEM_UF Memory allocation for user functionsXSLP_MEM_VALSTACK Memory allocation for intermediate values for analytic derivativesXSLP_MEM_VAR Memory allocation for SLP variablesXSLP_MEM_XF Memory allocation for complicated functionsXSLP_MEM_XFNAMES Memory allocation for complicated function input and return namesXSLP_MEM_XFVALUE Memory allocation for complicated function valuesXSLP_MEM_XROW Memory allocation for extended row informationXSLP_MEM_XV Memory allocation for XVsXSLP_MEM_XVITEM Memory allocation for individual XV entriesXSLP_MEMORYFACTOR Factor for expanding size of dynamic arrays in memoryXSLP_MINUSDELTAFORMAT Formatting string for creation of names for SLP negative penalty delta vectorsXSLP_MINUSERRORFORMAT Formatting string for creation of names for SLP negative penalty error vectorsXSLP_MINWEIGHT Minimum penalty weight for delta or error vectorsXSLP_MIPALGORITHM Bitmap describing the MISLP algorithms to be usedXSLP_MIPCUTOFF_A Absolute objective function cutoff for MIP terminationXSLP_MIPCUTOFF_R Absolute objective function cutoff for MIP terminationXSLP_MIPCUTOFFCOUNT Number of SLP iterations to check when considering a node for cutting offXSLP_MIPCUTOFFLIMIT Number of SLP iterations to check when considering a node for cutting offXSLP_MIPDEFAULTALGORITHM Default algorithm to be used during the global search in MISLPXSLP_MIPFIXSTEPBOUNDS Bitmap describing the step-bound fixing strategy during MISLPXSLP_MIPITERLIMIT Maximum number of SLP iterations at each nodeXSLP_MIPLOG Frequency with which MIP status is printedXSLP_MIPOCOUNT Number of SLP iterations at each node over which to measure objective function variationXSLP_MIPOTOL_A Absolute objective function tolerance for MIP terminationXSLP_MIPOTOL_R Relative objective function tolerance for MIP terminationXSLP_MIPRELAXSTEPBOUNDS Bitmap describing the step-bound relaxation strategy during MISLPXSLP_MTOL_A Absolute effective matrix element convergence toleranceXSLP_MTOL_R Relative effective matrix element convergence toleranceXSLP_MVTOL Marginal value tolerance for determining if a constraint is slackXSLP_OBJSENSE Objective function senseXSLP_OBJTOPENALTYCOST Factor to estimate initial penalty costs from objective functionXSLP_OCOUNT Number of SLP iterations over which to measure objective function variation for static objective (2) convergence criterionXSLP_OTOL_A Absolute static objective (2) convergence toleranceXSLP_OTOL_R Relative static objective (2) convergence toleranceXSLP_PENALTYCOLFORMAT Formatting string for creation of the names of the SLP penalty transfer vectorsXSLP_PENALTYROWFORMAT Formatting string for creation of the names of the SLP penalty rowsXSLP_PLUSDELTAFORMAT Formatting string for creation of names for SLP positive penalty delta vectorsXSLP_PLUSERRORFORMAT Formatting string for creation of names for SLP positive penalty error vectorsXSLP_PRESOLVE Bitmap indicating the SLP presolve actions to be takenXSLP_PRESOLVEPASSLIMIT Maximum number of passes through the problem to improve SLP boundsXSLP_PRESOLVEZERO Minimum absolute value for a variable which is identified as nonzero during SLP presolveXSLP_SAMECOUNT Number of steps reaching the step bound in the same direction before step bounds are increasedXSLP_SAMEDAMP Number of steps in same direction before damping factor is increasedXSLP_SBLOROWFORMAT Formatting string for creation of names for SLP lower step bound rowsXSLP_SBNAME Name of the set of initial step bounds to be usedXSLP_SBROWOFFSET Position of first character of SLP variable name used to create name of SLP lower and upper step bound rowsXSLP_SBSTART SLP iteration after which step bounds are first appliedXSLP_SBUPROWFORMAT Formatting string for creation of names for SLP upper step bound rowsXSLP_SCALE When to re-scale the SLP problemXSLP_SCALECOUNT Iteration limit used in determining when to re-scale the SLP matrixXSLP_SHRINK Multiplier to reduce a step boundXSLP_SLPLOG Frequency with which SLP status is printedXSLP_STOL_A Absolute slack convergence toleranceXSLP_STOL_R Relative slack convergence toleranceXSLP_STOPOUTOFRANGE Stop optimization and return error code if internal function argument is out of rangeXSLP_TIMEPRINT Print additional timings during SLP optimizationXSLP_TOLNAME Name of the set of tolerance sets to be usedXSLP_UNFINISHEDLIMIT Number of times within one SLP iteration that an unfinished LP optimization will be continuedXSLP_UPDATEFORMAT Formatting string for creation of names for SLP update rowsXSLP_UPDATEOFFSET Position of first character of SLP variable name used to create name of SLP update rowXSLP_VALIDATIONTOL_A Absolute tolerance for the XSLPvalidate procedureXSLP_VALIDATIONTOL_R Relative tolerance for the XSLPvalidate procedureXSLP_VCOUNT Number of SLP iterations over which to measure static objective (3) convergenceXSLP_VLIMIT Number of SLP iterations after which static objective (3) convergence testing startsXSLP_VTOL_A Absolute static objective (3) convergence toleranceXSLP_VTOL_R Relative static objective (3) convergence toleranceXSLP_WCOUNT Number of SLP iterations over which to measure the objective for the extended convergence continuation criterionXSLP_WTOL_A Absolute extended convergence continuation toleranceXSLP_WTOL_R Relative extended convergence continuation toleranceXSLP_XCOUNT Number of SLP iterations over which to measure static objective (1) convergenceXSLP_XLIMIT Number of SLP iterations up to which static objective (1) convergence testing startsXSLP_XTOL_A Absolute static objective function (1) toleranceXSLP_XTOL_R Relative static objective function (1) toleranceXSLP_ZERO Absolute zero toleranceDouble control parameters
Integer control parameters
Memory control parameters
Memory control parameters are integer controls which can be used to define a minimum number of items for which space should be provided. For example, to allow space for at least 5000 coefficients, set XSLP_MEM_COEF to 5000.
Normally, Xpress-SLP will expand the memory required for items as the number grows. However, this process can be inefficient in the use of available memory and can, in any case, take time. If the system runs out of memory, then an error message will be produced and normally a list of current memory requirements will be printed. Alternatively, the library function XSLPuprintmemory can be used to print the memory currently in use. The following is an example of the information produced:
Arrays and dimensions: Array Item Used Max Allocated Memory Size Items Items Memory Control MemList 28 103 129 4K String 1 206891 219888 215K XSLP_MEM_STRING Xv 16 1282 2000 32K XSLP_MEM_XV Xvitem 48 1382 1600 75K XSLP_MEM_XVITEM UserFunc 80 2 1000 79K XSLP_MEM_UF IntlFunc 80 45 48 4K Vars 136 1685 2000 266K XSLP_MEM_VAR Coef 40 4631 4633 181K XSLP_MEM_COEF Formula 48 1415 2000 94K XSLP_MEM_FORMULA ToknStak 16 10830 13107 205K XSLP_MEM_STACK Cols 48 8163 8192 384K XSLP_MEM_COL Rows 40 4596 5120 200K XSLP_MEM_ROW Xrows 48 1607 2000 94K XSLP_MEM_XROW FormValu 16 3182 3184 50K XSLP_MEM_FORMULAVALUE XPRSrow 4 12883 13155 52K XPRScol 4 12883 13155 52K XPRScoef 8 12883 13155 103K XPRSetyp 1 12883 13155 13K CalcStak 24 1 1000 24K XSLP_MEM_CALCSTACK XPRSrhrw 4 1492 1494 6K XPRSrhel 8 1492 1494 12KUsed Items is the number of items actually in use; Max Items is the number currently allocated, which is reflected in the Allocated Memory figure. Where there is an option to change the size of the allocation, the name of the memory control parameter is given. So, for example, to set the initial size of the Xrows array to 1650, use the following:
XSLPsetintcontrol(Prob, XSLP_MEM_XROW, 1650);This will have two effects: the array will be allocated from the start with 1650 items, so there will be no need to expand the array as items are loaded or created; the array will be large enough to hold the items required but will have less unused space, so there will be more memory available for other arrays if necessary.
The following is a list of the memory control parameters that can be set with an indication of the type of array for which they are used. The current value can be retrieved using XSLPgetintcontrol, or the full set can be listed using XSLPuprintmemory.
String control parameters
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.