|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
[x,f,exitflag,output,lambda,grad,hessian]=fmincon('fun',x0,[],[],[],[],lb,ub,'confun',options)
运行程序后,各步迭代结果和输出信息如下,请各位高手诊断一下,为什么输出结果的firstorderopt 和 hessian矩阵的值看上去很奇怪?
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
Optimization terminated: magnitude of search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon.
No active inequalities
x =
Columns 1 through 9
0.9959 0.9838 0.9631 0.9331 0.8926 0.8390 0.7666 0.6672 0.5234
Column 10
0.6607
f =
0.3315
exitflag =
4
output =
iterations: 32
funcCount: 628
stepsize: 0.5000
algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'
firstorderopt: 707.1440
cgiterations: []
message: [1x142 char]
lambda =
lower: [10x1 double]
upper: [10x1 double]
eqlin: [0x1 double]
eqnonlin: [0x1 double]
ineqlin: [0x1 double]
ineqnonlin: [10x1 double]
grad =
-0.0654
705.2744
-0.0434
-0.0890
0.0762
-0.5614
707.1440
11.7971
11.5717
-0.8764
hessian =
1.0e+013 *
Columns 1 through 9
0.2866 0.1472 -0.0305 0.0639 0.1033 0.7275 0.6362 -0.0483 -0.2287
0.1472 0.1936 -0.0007 0.1433 -0.0459 -0.0338 0.1564 0.1402 0.1371
-0.0305 -0.0007 0.0084 0.0121 -0.0411 -0.1747 -0.1436 0.0499 0.0802
0.0639 0.1433 0.0121 0.1249 -0.0958 -0.2876 -0.0987 0.1792 0.2227
0.1033 -0.0459 -0.0411 -0.0958 0.2149 0.8495 0.6647 -0.2839 -0.4223
0.7275 -0.0338 -0.1747 -0.2876 0.8495 3.9221 2.9639 -1.0251 -1.8359
0.6362 0.1564 -0.1436 -0.0987 0.6647 2.9639 2.5616 -0.7417 -1.2689
-0.0483 0.1402 0.0499 0.1792 -0.2839 -1.0251 -0.7417 0.4328 0.5823
-0.2287 0.1371 0.0802 0.2227 -0.4223 -1.8359 -1.2689 0.5823 0.9890
-0.3590 0.3887 0.1251 0.4779 -0.6865 -3.1089 -1.8629 0.9809 1.6688
Column 10
-0.3590
0.3887
0.1251
0.4779
-0.6865
-3.1089
-1.8629
0.9809
1.6688
3.3615
请教各位高手: 这个程序结果不对吧?
1. firstorderopt=707.1440 很奇怪,一般这一项都是等于0的吧?
2. Hessian矩阵值好象也不对,太大了.
但exitflag = 4又提示成功收敛. 所以我不太清楚问题出在哪里,想请知道的高人出来指点一下,能否看出这个优化过程可能在哪里有问题?
[ 本帖最后由 woshiwobu 于 2008-6-11 16:26 编辑 ] |
|