SAS IML. Язык программирования (1185353), страница 2
Текст из файла (страница 2)
A l l r i g h t s r es er v e d .МАТЕМАТИЧЕСКИЕ МЕТОДЫ ОПТИМИЗАЦИИВ SAS/IMLC op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .НЕЛИНЕЙНАЯ ОПТИМИЗАЦИЯSAS/IML включает ряд процедур для оптимизации нелинейнойфункции:f = f(x) от n параметров, где x = (x1, … , xn)TОграничения на параметры могут быть тоже нелинейными.Реализован следующий набор функций:• NLPCG – Conjugate Gradient Method• NLPDD – Double Dogleg Method• NLPNMS – Nelder-Mead Simplex Method• NLPNRA – Newton-Raphson Method• NLPNRR – Newton-Raphson Ridge Method• NLPQN – (Dual) Quasi-Newton Method• NLPQUA – Quadratic Optimization Method• NLPTR – Trust-Region Method19C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .НЕЛИНЕЙНАЯ ОПТИМИЗАЦИЯНабор процедур для оптимизации функции наименьших квадратов,когда целевая функция имеет вид:f(x) = ½{f12(x)+…+fm2(x)}••NLPLM – Levenberg-Marquardt Least Squares MethodNLPHQN – Hybrid Quasi-Newton Least Squares MethodsНабор функций для приближения первой и второй производной:• NLPFDD – Approximate Derivatives by Finite Differences• NLPFEA – Feasible Point Subject to Constraints20C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c .
A l l r i g h t s r es er v e d .НЕЛИНЕЙНАЯ ОПТИМИЗАЦИЯДля вызова методов используется команда CALL:CALL NLPTR(…);Нужно иметь в виду, что результаты зависят от начальной точки:proc iml;start F_GLOBAL(x);f=(3*x[1]**4-28*x[1]**3+84*x[1]**2-96*x[1]+64)/27 + x[2]**2;return(f);finish F_GLOBAL;xa = {.5 1.5};xb = {3 -1};optn = {0 2};call nlptr(rca,xra,"F_GLOBAL",xa,optn);call nlptr(rcb,xrb,"F_GLOBAL",xb,optn);print xra xrb;21C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .НЕЛИНЕЙНАЯ ОПТИМИЗАЦИЯДля решения задач нелинейной оптимизации можно использоватьпроцедуры языка SAS/OR (Operation Research).Преимущества SAS/IML:• You can use matrix algebra to specify the objective function, nonlinearconstraints, and their derivatives in IML modules.• The IML procedure offers several subroutines that can be used tospecify the objective function or nonlinear constraints, many of whichwould be very difficult to write for the NLP procedure.• You can formulate your own termination criteria by using the “ptit”module argument.22C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c .
A l l r i g h t s r es er v e d .ВОПРОСЫ?C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .sas.com.