The Nonlinear Programming Solver

NLP Solver Options

This section describes the options that are recognized by the NLP solver. These options can be specified after a forward slash (/) in the SOLVE statement, provided that the NLP solver is explicitly specified using a WITH clause.

Covariance Matrix Options

COVEST=(suboptions)

requests that the NLP solver produce a covariance matrix. When this option is applied, the following PROC OPTMODEL options are automatically set: PRESOLVER=NONE and SOLTYPE=0. For more information, see the section Covariance Matrix.

You can specify the following suboptions:

ASINGULAR=asing

specifies an absolute singularity criterion for measuring the singularity of the Hessian and crossproduct Jacobian and their projected forms, which might have to be inverted to compute the covariance matrix. The value of asing can be any number between the machine precision and the largest positive number representable in your operating environment. The default is the square root of the machine precision. For more information, see the section Covariance Matrix.

COV=number | string

specifies one of six formulas for computing the covariance matrix. The formula that is used depends on the type of objective (MIN or LSQ) that is specified. Table 2 describes the valid values for this option and their corresponding formulas, where nterms is the value of the NTERMS= option and MIN, LSQ, and other symbols are defined in the section Covariance Matrix.

Table 2: Values for COV= Option

number string MIN Objective LSQ Objective
1 M left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper G Superscript negative 1 Baseline upper J upper J left-parenthesis f right-parenthesis upper G Superscript negative 1 left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper G Superscript negative 1 Baseline upper V upper G Superscript negative 1
2 H left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper G Superscript negative 1 sigma squared upper G Superscript negative 1
3 J left-parenthesis 1 slash d right-parenthesis upper W Superscript negative 1 sigma squared upper J upper J left-parenthesis f right-parenthesis Superscript negative 1
4 B left-parenthesis 1 slash d right-parenthesis upper G Superscript negative 1 Baseline upper W upper G Superscript negative 1 sigma squared upper G Superscript negative 1 Baseline upper J upper J left-parenthesis f right-parenthesis upper G Superscript negative 1
5 E left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper J upper J left-parenthesis f right-parenthesis Superscript negative 1 left-parenthesis 1 slash d right-parenthesis upper V Superscript negative 1
6 U left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper W Superscript negative 1 Baseline upper J upper J left-parenthesis f right-parenthesis upper W Superscript negative 1 left-parenthesis sans-serif-italic nterms slash d right-parenthesis upper J upper J left-parenthesis f right-parenthesis Superscript negative 1 Baseline upper V upper J upper J left-parenthesis f right-parenthesis Superscript negative 1


For MAX type problems, the covariance matrix is converted to MIN type by using negative Hessian, Jacobian, and function values in the computation. For more information, see the section Covariance Matrix.

By default, COV=2.

COVOUT=parameter

specifies the name of the parameter that contains the output covariance matrix. Because a covariance matrix is symmetric, you should declare the covariance matrix as either a lower-triangular matrix or a square matrix with indexes starting from 1. For example:

num mycov{i in 1..N, j in 1..i};   /* a  lower triangular matrix */

or

num mycov{i in 1..N, j in 1..N};   /* a square matrix */

where N is the number of variables.

Depending on the type of output covariance matrix, the solver updates either the lower-triangular matrix or the full square matrix. If you declare the covariance matrix as neither a lower-triangular matrix nor a square matrix, or if the indexes do not start from 1, the NLP solver issues an error message. You can use the CREATE DATA statement to output the results to a SAS data set. For more information, see the section Covariance Matrix.

COVSING=covsing

specifies a threshold, sans-serif-italic covsing greater-than 0, that determines whether to consider the eigenvalues of a matrix to be 0. The value of covsing can be any number between the machine precision and the largest positive number representable in your operating environment. The default is set internally by the algorithm. For more information, see the section Covariance Matrix.

MSINGULAR=msing

specifies a relative singularity criterion sans-serif-italic msing greater-than 0 for measuring the singularity of the Hessian and crossproduct Jacobian and their projected forms. The value of msing can be any number between machine precision and the largest positive number representable in your operating environment. The default is 1E–12. For more information, see the section Covariance Matrix.

NDF=ndf

specifies a number to be used in calculating the divisor d, which is used in calculating the covariance matrix when VARDEF=DF. The value of ndf can be any positive integer up to the largest four-byte signed integer, which is 2 Superscript 31 Baseline minus 1. The default is the number of optimization variables in the objective function. For more information, see the section Covariance Matrix.

NTERMS=nterms

specifies a number to be used in calculating the scale factor for the covariance matrix, as shown in Table 2. The value of nterms can be any positive integer up to the largest four-byte signed integer, which is 2 Superscript 31 Baseline minus 1. The default is the number of nonconstant terms in the objective function. For more information, see the section Covariance Matrix.

SIGSQ=sq

specifies a real scalar factor, sans-serif-italic sq greater-than 0, for computing the covariance matrix. The value of sq can be any number between the machine precision and the largest positive number representable in your operating environment. For more information, see the section Covariance Matrix.

VARDEF=DF | N

controls how the divisor d is calculated. This divisor is used in calculating the covariance matrix and approximate standard errors. The value of d also depends on the values of the NDF= and NTERMS= options, ndf and nterms, respectively, as follows:

d equals StartLayout Enlarged left-brace 1st Row 1st Column max left-parenthesis 1 comma sans-serif-italic nterms minus sans-serif-italic ndf right-parenthesis 2nd Column for VARDEF equals DF 2nd Row 1st Column sans-serif-italic nterms 2nd Column for VARDEF equals upper N EndLayout

By default, VARDEF=DF if the SIGSQ= option is not specified; otherwise, by default VARDEF=N. For more information, see the section Covariance Matrix.

Miscellaneous Option

SEED=N

specifies a positive integer to be used as the seed for generating random number sequences. You can use this option to replicate results from different runs.

Multistart Options

MULTISTART=(suboptions)
MS=(suboptions)

enables multistart mode. In this mode, the local solver solves the problem from multiple starting points, possibly finding a better local minimum as a result. This option is disabled by default. For more information about multistart mode, see the section Multistart.

You can specify the following suboptions:

BNDRANGE=M

defines the range from which each variable can take values during the sampling process. This option affects only the sampling process that determines starting points for the local solver. It does not affect the bounds of the original nonlinear optimization problem. More specifically, if the ith variable x Subscript i has lower and upper bounds script l Subscript i and u Subscript i, respectively (that is, script l Subscript i Baseline less-than-or-equal-to x Subscript i Baseline less-than-or-equal-to u Subscript i), then an initial point is generated by a sampling process as follows:

For each sample point x, the ith coordinate x Subscript i is generated so that the following bounds hold, where x Subscript i Superscript 0 is the default starting point or a specified starting point:

StartLayout 1st Row 1st Column l Subscript i Baseline less-than-or-equal-to x Subscript i Baseline less-than-or-equal-to u Subscript i Baseline 2nd Column if l Subscript i Baseline and u Subscript i Baseline are both finite 2nd Row 1st Column l Subscript i Baseline less-than-or-equal-to x Subscript i Baseline less-than-or-equal-to l Subscript i Baseline plus upper M 2nd Column if only l Subscript i Baseline is finite 3rd Row 1st Column u Subscript i Baseline minus upper M less-than-or-equal-to x Subscript i Baseline less-than-or-equal-to u Subscript i Baseline 2nd Column if only u Subscript i Baseline is finite 4th Row 1st Column x Subscript i Superscript 0 Baseline minus upper M slash 2 less-than-or-equal-to x Subscript i Baseline less-than-or-equal-to x Subscript i Superscript 0 Baseline plus upper M slash 2 2nd Column otherwise EndLayout

The default value is 200 in a shared-memory computing environment and 1,000 in a distributed computing environment.

DISTTOL=epsilon

defines the tolerance by which two optimal points are considered distinct. Optimal points are considered distinct if the Euclidean distance between them is at least epsilon. The default is 1.0E–6.

LOGLEVEL=number
PRINTLEVEL=number

defines the amount of information that the multistart algorithm displays in the SAS log. Table 3 describes the valid values of this suboption.

Table 3: Values for LOGLEVEL= Suboption

number Description
0 Turns off all solver-related messages to SAS log
1 Displays multistart summary information when the algorithm terminates
2 Displays multistart iteration log and summary information when the algorithm terminates
3 Displays the same information as LOGLEVEL=2 and might display additional information


By default, LOGLEVEL=2.

MAXTIME=T

defines the maximum allowable time T (in seconds) for the NLP solver to locate the best local optimum in multistart mode. The value of the TIMETYPE= option determines the type of units that are used. The time that is specified by the MAXTIME= suboption is checked only once after the completion of the local solver. Because the local solver might be called many times, the maximum time that is specified for multistart is recommended to be greater than the maximum time specified for the local solver. If you do not specify this option, the multistart algorithm does not stop based on the amount of time elapsed.

MAXSTARTS=N

defines the maximum number of starting points to be used for local optimization. That is, there will be no more than N local optimization calls in the multistart algorithm. You can specify N to be any nonnegative integer. When N = 0, the algorithm uses the default value of this option. The default value is 100 in a shared-memory computing environment. In a distributed computing environment, the default value is usually greater than 100 and proportional to the number of grid nodes.

SAMPLINGMETHOD=keyword

defines the probability distribution to be used by the multistart algorithm in the sampling process. The starting points of local optimization are selected from among the generated sample points. The following keywords are valid:

NORMAL bar GAUSSIAN

uses a normal distribution to generate sample points.

UNIFORM

uses a uniform distribution to generate sample points.

By default, SAMPLINGMETHOD=UNIFORM.

Optimization Options

ALGORITHM=keyword
TECHNIQUE=keyword
TECH=keyword
SOLVER=keyword

specifies the optimization technique to be used to solve the problem. The following keywords are valid:

INTERIORPOINT

uses a primal-dual interior point method. This technique is recommended for both small- and large-scale nonlinear optimization problems. This is the preferred solver if the problem includes a large number of inactive constraints.

IPDIRECT

uses a primal-dual interior point augmented Lagrangian method. The use of direct factorizations and other enhancements can reduce both the number of iterations and the CPU time for many problem types. This method is also called the interior point direct algorithm in this chapter.

ACTIVESET

uses a primal-dual active-set method. This technique is recommended for both small- and large-scale nonlinear optimization problems. This is the preferred solver if the problem includes only bound constraints or if the optimal active set can be quickly determined by the solver.

CONCURRENT

runs the INTERIORPOINT and ACTIVESET techniques in parallel, with one thread using the INTERIORPOINT technique and the other thread using the ACTIVESET technique. The solution is returned by the first method that terminates.

By default, ALGORITHM=IPDIRECT, unless the optimization problem has fixed variables and PRESOLVER=NONE; in the latter case, ALGORITHM=INTERIORPOINT.

Output Options

LOGFREQ=N
PRINTFREQ=N

specifies how often the iterations are displayed in the SAS log. N should be an integer between zero and the largest four-byte, signed integer, which is 2 Superscript 31 Baseline minus 1. If upper N greater-than-or-equal-to 1, the solver prints only those iterations that are a multiple of N. If upper N equals 0, no iteration is displayed in the log. The default value is 1.

SOLTYPE=0 bar 1

specifies the type of solution to return:

0

returns a locally optimal solution, provided that the solver locates one.

1

returns the best feasible solution found, provided that its objective value is better than that of the locally optimal solution found.

By default, SOLTYPE=1.

Feasibility-Seeking Options

SEEKFEASIBLE=(suboptions)
SEEKFEAS=(suboptions)

seeks a feasible solution to an optimization problem by reformulating it via relaxation and penalization. For more information about feasibility-seeking options, see the section Feasibility-Seeking Reformulation.

You can specify the following suboptions:

FORMULATION=1 bar 2 bar 3 bar 4

specifies one of the four different formulations. For more information about the four formulations, see the section Feasibility-Seeking Reformulation.

OBJSCALE=rho

specifies the scale factor rho for the objective function.

PENALTYPARM=tau

specifies the penalty parameter tau for the slack variables.

When this option is enabled, the iteration log displays the progress of optimization of the reformulated problem.

Solver Options

FEASTOL=epsilon

defines the feasible tolerance. The solver exits if the constraint violation is less than epsilon and the scaled optimality conditions are less than the value of the OPTTOL= option. By default, FEASTOL=1E–6.

HESSTYPE=BFGS | FULL | LBFGS | PRODUCT | SR1

specifies the type of Hessian for the solver to use:

BFGS

computes a dense quasi-Newton Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian approximation. This option uses the gradient information to build a symmetric, positive-definite approximation of the Hessian matrix. Because this option maintains a dense Hessian approximation, it is recommended for problems that have fewer than 1,000 variables.

FULL

uses a full Hessian. In this case, the algorithm can create a better preconditioner to solve the problem in less CPU time.

LBFGS

uses a limited-memory quasi-Newton BFGS formula to approximate the Hessian matrix. It stores only a limited number of vectors that represent the approximation implicitly, which makes this option more suitable for large-scale problems. The number of vectors that are used to approximate the Hessian is controlled by the LMUPDATESIZE= option.

PRODUCT

uses only Hessian-vector products rather than the full Hessian. When the solver uses only Hessian-vector products to find a search direction, it usually uses much less memory, especially when the problem is large and the Hessian is not sparse. You cannot specify this option when you specify ALGORITHM=IPDIRECT because the IPDIRECT solver needs the full expression of the Hessian matrix.

SR1

uses the gradient information calculated at two points to compute a dense quasi-Newton symmetric rank 1 (SR1) Hessian approximation. Unlike the BFGS approximation, the SR1 update might not guarantee the positive definiteness of the Hessian approximation. Because this option maintains a dense Hessian approximation, it is recommended for problems that have fewer than 1,000 variables.

By default, HESSTYPE=FULL.

IIS=TRUE bar FALSE

specifies whether the NLP solver attempts to identify a set of linear constraints and variables that form an irreducible infeasible set (IIS). You can specify the following values:

TRUE

enables IIS detection. All other NLP solver options are ignored except the following: FEASTOL=, LOGFREQ=, LOGLEVEL=, MAXITER=, MAXTIME=, and TIMETYPE=.

FALSE

disables IIS detection.

By default, IIS=FALSE.

The NLP solver ignores nonlinear constraints, if any, and invokes the LP solver’s algorithm to attempt to identify an IIS. If an IIS is found, information about the infeasibilities can be found in the .status suffix values of the constraints and variables. For more information about the IIS= option, see the section Irreducible Infeasible Set of Chapter 13, The Linear Programming Solver. Also see Example 17.8 for an example that demonstrates the use of the IIS= option of the NLP solver.

INITDUAL=TRUE bar FALSE

specifies whether the initial values of the dual variables are to be used by the solver. You can specify the following values:

TRUE

specifies that the current values of dual variables that are stored in the constraint and variable .dual suffixes, if not empty, be used by the solver.

FALSE

specifies that the current values of dual variables that are stored in the .dual suffixes, even if not empty, be ignored by the solver.

By default, INITDUAL=FALSE.

You can specify the dual values of the constraints and variables by using the .dual suffix in PROC OPTMODEL. The use of the suffix .dual is demonstrated in Example 17.4. For more information about suffixes in PROC OPTMODEL, see the section Suffixes in Chapter 9, The OPTMODEL Procedure.

LMUPDATESIZE=number

specifies the number of vector pairs to store when the Hessian matrix is approximated using the limited-memory quasi-Newton Broyden-Fletcher-Goldfarb-Shanno (BFGS) option. This option is used only with HESSTYPE=LBFGS. The valid range for this integer option is between 2 and 100, inclusive. It is recommended that you experiment with different values of the LMUPDATESIZE= option. By default, LMUPDATESIZE=8.

MAXITER=number

specifies that the solver take at most N major iterations to determine an optimum of the NLP problem. The value of N is an integer between zero and the largest four-byte, signed integer, which is 2 Superscript 31 Baseline minus 1. A major iteration in NLP consists of finding a descent direction and a step size along which the next approximation of the optimum resides. The default is 5,000 iterations.

MAXTIME=t

specifies an upper limit of t units of time for the optimization process, including problem generation time and solution time. The value of the TIMETYPE= option determines the type of units used. If you do not specify the MAXTIME= option, the solver does not stop based on the amount of time elapsed. The value of t can be any positive number; the default value is the positive number that has the largest absolute value that can be represented in your operating environment.

NLPTHREADS=number

specifies the number of threads that the interior point direct, interior point, active-set, or concurrent algorithm can use to perform linear algebra operations. When the MULTISTART= option is used, the NLPTHREADS= option is ignored. The value of number must be an integer between 1 and 256, inclusive. By default, NLPTHREADS=1.

NTHREADS=number

specifies the number of threads for the multistart algorithm to use to concurrently start local solves. This option is considered only when the MULTISTART= option is specified. The value of number must be an integer between 1 and 256, inclusive. The default is the value of the NTHREADS= option in PROC OPTMODEL.

OBJLIMIT=M

specifies an upper limit on the magnitude of the objective value. For a minimization problem, the algorithm terminates when the objective value becomes less than –M; for a maximization problem, the algorithm stops when the objective value exceeds M. The algorithm stopping implies that either the problem is unbounded or the algorithm diverges. If optimization were allowed to continue, numerical difficulty might be encountered. The default is M=1Eplus20. The minimum acceptable value of M is 1Eplus8. If the specified value of M is less than 1Eplus8, the value is reset to the default value 1Eplus20.

OPTTOL=epsilon
RELOPTTOL=epsilon

defines the measure by which you can decide whether the current iterate is an acceptable approximation of a local minimum. The value of this option is a positive real number. The NLP solver determines that the current iterate is a local minimum when the norm of the scaled vector of the optimality conditions is less than epsilon and the true constraint violation is less than FEASTOL. The default is epsilon=1E–6.

PRESERVEINIT=number bar string

specifies whether the solver is allowed to shift the user-supplied initial point to be interior to the bounds. Table 4 describes the valid values of the PRESERVEINIT= option.

Table 4: Values for PRESERVEINIT= Option

number string Description
0 OFF Shifts the user-supplied initial point to be interior to the bounds
1 ON Uses the user-supplied initial point without shifting


This option can be used only when calling the INTERIORPOINT algorithm. By default, PRESERVEINIT=OFF.

TIMETYPE=CPU bar REAL

specifies the units of time used by the MAXTIME= option and reported by the PRESOLVE_TIME and SOLUTION_TIME terms in the _OROPTMODEL_ macro variable. Table 5 describes the valid values of the TIMETYPE= option.

Table 5: Values for TIMETYPE= Option

string Description
CPU Specifies units of CPU time
REAL Specifies units of real time


The "Optimization Statistics" table, an output of PROC OPTMODEL if you specify PRINTLEVEL=2 in the PROC OPTMODEL statement, also includes the same time units for Presolver Time and Solver Time. The other times (such as Problem Generation Time) in the "Optimization Statistics" table are also in the same units.

The default value of the TIMETYPE= option is REAL.

Last updated: September 09, 2026