用lingo求解下面程序时老出现error code50(for函数用错了),但是没错误啊,model:sets:wh/wh1 wh2 wh3 wh4 wh5 wh6/:capacity;ven/v1 v2 v3 v4 v5 v6/:demand;links(wh,ven):cost,volume;endsetsmin=@sum(links(i,j):cost(i,j)*volume(i,j);@for(ven(j):@sum(wh(i):volume(i,j))=demand(j));@for(wh(i):@sum(ven(j):volume(i,j))

问题描述:

用lingo求解下面程序时老出现error code50(for函数用错了),但是没错误啊,
model:
sets:
wh/wh1 wh2 wh3 wh4 wh5 wh6/:capacity;
ven/v1 v2 v3 v4 v5 v6/:demand;
links(wh,ven):cost,volume;
endsets
min=@sum(links(i,j):
cost(i,j)*volume(i,j);
@for(ven(j):
@sum(wh(i):volume(i,j))=demand(j));
@for(wh(i):
@sum(ven(j):volume(i,j))

model:
sets:
wh/wh1..wh6/:capacity;
ven/v1..v8/:demand;
links(wh,ven):cost,volume;
endsets
min=@sum(links(i,j):
cost(i,j)*volume(i,j));
@for(ven(j):
@sum(wh(i):volume(i,j))=demand(j));
@for(wh(i):
@sum(ven(j):volume(i,j))