求大神帮忙看看下面的lingo程序的错误?错误代码11.INVALID INPUT. A SYNTAX ERROR HAS OCCURRED.

2024-11-29 15:12:18
推荐回答(1个)
回答(1):

你写的可以说完全不对而且最后的条件里面还有无用的条件 不知道你什么意思

大概这样改了一下

model:
sets:
train/1..7/:x,y,h,w,n;
endsets
data:
h=48.7,52.0,61.3,72.0,48.7,52.0,64.0;
w=2,3,1,0.5,4,2,1;
n=8,7,9,6,6,4,8;
enddata
max = @sum(train(i):h(i)*x(i)+h(i)*y(i));
@for(train:h*x<=302.7;
h*y<=302.7;
w*x<=40;
w*y<=40;);