lingo中运行,出错了,model:sets:hotel/1..10/:n,a;kind/1..6/;links(hotel,kind):x,b,p;endsetsmin=@sum(hotel(i):n(i));@for(kind:@sum(hotel(i):x(i,j))=m*p(i,j));@for(hotel:@sum(kind:x(i,j))=a(i));@for(hotel:n(i)=@if(a(i)#eq#0,0,1));@for(kind|j#ge#1#a
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 18:03:09
lingo中运行,出错了,model:sets:hotel/1..10/:n,a;kind/1..6/;links(hotel,kind):x,b,p;endsetsmin=@sum(hotel(i):n(i));@for(kind:@sum(hotel(i):x(i,j))=m*p(i,j));@for(hotel:@sum(kind:x(i,j))=a(i));@for(hotel:n(i)=@if(a(i)#eq#0,0,1));@for(kind|j#ge#1#a
lingo中运行,出错了,
model:
sets:
hotel/1..10/:n,a;
kind/1..6/;
links(hotel,kind):x,b,p;
endsets
min=@sum(hotel(i):n(i));
@for(kind:@sum(hotel(i):x(i,j))=m*p(i,j));
@for(hotel:@sum(kind:x(i,j))=a(i));
@for(hotel:n(i)=@if(a(i)#eq#0,0,1));
@for(kind|j#ge#1#and#j#le#3:x(i,j)
lingo中运行,出错了,model:sets:hotel/1..10/:n,a;kind/1..6/;links(hotel,kind):x,b,p;endsetsmin=@sum(hotel(i):n(i));@for(kind:@sum(hotel(i):x(i,j))=m*p(i,j));@for(hotel:@sum(kind:x(i,j))=a(i));@for(hotel:n(i)=@if(a(i)#eq#0,0,1));@for(kind|j#ge#1#a
我给你改过了啊 你每句下标都不要漏掉 然后第一个约束不对 最后两句的条件限制也不对