早教吧 育儿知识 作业答案 考试题库 百科 知识分享

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最后的约束条件报错:indexvariablesmay

题目详情
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.实在不知道怎么错了,
▼优质解答
答案和解析
整个程序均有错误,如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,而不是字...