The OPTMODEL Procedure

SOLVE Statement

SOLVE [ WITH solver ] [ (OBJECTIVE|OBJ) name ] [ / options ];

The SOLVE statement invokes a PROC OPTMODEL solver. The current model is first resolved to the numeric form that is required by the solver. The resolved model and possibly the current values of any optimization variables are passed to the solver. After the solver finishes executing, the SOLVE statement prints a short table giving a summary of results from the solver (see the section "ODS Table and Variable Names") and updates the _OROPTMODEL_ macro variable.

Here are the arguments to the SOLVE statement:

solver
selects the named solver, namely LP, MILP, QP, NLPC, NLPU, SQP, or IPNLP (see corresponding chapters in this book for details). If no WITH clause is specified, then a solver is chosen automatically, depending on the problem type.

name
specifies the objective to use. You can abbreviate the OBJECTIVE keyword as OBJ. If no name is specified, then the solver uses the most recent objective seen in a MAX or MIN declaration or specified in a SOLVE statement.

options
specifies solver options. Solver options can be specified only when the WITH clause is used. A list of the options available with the solver is provided in the individual chapters describing each solver.

Optimization techniques that use initial values obtain them from the current values of the optimization variables unless the NOINITVAR option is specified. When the solver finishes executing, the current value of each optimization variable is replaced by the optimal value found by the solver. These values can then be used as the initial values for subsequent solver invocations. The .init suffix location for each variable saves the initial value used for the most recent SOLVE statement.

Note: Should a solver fail, any currently pending statement is stopped and processing continues with the next complete statement read from the input. For example, if a SOLVE statement enclosed in a DO group (see the section "DO Statement") fails, then the subsequent statements in the group are not executed and processing resumes at the point immediately following the DO group. Note that neither an infeasible result, an unbounded result, nor reaching an iteration limit is considered to be a solver failure.

Note: The information appearing in the macro variable _OROPTMODEL_ (see the section "Macro Variable") varies by solver.

Previous Page | Next Page | Top of Page