lingo的数据拟合model:sets:xl/1..5/:n,y; endsets data:n=19,20,22,24,25; y=6,7,8,9,10; enddata @fr

问题描述:

lingo的数据拟合model:sets:xl/1..5/:n,y; endsets data:n=19,20,22,24,25; y=6,7,8,9,10; enddata @fr
model:
sets:
xl/1..5/:n,y;
endsets
data:
n=19,20,22,24,25;
y=6,7,8,9,10;
enddata
@free(a);@free(b);
min=@sum((@log(y)*a-b-n)*(@log(y)*a-b-n));
end
这段程序那里出错了?

model:
sets:
xl/1..5/:n,y;
endsets
data:
n=19,20,22,24,25;
y=6,7,8,9,10;
enddata
@free(a);@free(b);
min=@sum(xl:(@log(y)*a-b-n)*(@log(y)*a-b-n));!用@sum求和需指明所属集合;
end