马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
%建立m文件:
function f=myfun(x)
f(1)=27.5*(x(2)+x(7)+x(11)+x(15));
f(2)=52299186225+11*(x(1)+x(6)+x(10));
f(3)=5117347125+5.5*(x(4)+x(8)+x(13)+x(17));
f(4)=3957497896+16.5*(x(3)+x(12)+x(16));
f(5)=856152000+22*(x(5)+x(9)+x(14));
%给定目标,权重按其目标值确定
goal=[3330547467.5,54323155755,8735673375,7667652173.5,3042072000];
weight=abs(goal);
x0=[1.50,0.63,0.70,1.86,2.59,1.14,0.39,0.09,0.78,0.31,0.98,1.22,1.05,0.88,];
%给出约束条件系数
A=[0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0
0,-1,0,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0
1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0
-1,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0
0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1
0,0,0,-1,0,0,0,-1,0,0,0,0,-1,0,0,0,-1
0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0 n
0,0,-1,0,0,0,0,0,0,0,0,-1,0,0,0,-1,0
0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0
0,0,0,0,-1,0,0,0,-1,0,0,0,0,-1,0,0,0
1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0];
b=[121110817,-96888653.6,183997230,-146291430,657877500,-206761500,224857835,-179886268,9936000,-77832000,352000000,39000000,550000000];
lb=zeros(17,1);
%命令窗求解:
[x,fval]=fgoalattain(@myfun,x0,goal,weight,A,b,[],[],lb,[]) %求解
|