model:sets:yh/1,2,3/:;fq/1,2,3/:;link(yh,fq):x,d;link1(fq):w;endsetsmin=0.5*@sum(yh(i):d(i,j)-x(i,j))+0.3*@sum(yh(i):d(i,j)-x(i,j))+0.2*@sum(yh(i):d(i,j)-x(i,j));@for(yh(i):@sum(fq(j):x(i,j))=o);lingo最后的约束条件报错:index variables may
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 22:56:51
model:sets:yh/1,2,3/:;fq/1,2,3/:;link(yh,fq):x,d;link1(fq):w;endsetsmin=0.5*@sum(yh(i):d(i,j)-x(i,j))+0.3*@sum(yh(i):d(i,j)-x(i,j))+0.2*@sum(yh(i):d(i,j)-x(i,j));@for(yh(i):@sum(fq(j):x(i,j))=o);lingo最后的约束条件报错:index variables may
model:
sets:
yh/1,2,3/:;
fq/1,2,3/:;
link(yh,fq):x,d;
link1(fq):w;
endsets
min=0.5*@sum(yh(i):d(i,j)-x(i,j))+0.3*@sum(yh(i):d(i,j)-x(i,j))+0.2*@sum(yh(i):d(i,j)-x(i,j));
@for(yh(i):@sum(fq(j):x(i,j))=o);
lingo最后的约束条件报错:index variables may not share names with other variables.实在不知道怎么错了,
model:sets:yh/1,2,3/:;fq/1,2,3/:;link(yh,fq):x,d;link1(fq):w;endsetsmin=0.5*@sum(yh(i):d(i,j)-x(i,j))+0.3*@sum(yh(i):d(i,j)-x(i,j))+0.2*@sum(yh(i):d(i,j)-x(i,j));@for(yh(i):@sum(fq(j):x(i,j))=o);lingo最后的约束条件报错:index variables may
整个程序均有错误,如
min=0.5*@sum(yh(i):d(i,j)-x(i,j))+0.3*@sum(yh(i):d(i,j)-x(i,j))+0.2*@sum(yh(i):d(i,j)-x(i,j));
有错,求和是对 i 求和,那 j 是多少?
@for(yh(i):@sum(fq(j):x(i,j))=o); 应该是数字0,而不是字母o,
建议重新写程序.