lingo编程进去结果显示错误,求大神帮忙啊

model:
SetS:
suPPlies/whl..wh3/:caPacity,starttime;
needs/vl..v4/:demand,expecttime;
links(suPPlies,needs):cost,volume,transtime,delaytime,limivolume;
endsets
min==@sum(links:cost*volume+Parameter*cost*delaytime);
@for(needs(J):
@sum(suPPlies(I):volume(I,J))==demand(J));
@for(suPPlies(I):
@sum(needs(J):volume(I,J))<==caPacity(I));
@for(links(I,J):
delaytime(I,J)==@abs(transtime(I,J)一exPecttime(J));
);
@for(1inks(I,J):
volutne(I,J)<==limivolume(I,J));
@for(links(I,J):
@gin(volume));
data:
caPacity==300 600 810;
demand==250 370 580 500;
cost==220 1294 2163
1300 866 1034 1700
1900 1400 1750 1992;
transtime==1 2 6 6
7 6 7 7
7 6 7 8;
exPecttime==1 2 6 6;
limiVOlume==300 100 300 200
300 200 100 300
200 300 300 100;
Parameter==0.5;
enddata
end

第1个回答  推荐于2016-07-11
现在,没有错了

model:
!3发点4收点基于客户满意的空箱调运问题;
sets:
suPPlies/wh1..wh3/:caPacity,starttime;
needs/v1..v4/:demand,expecttime;
links(suPPlies,needs):cost,volume,transtime,delaytime,limivolume;
endsets

!这里是数据;
data:
caPacity=300 600 810;
demand=250 370 580 500;
cost=220 400 1294 2163
1300 866 1034 1700
1900 1400 1750 1992;
transtime=1 2 6 6
7 6 7 7
7 6 7 8;
exPecttime=1 2 6 6;
limivolume=300 100 300 200
300 200 100 300
200 300 300 100;
Parameter=0.5;
enddata

!目标函数;
min=@sum(links:cost*volume+Parameter*cost*delaytime);
!需求约束;
@for(needs(J):
@sum(suPPlies(I):volume(I,J))=demand(J));
!g供应约束;
@for(suPPlies(I):
@sum(needs(J):volume(I,J))<=caPacity(I));
!时间约束;
!@for(links(I,J):
delaytime(I,J)=@abs(transtime(I,J)-exPecttime(J));
!运力约束;
@for(links(I,J):
volume(I,J)<=limivolume(I,J));
!整数约束;
@for(links(I,J):@gin(volume(I,J)));

end追问

大神,怎么答谢你啊。可以私信吗

本回答被提问者采纳
相似回答