新手求助:lingo语言翻译
楼主 · 1 楼
本人刚开始学习lingo,只会建立简单模型进行简单计算。请教各位,如何将下面的问题使用lingo编程的方式写出来(含model,set,data等关键字的方式)?麻烦了!谢谢了!
min=(f1-40)^2+(f2-50)^2+(f3-60)^2;
f1=x1*f11+x2*f12+x3*f13;
f2=x1*f21+x2*f22+x3*f23;
f3=x1*f31+x2*f32+x3*f33;
f11=x1^0.5+1;
f12=x2^0.5+2;
f13=x3^0.5+3;
f21=x1^0.7+1;
f22=x2^0.7+2;
f23=x3^0.7+3;
f31=x1^0.9+1;
f32=x2^0.9+2;
f33=x3^0.9+3;
@bnd(0,x1,10);
@bnd(0,x2,10);
@bnd(0,x3,10);
min=(f1-40)^2+(f2-50)^2+(f3-60)^2;
f1=x1*f11+x2*f12+x3*f13;
f2=x1*f21+x2*f22+x3*f23;
f3=x1*f31+x2*f32+x3*f33;
f11=x1^0.5+1;
f12=x2^0.5+2;
f13=x3^0.5+3;
f21=x1^0.7+1;
f22=x2^0.7+2;
f23=x3^0.7+3;
f31=x1^0.9+1;
f32=x2^0.9+2;
f33=x3^0.9+3;
@bnd(0,x1,10);
@bnd(0,x2,10);
@bnd(0,x3,10);