下载此文档

第四章非线性规划.doc


文档分类:高等教育 | 页数:约9页 举报非法文档有奖
1/9
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/9 下载此文档
文档列表 文档介绍
第四章非线性规划
本章, 我们介绍两种解决非线性规划问题的软件:
第一种: MATLAB中的optimization toolbox 中的若干程序;
第二种: LINGO软件.

无约束问题
程序名: unpfun1函数, unpfun2函数
unpfun1 实例:
Minimize the function
在命令窗口输入以下信息:
>> x0=[1,1]; % Then call fminunc to find a minimum of unpfun1 near [1,1]
>> [x,fval]=fminunc(***@unpfun1,x0)
输出以下信息:
Optimization terminated essfully:
Search direction less than 2*
x =
-008 *
-
fval =
-016
unpfun2实例:将上述的实例用梯度法做
在命令窗口输入以下信息:
>> options = optimset('GradObj','on'); % To minimize this function with the gradient provided
>> x0 = [1,1];
>> [x,fval] = fminunc(***@unpfun2,x0,options)
输出以下信息:
Optimization terminated essfully:
First-order optimality less than , and no negative/zero curvature detected
x =
-015 *
-
fval =
-031
程序的相关知识:
第一种: fminsearch
Find a minimum of an unconstrained multivariable function
where x is a vector and f(x) is a function that returns a scalar.
语法如下:
x = fminsearch(fun,x0)
x = fminsearch(fun,x0,options)
[x,fval] = fminsearch(...)
[x,fval,exitflag] = fminsearch(...)
[x,fval,exitflag,output] = fminsearch(...)
解释:
fminsearch attempts to find a minimum of a scalar function of several variables, starting at an initial estimate. This is generally referred to as unconstrained nonlinear optimization.
x = fminsearch(fun,x0) starts at the point x0 and at

第四章非线性规划 来自淘豆网www.taodocs.com转载请标明出处.