lingo,@for函数莫名报错sets:people/1..8/:n;level/1..4/:awarded;link(people,level):x;endsetsdata:n=11,3,8,45,4,40,3,34;awarded=59,30,30,29;enddatamin=@max(level(j):@max(people(i):n(i)/x(i,j))-@min(level(j):@min(people(i):n(i)/x(i,j)));@for(level(j):@sum(people(i):x(i,j))=awarded(j));!@for(people(i):@sum(level(j):x(i,j))=1);@for(people(i):x(i)
问题描述:
lingo,@for函数莫名报错
sets:
people/1..8/:n;
level/1..4/:awarded;
link(people,level):x;
endsets
data:
n=11,3,8,45,4,40,3,34;
awarded=59,30,30,29;
enddata
min=@max(level(j):@max(people(i):n(i)/x(i,j))-@min(level(j):@min(people(i):n(i)/x(i,j)));
@for(level(j):@sum(people(i):x(i,j))=awarded(j));!
@for(people(i):@sum(level(j):x(i,j))=1);
@for(people(i):x(i)
答
目标函数那句括号没有配对
另外你的那些x到底是一维的还是二维的