查看单个帖子
旧 2008-08-26, 22:34   #1
叉叉
初级会员
 
注册日期: 2008-08-14
年龄: 36
帖子: 17
声望力: 17
叉叉 正向着好的方向发展
默认 [求助]关于 fgoalattain 碰到的问题!

这是我编的一个用 fgoalattain 求多目标的规划问题 程序如下:

function f=ff12(x)

f(1)=-0.25*x(1)-0.2*x(2)-0.23*x(4)-0.185*x(5);
f(2)=1.4*x(1)+1.6*y(1);
f(3)=7.5*x(1)+6.1*x(2)+9*x(3)+7.35*x(4);
f(4)=85*x(5)+100*x(6)+20*x(7);

goal=[-20000,75000,965000,9000000];
weight=goal;
x0=ones(7,1).*2000;
A=[0 0 0 0 1 1 0;0 0 0 0 0 -1 1];
b=[35000;82000];
Aeq=[1 1 0 0 -1 0 -1;0 0 1 1 0 -1 1];
beq=[35000;82000];
lb=zeros(7,1);
[x,fval,attainfactor,exitflag]=fgoalattain(@ff12,x0,goal,weight,A,b,Aeq,beq,lb,[]);

运行后弹出这个:cry: 这是怎么回事啊? 高手帮帮忙看看,谢谢!!!
first
Optimization terminated: magnitude of search direction less than 2*options.TolX
and maximum constraint violation is less than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
5 1
6
叉叉 当前离线   回复时引用此帖