机械优化设计课后程序考核题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
机械优化设计程序考核题
1、一维搜索方法程序考核题
()3610min 2+-=t t t f
最优解:()0.11,0.5*
*==t f t to =
fo =
11
2、无约束优化方法程序考核题
()()()2
221654min -+-=x x x f 初始点:()45,]9,8[00==x
f x T 最优解:()0,]6,5[**==x f x T
运行结果:
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 .
Computing finite-difference Hessian using user-supplied objective function.
x =
fval =
exitflag =
1
output =
iterations: 7
funcCount: 24
stepsize: 1
firstorderopt:
algorithm: 'medium-scale: Quasi-Newton line search'
message: 'Optimization terminated: relative infinity-norm of gradient less than .'
grad =
*
hessian =
3、约束优化方法的程序考核题
()()()2
22112min -+-=x x x f . ()()0
20
2122211≤-+=≤-=x x x g x x x g 初始点:()5,]3,3[00==x
f x T 最优解:()1,]1,1[**==x f x 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 =
c =
c =
c =
c =
c =
c =
c =
Optimization terminated: first-order optimality measure less than and maximum constraint violation is less than .
Active inequalities (to within = 1e-006):
lower upper ineqlin ineqnonlin
1 1
x =
fval =
exitflag =
1
output =
iterations: 2
funcCount: 11
stepsize: 1
algorithm: 'medium-scale: SQP, Quasi-Newton, line-search' firstorderopt:
cgiterations: []
message: [1x143 char]
lambda =
lower: [2x1 double]
upper: [2x1 double]
eqlin: [0x1 double]
eqnonlin: [0x1 double]
ineqlin:
ineqnonlin:
grad =
hessian =