The OPTMODEL Procedure

OPTMODEL Options

All PROC OPTMODEL options can be specified in the PROC statement (see the section "PROC OPTMODEL Statement" for more information). However, it is sometimes necessary to change options after other OPTMODEL statements have been executed. For example, if an optimization technique had trouble with convergence, then it might be useful to vary the PRESOLVER= option value. This can be done with the RESET OPTIONS statement.

The RESET OPTIONS statement accepts options in the same form used by the PROC OPTMODEL statement. The RESET OPTIONS statement is also able to reset option values and to change options programmatically. For example, the following code prints the value of parameter n at various precisions:

    proc optmodel;
       number n = 1/7;
       for {i in 1..9 by 4}
       do;
          reset options pdigits=(i);
          print n;
       end;
       reset options pdigits; /* reset to default */
 


The OPTMODEL Procedure

n
0.1

n
0.14286

n
0.142857143


Figure 6.58: Changing the PDIGITS Option Value

The output generated is shown in Output 6.58. The RESET OPTIONS statement in the DO loop sets the PDIGITS option to the value of i. The final RESET OPTIONS statement restores the default option value, because the value was omitted.

Previous Page | Next Page | Top of Page