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

错误的地方在“max=@sum(height(i)*train1(i))+height(i)*train2(i))model:sets:train1/1..7/:x;tr... 错误的地方在“max = @sum(height(i)*train1(i))+height(i)*train2(i))

model:
sets:
train1/1..7/:x;
train2/1..7/:y;
height/1..7/:h;
weight/1..7/:w;
volume/1..7/: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(height(i)*train1(i))+height(i)*train2(i))
height(i)*train1(i)<=1024
height(i)*train2(i)<=1024
height(i)*train1(i)<=302.7
height(i)*train2(i)<=302.7
weight(i)*train1(i)<=40
weight(i)*train2(i)<=40
展开
 我来答
wswhk
2013-03-20 · TA获得超过7.1万个赞
知道顶级答主
回答量:4.6万
采纳率:68%
帮助的人:7.4亿
展开全部
你写的可以说完全不对而且最后的条件里面还有无用的条件 不知道你什么意思

大概这样改了一下

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;);
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式