tangxy03
2010-11-20, 16:34
有一个多目标优化问题:
目标有两个,同样主要。一个方程求其最大值,另一个求其最小值,用什么方法比较好?全是线性的。线性加权?还是其他?什么命令?:confused:
fun f0=ff(x)
yta=0.3;mu=0.3;h=0.001;
B=0.5;ty=36.25*B^2+82.3893*B-1.3536;
D2=x1-0.0005;D3=x1-2*h;D0=(x1+D3)/2;
ap=pi*(D3^2-x2^2)/4;ad=pi*(1/4*D2^2-x3^2);
f1=12*yta*x4*ap^2*mu/(pi*D0*h^3)+3*x4*ty*ap*10^3/h;
f2=32*yta*x5*ap*mu*ad/(pi*x3^4);
f3=0.4*5500;
k=(3*x4*ty*ap*10^3/h)/(f2+f3+12*yta*x4*ap^2*mu/(pi*D0*h^3))
F=0.5*abs(f1+f2+f3-80000)-0.5*k;
约束:
lb=[50;25;3;10;5];
ub=[150;80;15;120;20];
结果
[x,fval,exitflag]=fmincon(@ff,x0,[],[],[],[],lb,ub)
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In C:\MATLAB6p5\toolbox\optim\fmincon.m at line 213
??? Error using ==> fmincon
FMINCON cannot continue because user supplied objective function
failed with the following error:
Error: File: C:\MATLAB6p5\work\ff.m Line: 1 Column: 6
Missing operator, comma, or semicolon.
目标有两个,同样主要。一个方程求其最大值,另一个求其最小值,用什么方法比较好?全是线性的。线性加权?还是其他?什么命令?:confused:
fun f0=ff(x)
yta=0.3;mu=0.3;h=0.001;
B=0.5;ty=36.25*B^2+82.3893*B-1.3536;
D2=x1-0.0005;D3=x1-2*h;D0=(x1+D3)/2;
ap=pi*(D3^2-x2^2)/4;ad=pi*(1/4*D2^2-x3^2);
f1=12*yta*x4*ap^2*mu/(pi*D0*h^3)+3*x4*ty*ap*10^3/h;
f2=32*yta*x5*ap*mu*ad/(pi*x3^4);
f3=0.4*5500;
k=(3*x4*ty*ap*10^3/h)/(f2+f3+12*yta*x4*ap^2*mu/(pi*D0*h^3))
F=0.5*abs(f1+f2+f3-80000)-0.5*k;
约束:
lb=[50;25;3;10;5];
ub=[150;80;15;120;20];
结果
[x,fval,exitflag]=fmincon(@ff,x0,[],[],[],[],lb,ub)
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In C:\MATLAB6p5\toolbox\optim\fmincon.m at line 213
??? Error using ==> fmincon
FMINCON cannot continue because user supplied objective function
failed with the following error:
Error: File: C:\MATLAB6p5\work\ff.m Line: 1 Column: 6
Missing operator, comma, or semicolon.