大家看看这个lingo程序哪里错了啊····谢谢各位model:title first stepsets:demand/1,2/:dem;supply/1..5/:sup;link(supply,demand):,d,c;endsetsmin=@sum(link(i,j):d(i,j)*c(i,j));@for(suply(i):@sum(demand(j):c(i,j))dem(j));data:sup=640,390,520,150,400;demand=1000,700;d=120 321.6157.6 177.6200.4 122.4288 210204 400.8; enddataend
问题描述:
大家看看这个lingo程序哪里错了啊····谢谢各位
model:
title first step
sets:
demand/1,2/:dem;
supply/1..5/:sup;
link(supply,demand):,d,c;
endsets
min=@sum(link(i,j):d(i,j)*c(i,j));
@for(suply(i):@sum(demand(j):c(i,j))dem(j));
data:
sup=640,390,520,150,400;
demand=1000,700;
d=120 321.6
157.6 177.6
200.4 122.4
288 210
204 400.8;
enddata
end
答
model:
title first step;
sets:
demand/1,2/:dem;
supply/1..5/:sup;
link(supply,demand):d,c;
endsets
min=@sum(link(i,j):d(i,j)*c(i,j));
@for(supply(i): @sum(demand(j):c(i,j))dem(j));
data:
sup=640,390,520,150,400;
dem=1000,700;
d=120 321.6
157.6 177.6
200.4 122.4
288 210
204 400.8;
enddata
end