Optimization Action Set
Provides actions for solving optimization problems
runOptmodel Action
Runs OPTMODEL code.
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the input data table that contains the BY groups to process. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table to contain the result status from processing each BY group. |
Parameter Descriptions
* code="string"
specifies the OPTMODEL modeling language code to run.
errorLimit=64-bit-integer | "ALL"
specifies the maximum number of error messages to display during processing of the SOLVE statement.
| Default | 10 |
|---|---|
| ALL | removes the error message limit. |
finiteDiff="CENTRAL" | "FORWARD"
forceFiniteDiff="ALL" | "CON" | "NONE" | "OBJ"
forces derivative computations to use finite differences instead of analytic derivatives for nonlinear equations.
| Alias | forceFD |
|---|---|
| Default | NONE |
forcePresolve=TRUE | FALSE
when set to True, enables the OPTMODEL presolver for use with the CLP, LP, MILP, and QP solvers. By default, the OPTMODEL presolver is disabled for linear problems or problems that have predicates or when the CLP, LP, MILP, or QP solver is specified in the SOLVE statement.
| Default | FALSE |
|---|
groupBy={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the variables to use for grouping results.
For more information about specifying the groupBy parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
groupByIn={castable}
specifies the input data table that contains the BY groups to process.
| Long form | groupByIn={name="table-name"} |
|---|---|
| Shortcut form | groupByIn="table-name" |
The castable value can be one or more of the following:
caslib="string"
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
computedOnDemand=TRUE | FALSE
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
computedVars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
computedVarsProgram="string"
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
groupBy={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the variables to use for grouping results.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the input table.
vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the input data.
whereTable={groupbytable}
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
casLib="string"
specifies the caslib for the filter table. By default, the active caslib is used.
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the filter table.
vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the data from the filter table.
groupByRaw=TRUE | FALSE
when set to True, matches the rows for a BY group on both the formatted and unformatted values of BY variables. When the parameter is set to False, the rows for a BY group are matched using only the formatted values.
| Default | FALSE |
|---|
initVar=TRUE | FALSE
when set to True, passes initial values for variables to the solver in the SOLVE statement.
| Default | TRUE |
|---|
intFuzz=double
specifies the tolerance for rounding the bounds on integer and binary variables to integer values.
| Default | 1E-05 |
|---|---|
| Range | 0–0.5 |
maxLabelLen=integer
specifies the maximum length (in bytes) for row and column labels that are stored by the SAVE MPS and SAVE QPS statements. This parameter also controls the length of row and column names that are displayed by solvers.
| Alias | maxLabLen |
|---|---|
| Default | 32 |
| Range | 8–256 |
messageLimit=64-bit-integer | "NONE"
specifies the maximum number of non-error diagnostic messages to display while processing a single top-level statement. This parameter applies to notes and warning messages that diagnose various issues during problem generation and execution; it does not apply to messages that are normally always produced, such as in solver logs.
| Alias | msgLimit |
|---|
| Default | 25 |
|---|---|
| NONE | removes the message limit. |
missCheck=TRUE | FALSE
when set to True, performs detailed checking of missing values in expressions and produces a message each time an arithmetic operation or function that has missing value operands is evaluated (except when the operation or function specifically supports missing values).
| Default | FALSE |
|---|
nGroupByTasks=integer | "ALL"
specifies the number of tasks to use on each worker node for OPTMODEL language processing of BY groups.
| Default | 1 |
|---|---|
| ALL | uses all available threads for OPTMODEL language processing tasks. |
nlcDigits=integer
specifies the number of decimal digits of nonlinear constraint accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that constraints are accurate to the limits of machine precision.
| Alias | cDigits |
|---|---|
| Range | 0–60 |
nSubsessionWorkers=integer
specifies the number of worker nodes to be used by each subsession for CASL evaluation.
| Aliases | nSubWorkers |
|---|---|
| nWorkersPerEval | |
| Default | 1 |
| Minimum value | 1 |
nThreads=integer
specifies the number of threads to use. Setting this parameter to a number greater than the actual number of available cores might hurt performance. Specifying a high value for this parameter does not guarantee a shorter solution time; the actual change in solution time depends on the computing hardware and the scalability of the underlying algorithms in the specified action. In some circumstances, an action might use fewer threads than the specified value of this parameter because the action's internal algorithms determine that a smaller number is preferable. The default is the number of cores on the machine that executes the process or the number of cores permissible based on your installation (whichever is less). The number of simultaneously active CPUs is limited by your installation and license configuration.
| Alias | numThreads |
|---|---|
| Range | 1–256 |
objDigits=integer
specifies the number of decimal digits of objective function accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that objectives are accurate to the limits of machine precision.
| Alias | fDigits |
|---|---|
| Range | 0–60 |
presolver="AGGRESSIVE" | "AUTOMATIC" | "BASIC" | "MODERATE" | "NONE"
presolveTol=double
provides a tolerance such that constraints whose infeasibility is less than the value of this parameter can be eliminated by the OPTMODEL presolver.
| Alias | presTol |
|---|---|
| Default | 1E-12 |
| Range | 0–0.1 |
printDigits=integer
specifies the number of significant digits for the PRINT statement to display for numeric columns when no format is specified.
| Alias | pDigits |
|---|---|
| Default | 5 |
| Range | 1–9 |
printLevel=integer
specifies the amount of information to return.
| Default | 1 |
|---|---|
| Range | 0–2 |
printMatrix=double
adjusts the density evaluation of a two-dimensional array to affect how it is displayed. The value of this parameter scales the total number of nonempty array elements and is used by the PRINT statement to determine whether to use a sparse list format (one row per element) or dense matrix format.
| Alias | pMatrix |
|---|---|
| Default | 1 |
| Minimum value | 0 |
printWidth=integer
specifies the width used by the PRINT statement for display of numeric columns when no format is specified. By default, the width is equal to the value of the printDigits parameter plus 7.
| Alias | pWidth |
|---|---|
| Range | 1–16 |
statusOut={casouttable}
specifies the output data table to contain the result status from processing each BY group.
For more information about specifying the statusOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
varFuzz=double
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 the value of this parameter, then the variable is fixed to the average of the upper and lower bounds before it is presented to the solver.
| Default | 0 |
|---|---|
| Minimum value | 0 |
Result Descriptions
absObjGap
indicates the absolute gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The absolute gap is equal to the absolute difference between BestInteger and BestBound. The result is a double. You can access the value from results.absObjGap.
algorithm
indicates the algorithm used by the solver. The result is a string. You can access the value from results.algorithm.
bestBound
indicates the best bound on the objective function value at termination. A missing value indicates that no such bound is available. The result is a double. You can access the value from results.bestBound.
boundInf
indicates the maximum (absolute) violation by the solution of the lower or upper bounds. The result is a double. You can access the value from results.boundInf.
complementarity
indicates the scalar product of the primal solution array and the reduced cost array. The result is a double. You can access the value from results.complementarity.
dualInf
indicates the maximum (absolute) violation of the dual constraints by the solution. The result is a double. You can access the value from results.dualInf.
dualityGap
indicates the difference between the primal and dual objective values at termination. The result is a double. You can access the value from results.dualityGap.
infeasibility
indicates the level of infeasibility of the constraints at the solution. This value is included for the black-box and NLP solvers. The result is a double. You can access the value from results.infeasibility.
integerInf
indicates the maximum (absolute) violation of the integrality of integer variables returned at termination. The result is a double. You can access the value from results.integerInf.
numArticulationPoints
indicates the number of articulation points found. This term appears only for biconnected components. The result is an integer. You can access the value from results.numArticulationPoints.
numCliques
indicates the number of cliques found. This term appears only for network clique problems. The result is an integer. You can access the value from results.numCliques.
numComponents
indicates the number of components that match the definitions of the corresponding network problem class. This term appears only for connected components and biconnected components. The result is an integer. You can access the value from results.numComponents.
numCycles
indicates the number of cycles found that satisfy the criteria you specify. This term appears only for network cycle problems. The result is an integer. You can access the value from results.numCycles.
numDistinctOptima
indicates the number of distinct local optima that the solver finds. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numDistinctOptima.
numEvals
indicates the total number of black-box solver evaluations that were not cached. The result is an integer. You can access the value from results.numEvals.
numIterations
indicates the number of iterations used to solve the problem. The result is an integer. You can access the value from results.numIterations.
numIterations2
indicates the number of simplex iterations used in the second stage. This can be either the crossover part after an interior-point solve, or the primal or dual simplex part after a network simplex solve. The result is an integer. You can access the value from results.numIterations2.
numNodes
indicates the number of nodes enumerated when the branch-and-bound algorithm is used. The result is an integer. You can access the value from results.numNodes.
numParetoPoints
indicates the number of nondominated solutions in the Pareto-optimal set. This value is included only for multiobjective optimization with the black-box solver. The result is an integer. You can access the value from results.numParetoPoints.
numPaths
indicates the number of paths that are found to satisfy the criteria you specify. This term appears only for network path and shortest path problems. The result is a 64-bit integer. You can access the value from results.numPaths.
numSamplePoints
indicates the number of points that are evaluated in the sampling phase. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numSamplePoints.
numSolutions
indicates the number of solutions found. This value is returned by the CLP and MILP solvers. The result is an integer. You can access the value from results.numSolutions.
numStarts
indicates the number of starting points. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numStarts.
objective
indicates the objective value obtained by the solver at termination. The value is missing when a problem has multiple objectives or does not have an objective. The result is a double. You can access the value from results.objective.
optimalityError
indicates the norm of the optimality conditions at the solution. This value is included for the NLP solver. The result is a double. You can access the value from results.optimalityError.
presolveTime
indicates the time (in seconds) used by the presolver. The result is a double. You can access the value from results.presolveTime.
primalInf
indicates the maximum (absolute) violation of the primal constraints by the solution. The result is a double. You can access the value from results.primalInf.
problemType
indicates the type of network problem solved. The result is a string. You can access the value from results.problemType.
progress
indicates the progress that the solver made during the last iteration. This value is included only for multiobjective optimization with the black-box solver. The result is a double. You can access the value from results.progress.
relObjGap
indicates the relative gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The relative objective gap is equal to the absolute difference of these two values divided by the absolute value of the BestBound. Zero division is avoided by adding 1E-10. The result is a double. You can access the value from results.relObjGap.
seed
indicates the seed value that is used to initialize the solver. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.seed.
solutionStatus
indicates the solution status at solver termination. The result is a string. You can access the value from results.solutionStatus.
solutionTime
indicates the time (in seconds) used to solve the problem, including the presolver time. The result is a double. You can access the value from results.solutionTime.
status
indicates the processing status at termination. The result is a string. You can access the value from results.status.
runOptmodel Action
Runs OPTMODEL code.
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the input data table that contains the BY groups to process. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table to contain the result status from processing each BY group. |
Parameter Descriptions
* code="string"
specifies the OPTMODEL modeling language code to run.
errorLimit=64-bit-integer | "ALL"
specifies the maximum number of error messages to display during processing of the SOLVE statement.
| Default | 10 |
|---|---|
| ALL | removes the error message limit. |
finiteDiff="CENTRAL" | "FORWARD"
forceFiniteDiff="ALL" | "CON" | "NONE" | "OBJ"
forces derivative computations to use finite differences instead of analytic derivatives for nonlinear equations.
| Alias | forceFD |
|---|---|
| Default | NONE |
forcePresolve=true | false
when set to True, enables the OPTMODEL presolver for use with the CLP, LP, MILP, and QP solvers. By default, the OPTMODEL presolver is disabled for linear problems or problems that have predicates or when the CLP, LP, MILP, or QP solver is specified in the SOLVE statement.
| Default | false |
|---|
groupBy={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the variables to use for grouping results.
For more information about specifying the groupBy parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
groupByIn={castable}
specifies the input data table that contains the BY groups to process.
| Long form | groupByIn={name="table-name"} |
|---|---|
| Shortcut form | groupByIn="table-name" |
The castable value can be one or more of the following:
caslib="string"
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
computedOnDemand=true | false
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | false |
computedVars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
computedVarsProgram="string"
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
groupBy={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the names of the variables to use for grouping results.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the input table.
vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the input data.
whereTable={groupbytable}
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
casLib="string"
specifies the caslib for the filter table. By default, the active caslib is used.
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the filter table.
vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the data from the filter table.
groupByRaw=true | false
when set to True, matches the rows for a BY group on both the formatted and unformatted values of BY variables. When the parameter is set to False, the rows for a BY group are matched using only the formatted values.
| Default | false |
|---|
initVar=true | false
when set to True, passes initial values for variables to the solver in the SOLVE statement.
| Default | true |
|---|
intFuzz=double
specifies the tolerance for rounding the bounds on integer and binary variables to integer values.
| Default | 1E-05 |
|---|---|
| Range | 0–0.5 |
maxLabelLen=integer
specifies the maximum length (in bytes) for row and column labels that are stored by the SAVE MPS and SAVE QPS statements. This parameter also controls the length of row and column names that are displayed by solvers.
| Alias | maxLabLen |
|---|---|
| Default | 32 |
| Range | 8–256 |
messageLimit=64-bit-integer | "NONE"
specifies the maximum number of non-error diagnostic messages to display while processing a single top-level statement. This parameter applies to notes and warning messages that diagnose various issues during problem generation and execution; it does not apply to messages that are normally always produced, such as in solver logs.
| Alias | msgLimit |
|---|
| Default | 25 |
|---|---|
| NONE | removes the message limit. |
missCheck=true | false
when set to True, performs detailed checking of missing values in expressions and produces a message each time an arithmetic operation or function that has missing value operands is evaluated (except when the operation or function specifically supports missing values).
| Default | false |
|---|
nGroupByTasks=integer | "ALL"
specifies the number of tasks to use on each worker node for OPTMODEL language processing of BY groups.
| Default | 1 |
|---|---|
| ALL | uses all available threads for OPTMODEL language processing tasks. |
nlcDigits=integer
specifies the number of decimal digits of nonlinear constraint accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that constraints are accurate to the limits of machine precision.
| Alias | cDigits |
|---|---|
| Range | 0–60 |
nSubsessionWorkers=integer
specifies the number of worker nodes to be used by each subsession for CASL evaluation.
| Aliases | nSubWorkers |
|---|---|
| nWorkersPerEval | |
| Default | 1 |
| Minimum value | 1 |
nThreads=integer
specifies the number of threads to use. Setting this parameter to a number greater than the actual number of available cores might hurt performance. Specifying a high value for this parameter does not guarantee a shorter solution time; the actual change in solution time depends on the computing hardware and the scalability of the underlying algorithms in the specified action. In some circumstances, an action might use fewer threads than the specified value of this parameter because the action's internal algorithms determine that a smaller number is preferable. The default is the number of cores on the machine that executes the process or the number of cores permissible based on your installation (whichever is less). The number of simultaneously active CPUs is limited by your installation and license configuration.
| Alias | numThreads |
|---|---|
| Range | 1–256 |
objDigits=integer
specifies the number of decimal digits of objective function accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that objectives are accurate to the limits of machine precision.
| Alias | fDigits |
|---|---|
| Range | 0–60 |
presolver="AGGRESSIVE" | "AUTOMATIC" | "BASIC" | "MODERATE" | "NONE"
presolveTol=double
provides a tolerance such that constraints whose infeasibility is less than the value of this parameter can be eliminated by the OPTMODEL presolver.
| Alias | presTol |
|---|---|
| Default | 1E-12 |
| Range | 0–0.1 |
printDigits=integer
specifies the number of significant digits for the PRINT statement to display for numeric columns when no format is specified.
| Alias | pDigits |
|---|---|
| Default | 5 |
| Range | 1–9 |
printLevel=integer
specifies the amount of information to return.
| Default | 1 |
|---|---|
| Range | 0–2 |
printMatrix=double
adjusts the density evaluation of a two-dimensional array to affect how it is displayed. The value of this parameter scales the total number of nonempty array elements and is used by the PRINT statement to determine whether to use a sparse list format (one row per element) or dense matrix format.
| Alias | pMatrix |
|---|---|
| Default | 1 |
| Minimum value | 0 |
printWidth=integer
specifies the width used by the PRINT statement for display of numeric columns when no format is specified. By default, the width is equal to the value of the printDigits parameter plus 7.
| Alias | pWidth |
|---|---|
| Range | 1–16 |
statusOut={casouttable}
specifies the output data table to contain the result status from processing each BY group.
For more information about specifying the statusOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
varFuzz=double
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 the value of this parameter, then the variable is fixed to the average of the upper and lower bounds before it is presented to the solver.
| Default | 0 |
|---|---|
| Minimum value | 0 |
Result Descriptions
absObjGap
indicates the absolute gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The absolute gap is equal to the absolute difference between BestInteger and BestBound. The result is a double. You can access the value from results.absObjGap.
algorithm
indicates the algorithm used by the solver. The result is a string. You can access the value from results.algorithm.
bestBound
indicates the best bound on the objective function value at termination. A missing value indicates that no such bound is available. The result is a double. You can access the value from results.bestBound.
boundInf
indicates the maximum (absolute) violation by the solution of the lower or upper bounds. The result is a double. You can access the value from results.boundInf.
complementarity
indicates the scalar product of the primal solution array and the reduced cost array. The result is a double. You can access the value from results.complementarity.
dualInf
indicates the maximum (absolute) violation of the dual constraints by the solution. The result is a double. You can access the value from results.dualInf.
dualityGap
indicates the difference between the primal and dual objective values at termination. The result is a double. You can access the value from results.dualityGap.
infeasibility
indicates the level of infeasibility of the constraints at the solution. This value is included for the black-box and NLP solvers. The result is a double. You can access the value from results.infeasibility.
integerInf
indicates the maximum (absolute) violation of the integrality of integer variables returned at termination. The result is a double. You can access the value from results.integerInf.
numArticulationPoints
indicates the number of articulation points found. This term appears only for biconnected components. The result is an integer. You can access the value from results.numArticulationPoints.
numCliques
indicates the number of cliques found. This term appears only for network clique problems. The result is an integer. You can access the value from results.numCliques.
numComponents
indicates the number of components that match the definitions of the corresponding network problem class. This term appears only for connected components and biconnected components. The result is an integer. You can access the value from results.numComponents.
numCycles
indicates the number of cycles found that satisfy the criteria you specify. This term appears only for network cycle problems. The result is an integer. You can access the value from results.numCycles.
numDistinctOptima
indicates the number of distinct local optima that the solver finds. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numDistinctOptima.
numEvals
indicates the total number of black-box solver evaluations that were not cached. The result is an integer. You can access the value from results.numEvals.
numIterations
indicates the number of iterations used to solve the problem. The result is an integer. You can access the value from results.numIterations.
numIterations2
indicates the number of simplex iterations used in the second stage. This can be either the crossover part after an interior-point solve, or the primal or dual simplex part after a network simplex solve. The result is an integer. You can access the value from results.numIterations2.
numNodes
indicates the number of nodes enumerated when the branch-and-bound algorithm is used. The result is an integer. You can access the value from results.numNodes.
numParetoPoints
indicates the number of nondominated solutions in the Pareto-optimal set. This value is included only for multiobjective optimization with the black-box solver. The result is an integer. You can access the value from results.numParetoPoints.
numPaths
indicates the number of paths that are found to satisfy the criteria you specify. This term appears only for network path and shortest path problems. The result is a 64-bit integer. You can access the value from results.numPaths.
numSamplePoints
indicates the number of points that are evaluated in the sampling phase. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numSamplePoints.
numSolutions
indicates the number of solutions found. This value is returned by the CLP and MILP solvers. The result is an integer. You can access the value from results.numSolutions.
numStarts
indicates the number of starting points. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numStarts.
objective
indicates the objective value obtained by the solver at termination. The value is missing when a problem has multiple objectives or does not have an objective. The result is a double. You can access the value from results.objective.
optimalityError
indicates the norm of the optimality conditions at the solution. This value is included for the NLP solver. The result is a double. You can access the value from results.optimalityError.
presolveTime
indicates the time (in seconds) used by the presolver. The result is a double. You can access the value from results.presolveTime.
primalInf
indicates the maximum (absolute) violation of the primal constraints by the solution. The result is a double. You can access the value from results.primalInf.
problemType
indicates the type of network problem solved. The result is a string. You can access the value from results.problemType.
progress
indicates the progress that the solver made during the last iteration. This value is included only for multiobjective optimization with the black-box solver. The result is a double. You can access the value from results.progress.
relObjGap
indicates the relative gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The relative objective gap is equal to the absolute difference of these two values divided by the absolute value of the BestBound. Zero division is avoided by adding 1E-10. The result is a double. You can access the value from results.relObjGap.
seed
indicates the seed value that is used to initialize the solver. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.seed.
solutionStatus
indicates the solution status at solver termination. The result is a string. You can access the value from results.solutionStatus.
solutionTime
indicates the time (in seconds) used to solve the problem, including the presolver time. The result is a double. You can access the value from results.solutionTime.
status
indicates the processing status at termination. The result is a string. You can access the value from results.status.
runOptmodel Action
Runs OPTMODEL code.
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the input data table that contains the BY groups to process. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table to contain the result status from processing each BY group. |
Parameter Descriptions
* code="string"
specifies the OPTMODEL modeling language code to run.
errorLimit=64-bit-integer | "ALL"
specifies the maximum number of error messages to display during processing of the SOLVE statement.
| Default | 10 |
|---|---|
| ALL | removes the error message limit. |
finiteDiff="CENTRAL" | "FORWARD"
forceFiniteDiff="ALL" | "CON" | "NONE" | "OBJ"
forces derivative computations to use finite differences instead of analytic derivatives for nonlinear equations.
| Alias | forceFD |
|---|---|
| Default | NONE |
forcePresolve=True | False
when set to True, enables the OPTMODEL presolver for use with the CLP, LP, MILP, and QP solvers. By default, the OPTMODEL presolver is disabled for linear problems or problems that have predicates or when the CLP, LP, MILP, or QP solver is specified in the SOLVE statement.
| Default | False |
|---|
groupBy=[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the names of the variables to use for grouping results.
For more information about specifying the groupBy parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
groupByIn={castable}
specifies the input data table that contains the BY groups to process.
| Long form | groupByIn={"name":"table-name"} |
|---|---|
| Shortcut form | groupByIn="table-name" |
The castable value can be one or more of the following:
"caslib":"string"
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
"computedOnDemand":True | False
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | False |
"computedVars":[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
"format":"string"
specifies the format to apply to the variable.
"formattedLength":integer
specifies the length of format field plus the length of the format precision.
"label":"string"
specifies the descriptive label for the variable.
* "name":"variable-name"
specifies the name for the variable.
"nfd":integer
specifies the length of the format precision.
"nfl":integer
specifies the length of the format field.
"computedVarsProgram":"string"
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
"dataSourceOptions":{"key-1":{any-list-or-data-type-1} <, "key-2":{any-list-or-data-type-2}, ...>}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
"groupBy":[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the names of the variables to use for grouping results.
The casinvardesc value can be one or more of the following:
"format":"string"
specifies the format to apply to the variable.
"formattedLength":integer
specifies the length of format field plus the length of the format precision.
"label":"string"
specifies the descriptive label for the variable.
* "name":"variable-name"
specifies the name for the variable.
"nfd":integer
specifies the length of the format precision.
"nfl":integer
specifies the length of the format field.
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* "name":"table-name"
specifies the name of the input table.
"vars":[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
"format":"string"
specifies the format to apply to the variable.
"formattedLength":integer
specifies the length of format field plus the length of the format precision.
"label":"string"
specifies the descriptive label for the variable.
* "name":"variable-name"
specifies the name for the variable.
"nfd":integer
specifies the length of the format precision.
"nfl":integer
specifies the length of the format field.
"where":"where-expression"
specifies an expression for subsetting the input data.
"whereTable":{groupbytable}
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
"casLib":"string"
specifies the caslib for the filter table. By default, the active caslib is used.
"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
specifies the settings for reading a table from a data source.
| Alias | import_ |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* "name":"table-name"
specifies the name of the filter table.
"vars":[{casinvardesc-1} <, {casinvardesc-2}, ...>]
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
"format":"string"
specifies the format to apply to the variable.
"formattedLength":integer
specifies the length of format field plus the length of the format precision.
"label":"string"
specifies the descriptive label for the variable.
* "name":"variable-name"
specifies the name for the variable.
"nfd":integer
specifies the length of the format precision.
"nfl":integer
specifies the length of the format field.
"where":"where-expression"
specifies an expression for subsetting the data from the filter table.
groupByRaw=True | False
when set to True, matches the rows for a BY group on both the formatted and unformatted values of BY variables. When the parameter is set to False, the rows for a BY group are matched using only the formatted values.
| Default | False |
|---|
initVar=True | False
when set to True, passes initial values for variables to the solver in the SOLVE statement.
| Default | True |
|---|
intFuzz=double
specifies the tolerance for rounding the bounds on integer and binary variables to integer values.
| Default | 1E-05 |
|---|---|
| Range | 0–0.5 |
maxLabelLen=integer
specifies the maximum length (in bytes) for row and column labels that are stored by the SAVE MPS and SAVE QPS statements. This parameter also controls the length of row and column names that are displayed by solvers.
| Alias | maxLabLen |
|---|---|
| Default | 32 |
| Range | 8–256 |
messageLimit=64-bit-integer | "NONE"
specifies the maximum number of non-error diagnostic messages to display while processing a single top-level statement. This parameter applies to notes and warning messages that diagnose various issues during problem generation and execution; it does not apply to messages that are normally always produced, such as in solver logs.
| Alias | msgLimit |
|---|
| Default | 25 |
|---|---|
| NONE | removes the message limit. |
missCheck=True | False
when set to True, performs detailed checking of missing values in expressions and produces a message each time an arithmetic operation or function that has missing value operands is evaluated (except when the operation or function specifically supports missing values).
| Default | False |
|---|
nGroupByTasks=integer | "ALL"
specifies the number of tasks to use on each worker node for OPTMODEL language processing of BY groups.
| Default | 1 |
|---|---|
| ALL | uses all available threads for OPTMODEL language processing tasks. |
nlcDigits=integer
specifies the number of decimal digits of nonlinear constraint accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that constraints are accurate to the limits of machine precision.
| Alias | cDigits |
|---|---|
| Range | 0–60 |
nSubsessionWorkers=integer
specifies the number of worker nodes to be used by each subsession for CASL evaluation.
| Aliases | nSubWorkers |
|---|---|
| nWorkersPerEval | |
| Default | 1 |
| Minimum value | 1 |
nThreads=integer
specifies the number of threads to use. Setting this parameter to a number greater than the actual number of available cores might hurt performance. Specifying a high value for this parameter does not guarantee a shorter solution time; the actual change in solution time depends on the computing hardware and the scalability of the underlying algorithms in the specified action. In some circumstances, an action might use fewer threads than the specified value of this parameter because the action's internal algorithms determine that a smaller number is preferable. The default is the number of cores on the machine that executes the process or the number of cores permissible based on your installation (whichever is less). The number of simultaneously active CPUs is limited by your installation and license configuration.
| Alias | numThreads |
|---|---|
| Range | 1–256 |
objDigits=integer
specifies the number of decimal digits of objective function accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that objectives are accurate to the limits of machine precision.
| Alias | fDigits |
|---|---|
| Range | 0–60 |
presolver="AGGRESSIVE" | "AUTOMATIC" | "BASIC" | "MODERATE" | "NONE"
presolveTol=double
provides a tolerance such that constraints whose infeasibility is less than the value of this parameter can be eliminated by the OPTMODEL presolver.
| Alias | presTol |
|---|---|
| Default | 1E-12 |
| Range | 0–0.1 |
printDigits=integer
specifies the number of significant digits for the PRINT statement to display for numeric columns when no format is specified.
| Alias | pDigits |
|---|---|
| Default | 5 |
| Range | 1–9 |
printLevel=integer
specifies the amount of information to return.
| Default | 1 |
|---|---|
| Range | 0–2 |
printMatrix=double
adjusts the density evaluation of a two-dimensional array to affect how it is displayed. The value of this parameter scales the total number of nonempty array elements and is used by the PRINT statement to determine whether to use a sparse list format (one row per element) or dense matrix format.
| Alias | pMatrix |
|---|---|
| Default | 1 |
| Minimum value | 0 |
printWidth=integer
specifies the width used by the PRINT statement for display of numeric columns when no format is specified. By default, the width is equal to the value of the printDigits parameter plus 7.
| Alias | pWidth |
|---|---|
| Range | 1–16 |
statusOut={casouttable}
specifies the output data table to contain the result status from processing each BY group.
For more information about specifying the statusOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
varFuzz=double
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 the value of this parameter, then the variable is fixed to the average of the upper and lower bounds before it is presented to the solver.
| Default | 0 |
|---|---|
| Minimum value | 0 |
Result Descriptions
absObjGap
indicates the absolute gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The absolute gap is equal to the absolute difference between BestInteger and BestBound. The result is a double. You can access the value from results.absObjGap.
algorithm
indicates the algorithm used by the solver. The result is a string. You can access the value from results.algorithm.
bestBound
indicates the best bound on the objective function value at termination. A missing value indicates that no such bound is available. The result is a double. You can access the value from results.bestBound.
boundInf
indicates the maximum (absolute) violation by the solution of the lower or upper bounds. The result is a double. You can access the value from results.boundInf.
complementarity
indicates the scalar product of the primal solution array and the reduced cost array. The result is a double. You can access the value from results.complementarity.
dualInf
indicates the maximum (absolute) violation of the dual constraints by the solution. The result is a double. You can access the value from results.dualInf.
dualityGap
indicates the difference between the primal and dual objective values at termination. The result is a double. You can access the value from results.dualityGap.
infeasibility
indicates the level of infeasibility of the constraints at the solution. This value is included for the black-box and NLP solvers. The result is a double. You can access the value from results.infeasibility.
integerInf
indicates the maximum (absolute) violation of the integrality of integer variables returned at termination. The result is a double. You can access the value from results.integerInf.
numArticulationPoints
indicates the number of articulation points found. This term appears only for biconnected components. The result is an integer. You can access the value from results.numArticulationPoints.
numCliques
indicates the number of cliques found. This term appears only for network clique problems. The result is an integer. You can access the value from results.numCliques.
numComponents
indicates the number of components that match the definitions of the corresponding network problem class. This term appears only for connected components and biconnected components. The result is an integer. You can access the value from results.numComponents.
numCycles
indicates the number of cycles found that satisfy the criteria you specify. This term appears only for network cycle problems. The result is an integer. You can access the value from results.numCycles.
numDistinctOptima
indicates the number of distinct local optima that the solver finds. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numDistinctOptima.
numEvals
indicates the total number of black-box solver evaluations that were not cached. The result is an integer. You can access the value from results.numEvals.
numIterations
indicates the number of iterations used to solve the problem. The result is an integer. You can access the value from results.numIterations.
numIterations2
indicates the number of simplex iterations used in the second stage. This can be either the crossover part after an interior-point solve, or the primal or dual simplex part after a network simplex solve. The result is an integer. You can access the value from results.numIterations2.
numNodes
indicates the number of nodes enumerated when the branch-and-bound algorithm is used. The result is an integer. You can access the value from results.numNodes.
numParetoPoints
indicates the number of nondominated solutions in the Pareto-optimal set. This value is included only for multiobjective optimization with the black-box solver. The result is an integer. You can access the value from results.numParetoPoints.
numPaths
indicates the number of paths that are found to satisfy the criteria you specify. This term appears only for network path and shortest path problems. The result is a 64-bit integer. You can access the value from results.numPaths.
numSamplePoints
indicates the number of points that are evaluated in the sampling phase. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numSamplePoints.
numSolutions
indicates the number of solutions found. This value is returned by the CLP and MILP solvers. The result is an integer. You can access the value from results.numSolutions.
numStarts
indicates the number of starting points. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numStarts.
objective
indicates the objective value obtained by the solver at termination. The value is missing when a problem has multiple objectives or does not have an objective. The result is a double. You can access the value from results.objective.
optimalityError
indicates the norm of the optimality conditions at the solution. This value is included for the NLP solver. The result is a double. You can access the value from results.optimalityError.
presolveTime
indicates the time (in seconds) used by the presolver. The result is a double. You can access the value from results.presolveTime.
primalInf
indicates the maximum (absolute) violation of the primal constraints by the solution. The result is a double. You can access the value from results.primalInf.
problemType
indicates the type of network problem solved. The result is a string. You can access the value from results.problemType.
progress
indicates the progress that the solver made during the last iteration. This value is included only for multiobjective optimization with the black-box solver. The result is a double. You can access the value from results.progress.
relObjGap
indicates the relative gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The relative objective gap is equal to the absolute difference of these two values divided by the absolute value of the BestBound. Zero division is avoided by adding 1E-10. The result is a double. You can access the value from results.relObjGap.
seed
indicates the seed value that is used to initialize the solver. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.seed.
solutionStatus
indicates the solution status at solver termination. The result is a string. You can access the value from results.solutionStatus.
solutionTime
indicates the time (in seconds) used to solve the problem, including the presolver time. The result is a double. You can access the value from results.solutionTime.
status
indicates the processing status at termination. The result is a string. You can access the value from results.status.
runOptmodel Action
Runs OPTMODEL code.
Summary: Input and Output Tables
If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the input data table that contains the BY groups to process. |
|
Parameter |
Subparameter |
Description |
|---|---|---|
|
— |
specifies the output data table to contain the result status from processing each BY group. |
Parameter Descriptions
* code="string"
specifies the OPTMODEL modeling language code to run.
errorLimit=64-bit-integer | "ALL"
specifies the maximum number of error messages to display during processing of the SOLVE statement.
| Default | 10 |
|---|---|
| ALL | removes the error message limit. |
finiteDiff="CENTRAL" | "FORWARD"
forceFiniteDiff="ALL" | "CON" | "NONE" | "OBJ"
forces derivative computations to use finite differences instead of analytic derivatives for nonlinear equations.
| Alias | forceFD |
|---|---|
| Default | NONE |
forcePresolve=TRUE | FALSE
when set to True, enables the OPTMODEL presolver for use with the CLP, LP, MILP, and QP solvers. By default, the OPTMODEL presolver is disabled for linear problems or problems that have predicates or when the CLP, LP, MILP, or QP solver is specified in the SOLVE statement.
| Default | FALSE |
|---|
groupBy=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the names of the variables to use for grouping results.
For more information about specifying the groupBy parameter, see the common casinvardesc parameter (Appendix A: Common Parameters).
groupByIn=list(castable)
specifies the input data table that contains the BY groups to process.
| Long form | groupByIn=list(name="table-name") |
|---|---|
| Shortcut form | groupByIn="table-name" |
The castable value can be one or more of the following:
caslib="string"
specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.
computedOnDemand=TRUE | FALSE
when set to True, creates the computed variables when the table is loaded instead of when the action begins.
| Alias | compOnDemand |
|---|---|
| Default | FALSE |
computedVars=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the names of the computed variables to create. Specify an expression for each variable in the computedVarsProgram parameter. If you do not specify this parameter, then all variables from computedVarsProgram are automatically included.
| Alias | compVars |
|---|
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
computedVarsProgram="string"
specifies an expression for each computed variable that you include in the computedVars parameter.
| Alias | compPgm |
|---|
dataSourceOptions=list(key-1=list(any-list-or-data-type-1) <, key-2=list(any-list-or-data-type-2), ...>)
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
groupBy=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the names of the variables to use for grouping results.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the input table.
vars=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the variables to use in the action.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the input data.
whereTable=list(groupbytable)
specifies an input table that contains rows to use as a WHERE filter. If the vars parameter is not specified, then all the variable names that are common to the input table and the filtering table are used to find matching rows. If the where parameter for the input table and this parameter are specified, then this filtering table is applied first.
The groupbytable value can be one or more of the following:
casLib="string"
specifies the caslib for the filter table. By default, the active caslib is used.
dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters)
specifies data source options.
| Aliases | options |
|---|---|
| dataSource |
For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter (Appendix A: Common Parameters).
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)
specifies the settings for reading a table from a data source.
| Alias | import |
|---|
For more information about specifying the importOptions parameter, see the common importOptions parameter (Appendix A: Common Parameters).
* name="table-name"
specifies the name of the filter table.
vars=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)
specifies the variable names to use from the filter table.
The casinvardesc value can be one or more of the following:
format="string"
specifies the format to apply to the variable.
formattedLength=integer
specifies the length of format field plus the length of the format precision.
label="string"
specifies the descriptive label for the variable.
* name="variable-name"
specifies the name for the variable.
nfd=integer
specifies the length of the format precision.
nfl=integer
specifies the length of the format field.
where="where-expression"
specifies an expression for subsetting the data from the filter table.
groupByRaw=TRUE | FALSE
when set to True, matches the rows for a BY group on both the formatted and unformatted values of BY variables. When the parameter is set to False, the rows for a BY group are matched using only the formatted values.
| Default | FALSE |
|---|
initVar=TRUE | FALSE
when set to True, passes initial values for variables to the solver in the SOLVE statement.
| Default | TRUE |
|---|
intFuzz=double
specifies the tolerance for rounding the bounds on integer and binary variables to integer values.
| Default | 1E-05 |
|---|---|
| Range | 0–0.5 |
maxLabelLen=integer
specifies the maximum length (in bytes) for row and column labels that are stored by the SAVE MPS and SAVE QPS statements. This parameter also controls the length of row and column names that are displayed by solvers.
| Alias | maxLabLen |
|---|---|
| Default | 32 |
| Range | 8–256 |
messageLimit=64-bit-integer | "NONE"
specifies the maximum number of non-error diagnostic messages to display while processing a single top-level statement. This parameter applies to notes and warning messages that diagnose various issues during problem generation and execution; it does not apply to messages that are normally always produced, such as in solver logs.
| Alias | msgLimit |
|---|
| Default | 25 |
|---|---|
| NONE | removes the message limit. |
missCheck=TRUE | FALSE
when set to True, performs detailed checking of missing values in expressions and produces a message each time an arithmetic operation or function that has missing value operands is evaluated (except when the operation or function specifically supports missing values).
| Default | FALSE |
|---|
nGroupByTasks=integer | "ALL"
specifies the number of tasks to use on each worker node for OPTMODEL language processing of BY groups.
| Default | 1 |
|---|---|
| ALL | uses all available threads for OPTMODEL language processing tasks. |
nlcDigits=integer
specifies the number of decimal digits of nonlinear constraint accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that constraints are accurate to the limits of machine precision.
| Alias | cDigits |
|---|---|
| Range | 0–60 |
nSubsessionWorkers=integer
specifies the number of worker nodes to be used by each subsession for CASL evaluation.
| Aliases | nSubWorkers |
|---|---|
| nWorkersPerEval | |
| Default | 1 |
| Minimum value | 1 |
nThreads=integer
specifies the number of threads to use. Setting this parameter to a number greater than the actual number of available cores might hurt performance. Specifying a high value for this parameter does not guarantee a shorter solution time; the actual change in solution time depends on the computing hardware and the scalability of the underlying algorithms in the specified action. In some circumstances, an action might use fewer threads than the specified value of this parameter because the action's internal algorithms determine that a smaller number is preferable. The default is the number of cores on the machine that executes the process or the number of cores permissible based on your installation (whichever is less). The number of simultaneously active CPUs is limited by your installation and license configuration.
| Alias | numThreads |
|---|---|
| Range | 1–256 |
objDigits=integer
specifies the number of decimal digits of objective function accuracy. This parameter is used to select a step length when derivative computations require finite differences. By default, the action assumes that objectives are accurate to the limits of machine precision.
| Alias | fDigits |
|---|---|
| Range | 0–60 |
presolver="AGGRESSIVE" | "AUTOMATIC" | "BASIC" | "MODERATE" | "NONE"
presolveTol=double
provides a tolerance such that constraints whose infeasibility is less than the value of this parameter can be eliminated by the OPTMODEL presolver.
| Alias | presTol |
|---|---|
| Default | 1E-12 |
| Range | 0–0.1 |
printDigits=integer
specifies the number of significant digits for the PRINT statement to display for numeric columns when no format is specified.
| Alias | pDigits |
|---|---|
| Default | 5 |
| Range | 1–9 |
printLevel=integer
specifies the amount of information to return.
| Default | 1 |
|---|---|
| Range | 0–2 |
printMatrix=double
adjusts the density evaluation of a two-dimensional array to affect how it is displayed. The value of this parameter scales the total number of nonempty array elements and is used by the PRINT statement to determine whether to use a sparse list format (one row per element) or dense matrix format.
| Alias | pMatrix |
|---|---|
| Default | 1 |
| Minimum value | 0 |
printWidth=integer
specifies the width used by the PRINT statement for display of numeric columns when no format is specified. By default, the width is equal to the value of the printDigits parameter plus 7.
| Alias | pWidth |
|---|---|
| Range | 1–16 |
statusOut=list(casouttable)
specifies the output data table to contain the result status from processing each BY group.
For more information about specifying the statusOut parameter, see the common casouttable parameter (Appendix A: Common Parameters).
varFuzz=double
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 the value of this parameter, then the variable is fixed to the average of the upper and lower bounds before it is presented to the solver.
| Default | 0 |
|---|---|
| Minimum value | 0 |
Result Descriptions
absObjGap
indicates the absolute gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The absolute gap is equal to the absolute difference between BestInteger and BestBound. The result is a double. You can access the value from results.absObjGap.
algorithm
indicates the algorithm used by the solver. The result is a string. You can access the value from results.algorithm.
bestBound
indicates the best bound on the objective function value at termination. A missing value indicates that no such bound is available. The result is a double. You can access the value from results.bestBound.
boundInf
indicates the maximum (absolute) violation by the solution of the lower or upper bounds. The result is a double. You can access the value from results.boundInf.
complementarity
indicates the scalar product of the primal solution array and the reduced cost array. The result is a double. You can access the value from results.complementarity.
dualInf
indicates the maximum (absolute) violation of the dual constraints by the solution. The result is a double. You can access the value from results.dualInf.
dualityGap
indicates the difference between the primal and dual objective values at termination. The result is a double. You can access the value from results.dualityGap.
infeasibility
indicates the level of infeasibility of the constraints at the solution. This value is included for the black-box and NLP solvers. The result is a double. You can access the value from results.infeasibility.
integerInf
indicates the maximum (absolute) violation of the integrality of integer variables returned at termination. The result is a double. You can access the value from results.integerInf.
numArticulationPoints
indicates the number of articulation points found. This term appears only for biconnected components. The result is an integer. You can access the value from results.numArticulationPoints.
numCliques
indicates the number of cliques found. This term appears only for network clique problems. The result is an integer. You can access the value from results.numCliques.
numComponents
indicates the number of components that match the definitions of the corresponding network problem class. This term appears only for connected components and biconnected components. The result is an integer. You can access the value from results.numComponents.
numCycles
indicates the number of cycles found that satisfy the criteria you specify. This term appears only for network cycle problems. The result is an integer. You can access the value from results.numCycles.
numDistinctOptima
indicates the number of distinct local optima that the solver finds. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numDistinctOptima.
numEvals
indicates the total number of black-box solver evaluations that were not cached. The result is an integer. You can access the value from results.numEvals.
numIterations
indicates the number of iterations used to solve the problem. The result is an integer. You can access the value from results.numIterations.
numIterations2
indicates the number of simplex iterations used in the second stage. This can be either the crossover part after an interior-point solve, or the primal or dual simplex part after a network simplex solve. The result is an integer. You can access the value from results.numIterations2.
numNodes
indicates the number of nodes enumerated when the branch-and-bound algorithm is used. The result is an integer. You can access the value from results.numNodes.
numParetoPoints
indicates the number of nondominated solutions in the Pareto-optimal set. This value is included only for multiobjective optimization with the black-box solver. The result is an integer. You can access the value from results.numParetoPoints.
numPaths
indicates the number of paths that are found to satisfy the criteria you specify. This term appears only for network path and shortest path problems. The result is a 64-bit integer. You can access the value from results.numPaths.
numSamplePoints
indicates the number of points that are evaluated in the sampling phase. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numSamplePoints.
numSolutions
indicates the number of solutions found. This value is returned by the CLP and MILP solvers. The result is an integer. You can access the value from results.numSolutions.
numStarts
indicates the number of starting points. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.numStarts.
objective
indicates the objective value obtained by the solver at termination. The value is missing when a problem has multiple objectives or does not have an objective. The result is a double. You can access the value from results.objective.
optimalityError
indicates the norm of the optimality conditions at the solution. This value is included for the NLP solver. The result is a double. You can access the value from results.optimalityError.
presolveTime
indicates the time (in seconds) used by the presolver. The result is a double. You can access the value from results.presolveTime.
primalInf
indicates the maximum (absolute) violation of the primal constraints by the solution. The result is a double. You can access the value from results.primalInf.
problemType
indicates the type of network problem solved. The result is a string. You can access the value from results.problemType.
progress
indicates the progress that the solver made during the last iteration. This value is included only for multiobjective optimization with the black-box solver. The result is a double. You can access the value from results.progress.
relObjGap
indicates the relative gap between the best integer objective (BestInteger) and the best bound on the objective function value (BestBound) at termination. The relative objective gap is equal to the absolute difference of these two values divided by the absolute value of the BestBound. Zero division is avoided by adding 1E-10. The result is a double. You can access the value from results.relObjGap.
seed
indicates the seed value that is used to initialize the solver. This value appears only in NLP multistart mode. The result is an integer. You can access the value from results.seed.
solutionStatus
indicates the solution status at solver termination. The result is a string. You can access the value from results.solutionStatus.
solutionTime
indicates the time (in seconds) used to solve the problem, including the presolver time. The result is a double. You can access the value from results.solutionTime.
status
indicates the processing status at termination. The result is a string. You can access the value from results.status.