The OPTQP Procedure

PROC OPTQP Statement

The following options can be specified in the PROC OPTQP statement.

DATA=SAS-data-set

specifies the input SAS data set. This data set can also be created from a QPS-format flat file by using the SAS macro %MPS2SASD. If neither the DATA= option nor the QPSFILE= options is specified, PROC OPTQP uses the most recently created SAS data set. For more information, see Chapter 17, The MPS-Format SAS Data Set.

DUALITYGAP=delta

specifies the desired relative duality gap, delta element-of[1E–9, 1E–4]. This is the relative difference between the primal and dual objective function values and is the primary solution quality parameter. For more information, see the section Interior Point Algorithm: Overview. The default value is 1E–6.

DUALOUT=SAS-data-set
DOUT=SAS-data-set

specifies the output data set to contain the dual solution. For more information, see the section Output Data Sets.

DUALTOL=beta
OPTTOL=beta

specifies the maximum relative dual constraints violation, beta element-of[1E–9, 1E–4]. For more information, see the section Interior Point Algorithm: Overview. The default value is 1E–6.

FORMAT=FREE | FIXED

specifies the format of the QPS file that is specified in the QPSFILE= option. You can specify the following values:

FREE

specifies that the fields of a data record are separated by a space.

FIXED

specifies that each field of a data record occurs in specific columns.

This option is used only when the QPSFILE= option is specified. For more information about the free and fixed formats of QPS-format files, see Chapter 17, The MPS-Format SAS Data Set.

By default, FORMAT=FREE.

IIS=FALSE bar TRUE

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

FALSE

disables IIS detection.

TRUE

enables IIS detection.

If an IIS is found, information about infeasible constraints or variable bounds is written to the data sets that are specified in the DUALOUT= and PRIMALOUT= options. For more information, see the section Irreducible Infeasible Set. By default, IIS=FALSE.

LOGFREQ=k
PRINTFREQ=k

prints the solution progress to the iteration log after every k iterations, where k is an integer between 0 and the largest four-byte, signed integer, which is 2 Superscript 31 Baseline minus 1. The value k = 0 suppresses printing of the progress of the solution. By default, LOGFREQ=1.

LOGLEVEL=NONE bar BASIC bar MODERATE bar AGGRESSIVE
PRINTLEVEL2=NONE bar BASIC bar MODERATE bar AGGRESSIVE

controls the amount of information displayed in the SAS log. You can specify the following values:

NONE

turns off all solver-related messages in the SAS log.

BASIC

displays a solver summary after stopping.

MODERATE

prints a solver summary and an iteration log by using the interval specified in the LOGFREQ= option.

AGGRESSIVE

prints a detailed solver summary and an iteration log by using the interval specified in the LOGFREQ= option.

By default, LOGLEVEL=MODERATE.

MAXITER=k

specifies the maximum number of predictor-corrector iterations performed by the interior point algorithm (see the section Interior Point Algorithm: Overview). The value k is an integer between 1 and the largest four-byte, signed integer, which is 2 Superscript 31 Baseline minus 1. If you do not specify this option, the procedure does not stop based on the number of iterations performed.

MAXTIME=t

specifies an upper limit of t seconds of time for reading in the data and performing the optimization process. The value of the TIMETYPE= option determines the type of units used. If you do not specify this option, the procedure 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.

NTHREADS=k
NUMTHREADS=k

specifies the number of threads that PROC OPTQP can use, where k can be any integer between 1 and 256, inclusive. This option overrides the THREADS | NOTHREADS SAS system option. The default value of this option is the value of the CPUCOUNT= SAS system option.

Specifying k as a number greater than the actual number of available cores might result in reduced performance. Specifying a high value for k does not guarantee shorter solution time; the actual change in solution time depends on the computing hardware and the scalability of the underlying algorithms in PROC OPTQP. In some circumstances, PROC OPTQP might use fewer than k threads because the procedure’s internal algorithms have determined that a smaller number is preferable.

OBJSENSE=MIN bar MAX

specifies whether the QP model is a minimization or maximization problem. You can specify the following values:

MIN

treat the QP model as a minimization problem.

MAX

treat the QP model as a maximization problem.

Alternatively, you can specify the objective sense in the input data set; for more information, see the section ROWS Section. This option supersedes any objective sense that is specified in the input data set. If the objective sense is not specified anywhere, then PROC OPTQP interprets and solves the quadratic program as a minimization problem.

PARALLELMODE=DETERMINISTIC bar NONDETERMINISTIC

specifies the parallel processing mode. This mode determines the solution results that are obtained from running the same model with the same option values on the same platform multiple times. You can specify the following values:

DETERMINISTIC

requires algorithms to produce the same results every time.

NONDETERMINISTIC

permits algorithms to produce different solution results. This mode requires less synchronization and might attain better performance than DETERMINISTIC mode.

By default, PARALLELMODE=DETERMINISTIC.

PRESOLVER=AUTOMATIC bar NONE bar BASIC bar MODERATE bar AGGRESSIVE
PRESOL=AUTOMATIC bar NONE bar BASIC bar MODERATE bar AGGRESSIVE

specifies the presolve level. You can specify the following values:

AUTOMATIC

applies the presolver by using default setting.

NONE

disables the presolver.

BASIC

applies the basic presolver.

MODERATE

applies the moderate presolver.

AGGRESSIVE

applies the aggressive presolver.

By default, PRESOLVER=AUTOMATIC.

PRIMALOUT=SAS-data-set
POUT=SAS-data-set

specifies the output data set to contain the primal solution. For more information, see the section Output Data Sets.

PRIMALTOL=alpha
FEASTOL=alpha

specifies the maximum relative bound and primal constraints violation, alpha element-of[1E–9, 1E–4]. For more information, see the section Interior Point Algorithm: Overview. The default value is 1E–6.

PRINTLEVEL=0 bar 1 bar 2

specifies whether to print summary Output Delivery System (ODS) tables of the problem and solution. You can specify the following values:

0

does not produce or print any ODS tables.

1

produces and prints the following ODS tables: ProblemSummary, SolutionSummary, and optional OutputCasTables.

2

produces and prints the following ODS tables: ProblemSummary, SolutionSummary, ProblemStatistics, Timing, and optional OutputCasTables.

For more information about the ODS tables that PROC OPTQP creates, see the section ODS Tables. By default, PRINTLEVEL=1.

QPSFILE=string
MPSFILE=string

specifies the input QPS-format file that corresponds to the QP model. This option cannot be used with the DATA= option. If neither the DATA= option nor the QPSFILE= options is specified, PROC OPTQP uses the most recently created SAS data set.

TIMETYPE=CPU bar REAL

specifies whether CPU time or real time is used for the MAXTIME= option and the _OROPTQP_ macro variable in a PROC OPTQP call. You can specify the following values:

CPU

specifies that units are in CPU time.

REAL

specifies that units are in real time.

The default value of the TIMETYPE= option depends on the value of the NTHREADS= option.

If you specify a value greater than 1 for the NTHREADS= option, the default value of the TIMETYPE= option is REAL. If you specify a value of 1 for the NTHREADS= option, the default value of the TIMETYPE= option is CPU.

Last updated: April 14, 2021