The OPTMODEL Procedure

The Rosenbrock Problem

You can use parameters to produce a clear formulation of a problem. Consider the Rosenbrock problem,

minimize f left parenthesis x 1 comma x 2 right parenthesis equals alpha left parenthesis x 2 minus x 1 squared right parenthesis squared plus left parenthesis 1 minus x 1 right parenthesis squared

where alpha equals 100 is a parameter (constant), x 1 and x 2 are optimization variables (whose values are to be determined), and f left parenthesis x 1 comma x 2 right parenthesis is an objective function.

Here is a PROC OPTMODEL program that solves the Rosenbrock problem:

proc optmodel;
   number alpha = 100; /* declare parameter */
   var x {1..2};       /* declare variables */
   /* objective function */
   min f = alpha*(x[2] - x[1]**2)**2 +
           (1 - x[1])**2;
   /* now run the solver */
   solve;

   print x;
quit;

The PROC OPTMODEL output is shown in Figure 3.

Figure 3: Rosenbrock Function Results

The OPTMODEL Procedure

Problem Summary
Objective SenseMinimization
Objective Functionf
Objective TypeNonlinear
  
Number of Variables2
Bounded Above0
Bounded Below0
Bounded Below and Above0
Free2
Fixed0
  
Number of Constraints0

Solution Summary
SolverNLP
AlgorithmInterior Point
Objective Functionf
Solution StatusOptimal
Objective Value8.204873E-23
  
Optimality Error9.704881E-11
Infeasibility0
  
Iterations14
Presolve Time0.00
Solution Time0.01

[1]x
11
21


Last updated: October 07, 2022