Usage Note 41671: Migrating from PROC NLP to PROC OPTMODEL
The OPTMODEL procedure comprises the powerful OPTMODEL modeling language and state-of-the-art solvers for several classes of mathematical programming problems. You can use the nonlinear solvers in PROC OPTMODEL to solve nonlinear mathematical programming problems that were previously solved with PROC NLP.
Here are some advantages to using PROC OPTMODEL over PROC NLP:
- Improved robustness in solving highly nonlinear problems
- Full support of sparse linear algebra, which enables it to efficiently solve large scale problems
- The modeling language has a rich syntax including many powerful expressions and programming statements to enable you to model complex optimization problems that are difficult to formulate in PROC NLP
- More effective and flexible READ DATA statement for input of data from data sets, including support of input data in a sparse matrix format
- Optimization algorithms with the sparse structural information of an optimization problem
For further discussion, see this SAS Global Forum paper.
This example illustrates solving a nonlinear mathematical programming problem with PROC NLP versus PROC OPTMODEL. The Bard function is a least squares problem with n=3 parameters and m=15 functions:
where

with

,

,

, and
The minimum function value

E

is at the point

. The starting point

is used.
data bard;
input r @@;
w1 = 16. - _n_;
w2 = min(_n_ , 16. - _n_);
datalines;
.14 .18 .22 .25 .29 .32 .35 .39
.37 .58 .73 .96 1.34 2.10 4.39
;
proc nlp data=bard tech=levmar;
lsq y;
parms x1-x3 = 1.;
y = r - (x1 + _obs_ / (w1 * x2 + w2 * x3));
run;
Formulation in PROC OPTMODEL:
proc optmodel;
set S = 1..15;
number u{k in S} = k;
number v{k in S} = 16 - k;
number w{k in S} = min(u[k], v[k]);
number y{S} = [ .14 .18 .22 .25 .29 .32 .35 .39 .37 .58
.73 .96 1.34 2.10 4.39 ];
var x{1..3} init 1;
min f = 0.5*sum{k in S} ( y[k] -
( x[1] + u[k]/(v[k]*x[2] + w[k]*x[3]) )
)^2;
solve with nlpc / printfreq=1;
print x;
quit;
Operating System and Release Information
SAS System | SAS/OR | z/OS | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows XP Professional | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | |
Topic: | Analytics ==> Mathematical Optimization SAS Reference ==> Procedures ==> OPTMODEL
|
Date Modified: | 2011-01-05 14:25:27 |
Date Created: | 2010-11-23 11:31:14 |