首页 > 中学考试杂题 > 题目详情
哪位高手帮我看看下面这段lingo代码错在哪?model:sets:a/1,2,3/:x;b/1,2,3,4,5,6,7
题目内容:
哪位高手帮我看看下面这段lingo代码错在哪?
model:
sets:
a/1,2,3/:x;
b/1,2,3,4,5,6,7,8,9,10,11,12,13,14/:
dy(a,b);x,d;
endsets;
data:
d=458.1 269.9,242.6 0 63.5 183 220.4 250.2 162.6 176.8 88.1 149.6 367 284 406.4 247.9 180.8 176.4 209.6 340 146.8 126.2 105.8 0 98.1 214.2 485.1 298.2 297.1 126.7 59.5 220.4 253.6 373.3 0 141.5 54.3 145.8 131 269 551.9 176.9;
enddata
min=@sum(dy(i,j):d(i,j)*x(i,j));
@for(dy(i,j):@sum(x(i,j)=1));
end
哪位高手帮我看看下面这段lingo代码错在哪?
model:
sets:
a/1,2,3/:x;
b/1,2,3,4,5,6,7,8,9,10,11,12,13,14/:
dy(a,b);x,d;
endsets;
data:
d=458.1 269.9,242.6 0 63.5 183 220.4 250.2 162.6 176.8 88.1 149.6 367 284 406.4 247.9 180.8 176.4 209.6 340 146.8 126.2 105.8 0 98.1 214.2 485.1 298.2 297.1 126.7 59.5 220.4 253.6 373.3 0 141.5 54.3 145.8 131 269 551.9 176.9;
enddata
min=@sum(dy(i,j):d(i,j)*x(i,j));
@for(dy(i,j):@sum(x(i,j)=1));
end
model:
sets:
a/1,2,3/:x;
b/1,2,3,4,5,6,7,8,9,10,11,12,13,14/:
dy(a,b);x,d;
endsets;
data:
d=458.1 269.9,242.6 0 63.5 183 220.4 250.2 162.6 176.8 88.1 149.6 367 284 406.4 247.9 180.8 176.4 209.6 340 146.8 126.2 105.8 0 98.1 214.2 485.1 298.2 297.1 126.7 59.5 220.4 253.6 373.3 0 141.5 54.3 145.8 131 269 551.9 176.9;
enddata
min=@sum(dy(i,j):d(i,j)*x(i,j));
@for(dy(i,j):@sum(x(i,j)=1));
end
本题链接: