|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<P><FONT size=5><STRONG>各位大侠:<BR>我用fmincon工具箱时,总是只优化初值一次,不知哪里有问题,运行程序如下:</STRONG></FONT><BR>y0=[-30000;-40000];<BR>lb=[-120000;-150000];<BR>ub=[-30000;-30000];<BR>options=optimset('GradObj','off');<BR>[y,fval,exitflag,output,lambda]=fmincon('ff1',y0,[],[],[],[],lb,ub,'mycon',options)<BR><FONT size=4><STRONG>计算后的结果显示如下:<BR></STRONG></FONT>In D:\MATLAB6p5\toolbox\optim\fmincon.m at line 213<BR>Optimization terminated successfully:<BR> Magnitude of directional derivative in search direction <BR> less than 2*options.TolFun and maximum constraint violation <BR> is less than options.TolCon<BR> No Active Constraints</P>
<P>y =</P>
<P> 1.0e+004 *</P>
<P> -3.0000<BR> -4.0000</P>
<P><BR>fval =</P>
<P> 0.1440</P>
<P><BR>exitflag =</P>
<P> 1</P>
<P><BR>output = </P>
<P> iterations: 1<BR> funcCount: 7<BR> stepsize: 1<BR> algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'<BR> firstorderopt: 3.3798e-005<BR> cgiterations: []</P>
<P><BR>lambda = </P>
<P> lower: [2x1 double]<BR> upper: [2x1 double]<BR> eqlin: [0x1 double]<BR> eqnonlin: [0x1 double]<BR> ineqlin: [0x1 double]<BR> ineqnonlin: 0<BR>约束函数居然用不上去<BR>求:各位高手帮我看一下,提出建议,不胜感谢!急~~~</P> |
|