机械优化设计课后程序考核题

发布时间:2011-12-08 08:30:21   来源:文档文库   
字号:

机械优化设计程序考核题

1、一维搜索方法程序考核题

最优解:

to =

5.0000

fo =

11

2、无约束优化方法程序考核题

初始点:

最优解:

运行结果:

Warning: Gradient must be provided for trust-region method;

using line-search method instead.

> In fminunc at 241

Optimization terminated: relative infinity-norm of gradient less than options.TolFun.

Computing finite-difference Hessian using user-supplied objective function.

x =

5.0000 6.0000

fval =

1.9895e-012

exitflag =

1

output =

iterations: 7

funcCount: 24

stepsize: 1

firstorderopt: 2.8610e-006

algorithm: 'medium-scale: Quasi-Newton line search'

message: 'Optimization terminated: relative infinity-norm of gradient less than options.TolFun.'

grad =

1.0e-005 *

0.0763

-0.2861

hessian =

8.0000 0

0 2.0000

3、约束优化方法的程序考核题

s.t.

初始点:

最优解:

运行结果

Warning: Large-scale (trust region) method does not currently solve this type of problem,

switching to medium-scale (line search).

> In fmincon at 260

c =

6

c =

6.0000

c =

6.0000

c =

2.0000

c =

2.0000

c =

2.0000

c =

9.9341e-009

c =

3.9736e-008

c =

-4.9671e-009

Optimization terminated: first-order optimality measure less than options.TolFun

and maximum constraint violation is less than options.TolCon.

Active inequalities (to within options.TolCon = 1e-006):

lower upper ineqlin ineqnonlin

1 1

x =

1.0000 1.0000

fval =

1.0000

exitflag =

1

output =

iterations: 2

funcCount: 11

stepsize: 1

algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'

firstorderopt: 6.6227e-009

cgiterations: []

message: [1x143 char]

lambda =

lower: [2x1 double]

upper: [2x1 double]

eqlin: [0x1 double]

eqnonlin: [0x1 double]

ineqlin: 0.6667

ineqnonlin: 0.6667

grad =

-2.0000

0.0000

hessian =

1.2000 0.4000

0.4000 1.8000

本文来源:https://www.2haoxitong.net/k/doc/4d3e6c583b3567ec102d8a7c.html

《机械优化设计课后程序考核题.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式