The OPTMODEL Procedure
PROC OPTMODEL Statement
The PROC OPTMODEL statement invokes the OPTMODEL procedure. You can specify options to control how the optimization model is processed and how results are displayed. You can specify the following options (these options can also be specified in the RESET OPTIONS statement).
-
CDIGITS=number
NLCDIGITS=number -
specifies the expected number of decimal digits of accuracy for nonlinear constraints, where number is any positive number, including fractions. PROC OPTMODEL uses this option to choose a step length when numeric derivative approximations are required to evaluate the Jacobian of nonlinear constraints. The default value depends on your operating environment. It is assumed that constraint values are accurate to the limits of machine precision.
For more information about numeric derivative approximations, see the section Automatic Differentiation.
- ERRORLIMIT=number | NONE
-
specifies the maximum number of error messages that can be displayed during SOLVE statement processing. Specifying a value of number in the range 1 to
sets a specific limit. Specifying ERRORLIMIT=NONE removes any existing limit. The default value is 10.
Note: Some errors abort processing immediately.
-
FD=FORWARD | CENTRAL
FINITEDIFF=FORWARD | CENTRAL -
specifies the method to use to approximate numeric derivatives when analytic derivatives are unavailable. Most solvers require the derivatives of the objective and constraints. You can specify the following values:
- FORWARD
uses forward differences.
- CENTRAL
uses central differences.
By default, FD=FORWARD. For more information about numeric derivative approximations, see the section Automatic Differentiation.
-
FDIGITS=number
OBJDIGITS=number -
specifies the expected number of decimal digits of accuracy for the objective function, where number is any positive number, including fractions. PROC OPTMODEL uses this option to choose a step length when numeric derivatives are required. The default value depends on your operating environment. It is assumed that objective function values are accurate to the limits of machine precision.
For more information about numeric derivative approximations, see the section Automatic Differentiation.
-
FORCEFD=NONE | OBJ | CON | ALL
FORCEFINITEDIFF=NONE | OBJ | CON | ALL -
forces PROC OPTMODEL to use finite differences instead of analytic derivatives for the specified set of nonlinear expressions. This option can be useful with FCMP functions to provide more control over derivative computation. You can specify the following values:
- ALL
restricts all derivative computations to use finite differences.
- CON
restricts derivative computations for the nonlinear constraint expressions and any IMPVAR expressions they reference to use finite differences.
- NONE
requests analytic derivatives where they are available.
- OBJ
restricts derivative computations for the objective and any IMPVAR expressions it references to use finite differences.
By default, FORCEFD=NONE.
- FORCEPRESOLVE=number | string
-
specifies whether PROC OPTMODEL can use the OPTMODEL presolver with the CLP, conic, LP, MILP, and QP solvers. By default, the OPTMODEL presolver is disabled when PROC OPTMODEL solves linear problems or problems with predicates, or when you specify the CLP, conic, LP, MILP, or QP solver in the SOLVE statement. Table 4 shows the valid values for this option.
Table 4: Values for the FORCEPRESOLVE= Option
number string Description 0 FALSE Restores the default behavior 1 TRUE Enables PROC OPTMODEL to use the OPTMODEL presolver when the CLP, conic, LP, MILP, or QP solver is specified in the SOLVE statement
By default, FORCEPRESOLVE=0.
- INITVAR
- INITVAR=TRUE | FALSE
-
specifies whether to pass initial values for variables to the solver when the SOLVE statement is executed. The CLP, conic, LP, and QP solvers always ignore initial values. The NLP solver attempts to use specified initial values. The black-box and MILP solvers use initial values only if you specify the PRIMALIN option.
You can specify the following values:
- TRUE
passes the current variable values.
- FALSE
invokes the solver without any specific initial values for variables.
By default, INITVAR=TRUE.
- INTFUZZ=number
specifies the tolerance for rounding the bounds on integer and binary variables to integer values. Bounds that differ from an integer by at most number are rounded to that integer. Otherwise, lower bounds are rounded up to the next greater integer and upper bounds are rounded down to the next lesser integer. The value of number can range between 0 and 0.5. The default value is 0.00001.
-
MAXLABLEN=number
MAXLABELLEN=number specifies the maximum length for MPS row and column labels, where number is an integer from 8 to 256, inclusive. This option can also be used to control the length of row and column names that are displayed by solvers, such as those found in the LP solver iteration log. See also the description of the
.labelsuffix in the section Suffixes. By default, MAXLABLEN=32.- MISSCHECK
- MISSCHECK=TRUE | FALSE
-
specifies whether to perform detailed checking of missing values in expressions. You can specify the following values:
- TRUE
produces a message each time PROC OPTMODEL evaluates an arithmetic operation or function that has missing value operands (except when the operation or function specifically supports missing values). This value can increase processing time.
- FALSE
turns off the detailed reporting.
By default, MISSCHECK=FALSE.
-
MSGLIMIT=number | NONE
MESSAGELIMIT=number | NONE -
specifies the maximum number of messages about certain issues that can be displayed during processing of a single top-level statement, such as a SOLVE or FOR statement. Specifying a value of number in the range 0 to
sets a specific limit. Specifying MSGLIMIT=NONE removes any existing limit. The default value is 25.
The limit is applied to notes and warnings for the following issues:
arithmetic evaluation issues, such as division by zero
function evaluation issues, such as invalid arguments
problem generation and PROC OPTMODEL presolver issues
duplicate members in set constructor and literal expressions
string concatenation results truncated to the maximum string length
duplicate READ DATA keys
truncated data set column labels for the CREATE DATA statement
misspelled keywords for an option value specified using a string expression
unrecognized file specifications in the CLOSEFILE statement
Note: Because of complications of concurrent execution, PROC OPTMODEL might display more or fewer messages than the limit when you use a COFOR statement.
- NLCDIGITS=number
is an alias for the CDIGITS= option.
- NOINITVAR
- NOMISSCHECK
-
NTHREADS=number
NUMTHREADS=number specifies the maximum number of threads to use for threaded processing, where number must be an integer between 1 and 256, inclusive. Problem generation and many of the solvers can take advantage of threaded processing. The default depends on the execution environment. When the distributed computing environment is used, the default is the maximum number of threads that are allowed on each computing node. Otherwise the default depends on the SAS system options CPUCOUNT= and THREADS. For more information, see the section Threaded and Distributed Processing.
- OBJDIGITS=number
is an alias for the FDIGITS= option.
-
PDIGITS=number
PRINTDIGITS=number requests that the PRINT statement display number significant digits for numeric columns for which no format is specified. The value can range from 1 to 9. By default, PDIGITS=5.
-
PMATRIX=number
PRINTMATRIX=number adjusts the density evaluation of a two-dimensional array to affect how it is displayed, where number can be any nonnegative value. The value number scales the total number of nonempty array elements and is used by the PRINT statement to evaluate whether a two-dimensional array is "sparse" or "dense." Tables that contain a single two-dimensional array are printed in list form if they are sparse and in matrix form if they are dense. If number < 1, the list form is used in more cases. If number > 1, the matrix form to be used in more cases. If number = 0, the list form is always used. For more information, see the section PRINT Statement. By default, PMATRIX=1.
- PRESOLVER=number | string
-
specifies the type of presolve that the OPTMODEL presolver performs. Table 5 shows the valid values of this option.
Table 5: Values for the PRESOLVER= Option
number string Description –1 AUTOMATIC Applies presolver using default setting 0 NONE Disables presolver 1 BASIC Performs minimal processing, only substituting fixed variables and removing empty feasible constraints 2 MODERATE Applies a higher level of presolve processing 3 AGGRESSIVE Applies the highest level of presolve processing
The OPTMODEL presolver tightens variable bounds and eliminates redundant constraints. In general, this tightening improves the performance of any solver. Higher levels of presolve processing allow more tightening and substitution passes, but might take more time to execute. The AUTOMATIC option is intermediate between the MODERATE and AGGRESSIVE levels.
Note: The OPTMODEL presolver is normally bypassed when PROC OPTMODEL uses the CLP, conic, LP, MILP, network, or QP solver and when the SAVE MPS and SAVE QPS statements are executed. The FORCEPRESOLVE= option enables the OPTMODEL presolver to be used with the CLP, conic, LP, MILP, and QP solvers. PROC OPTMODEL always bypasses the OPTMODEL presolver when you specify certain solver options. For more information, see the chapter for the relevant solver in this book.
-
PRESTOL=number
PRESOLVETOL=number specifies a tolerance (where number can range between 0 and 0.1) so that slightly infeasible constraints can be eliminated by the PROC OPTMODEL presolver. If the magnitude of the infeasibility is no greater than
, where X is the value of the original bound, then the empty constraint is removed from the presolved problem. PROC OPTMODEL’s presolver does not print messages about infeasible constraints and variable bounds when the infeasibility is within the tolerance that is specified by number. The default value is 1E–12.
- PRINTLEVEL=number
-
controls the level of listing output during a SOLVE or COFOR command. The Output Delivery System (ODS) tables printed at each level are listed in Table 6. Some solvers can produce additional tables; see the individual solver chapters for more information.
Table 6: Values for the PRINTLEVEL= Option
number Description 0 Disables all tables 1 Prints Problem Summary and Solution Summary 2 Prints Problem Summary, Solution Summary, Methods of Derivative Computation (for NLP solvers), Solver Options, Optimization Statistics, Timing, and solver-specific ODS tables
For more information about the ODS tables produced by PROC OPTMODEL, see the section ODS Table and Variable Names.
-
PWIDTH=number
PRINTWIDTH=number sets the width that is used by the PRINT statement to display numeric columns when no format is specified. The smallest value number can take is the value of the PDIGITS= option plus 7; the largest value number can take is 16. The default value is equal to the value of the PDIGITS= option plus 7.
- SESSREF=string | "string"
specifies the name of the CAS session to use for distributed computing. The string specifies a session name that is defined by the SAS CAS statement. You must specify either the SESSREF= or SESSUUID= option in order to use distributed computing.
- SESSUUID="string"
specifies the universal unique identifier (UUID) of the CAS session to use for distributed computing. The string specifies the UUID text. The UUID for a CAS session can be determined through various methods, such as by using the LISTSESSIONS option in the SAS CAS statement. You must specify either the SESSUUID= or SESSREF= option in order to use distributed computing.
- VARFUZZ=number
specifies the smallest difference that is permitted by the OPTMODEL presolver between the upper and lower bounds of an unfixed variable. If the difference is smaller than number, then the variable is fixed to the average of the upper and lower bounds before it is presented to the solver. Any nonnegative value can be assigned to number; the default value is 0.