运行如下lingo程序时,出现index variables may not share names with others variables,这是为什么?model:sets:m/1..1000/;n/1..100/;numbers/v1..v100/:demand;links(m,n):a,x,y;endsetsmax=@sum(links:0.8*a(I,J)*x(I,J)+0.8*a(I-400,J)*y(I,J)-demand(
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 03:54:35
运行如下lingo程序时,出现index variables may not share names with others variables,这是为什么?model:sets:m/1..1000/;n/1..100/;numbers/v1..v100/:demand;links(m,n):a,x,y;endsetsmax=@sum(links:0.8*a(I,J)*x(I,J)+0.8*a(I-400,J)*y(I,J)-demand(
运行如下lingo程序时,出现index variables may not share names with others variables,这是为什么?
model:
sets:
m/1..1000/;
n/1..100/;
numbers/v1..v100/:demand;
links(m,n):a,x,y;
endsets
max=@sum(links:0.8*a(I,J)*x(I,J)+0.8*a(I-400,J)*y(I,J)-demand(J));
@for(links:x(I,J)+y(I,J)
运行如下lingo程序时,出现index variables may not share names with others variables,这是为什么?model:sets:m/1..1000/;n/1..100/;numbers/v1..v100/:demand;links(m,n):a,x,y;endsetsmax=@sum(links:0.8*a(I,J)*x(I,J)+0.8*a(I-400,J)*y(I,J)-demand(
集循环函数的集名后面和变量名后面都带上下标
另外你的a(I-400,J)在I小于400的时候怎么办你考虑过吗