求改lingo程序,用sets:endsets
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/11 19:22:36
求改lingo程序,用sets:endsets
min=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));
2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;
@gin(x11);
@gin(x21);
@gin(x31);
@gin(x41);
@gin(x51);
@gin(x61);
@gin(x71);
@gin(x12);
@gin(x22);
@gin(x32);
@gin(x42);
@gin(x52);
@gin(x62);
@gin(x72);
end
min=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));
2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;
@gin(x11);
@gin(x21);
@gin(x31);
@gin(x41);
@gin(x51);
@gin(x61);
@gin(x71);
@gin(x12);
@gin(x22);
@gin(x32);
@gin(x42);
@gin(x52);
@gin(x62);
@gin(x72);
end
sets:
r/1..7/:d1,d2,d3;
c/1..2/:;
link(r,c):x;
endsets
data:
d1= 48.7 52.0 61.3 72.0 48.7 52.0 64.0;
d2= 2 3 1 0.5 4 2 1;
d3= 8 7 9 6 6 4 8;
enddata
min=1020*2-@sum(link(i,j):d1(i)*x(i,j));
@for(c(j):@sum(r(i):d2(i)*x(i,j))
r/1..7/:d1,d2,d3;
c/1..2/:;
link(r,c):x;
endsets
data:
d1= 48.7 52.0 61.3 72.0 48.7 52.0 64.0;
d2= 2 3 1 0.5 4 2 1;
d3= 8 7 9 6 6 4 8;
enddata
min=1020*2-@sum(link(i,j):d1(i)*x(i,j));
@for(c(j):@sum(r(i):d2(i)*x(i,j))
求改lingo程序,用sets:endsets
关于LINGO程序lingo程序如下:sets:a/1..5/:x; endsets data:x=1,2,3,4,5;
lingo 这下面是代码model:sets:days/mon..sun/:required,start;endsets
lingo 哪错了model:sets:year/1..15/:bank,st,xz;endsets@for(year:
求大神改一下lingo程序
lingo的数据拟合model:sets:xl/1..5/:n,y; endsets data:n=19,20,22,2
lingo 整数规划model:sets:P/1,2/;Q/1..6/:a,b,d;R(P,Q):c,z;endsets
用Lingo编写个程序,求最大值.
lingo程序求解释~
lingo下标的问题比如:sets:product/0,1,2,3,4,5,6,7/:m;endsets那么我在调用 m
lingo 不等于例如:xi不等于xj(i,j=1,2,3,4,5)其中i不等于j用lingo怎么编写程序.sets:v
lingo程序错在哪里?如何改?