求高手给我检查一下下面的lingo程序有什么错误,谢啦!!!急!!!!

怎么老是显示r那地方出错呢?model:sets:room:s1,s2;light:a,b;open(room,light):r;endsetsdata:a=40,40,... 怎么老是显示r那地方出错呢?
model:
sets:
room:s1,s2;
light:a,b;
open(room,light):r;
endsets
data:
a=40,40,50,48,45
45,48,45,40,45
40,45,48,50,40
40,50,48,45,45
48,45,40,45,40
45,48,50,48,50
40,45,40,45,48
50,48,48,50,48
50,48,48,50,48;
b=42,42,48,50,36
36,36,36,36,36
27,75,48,50,42
42,48,50,36,36
36,36,36,36,27
75,48,50,48,50
36,36,27,75,48
50,48,48,50,48
50,48,48,25,45;
s1=57,79,173,173,115
108,108,108,99,108
57,222,171,189,63
76,172,175,115,108
108,108,99,144,63
230,171,189,171,184
99,144,63,230,171
189,171,171,189,180
135,135,162,63,108;
s2=51,70,154,154,102
96,96,96,88,96
51,197,152,168,56
68,153,156,102,96
96,96,88,128,56
204,152,168,152,164
88,128,56,204,152
168,152,152,168,160
120,120,144,56,96;
enddata
min=@sum(r*a*b);
@bin(r(i,j));
@sum(room(i,j):r(i,j)*s1)>=5320;
@sum(room(i,j):r(i,j)*s1)<=5600;
@sum(room(i,j):r(i,j)*s2)>=5600;
end
给出能运行的程序最好啊,谢谢!!!!
展开
 我来答
wswhk
2011-08-29 · TA获得超过7.1万个赞
知道顶级答主
回答量:4.6万
采纳率:68%
帮助的人:7.4亿
展开全部
好吧 改成这样 对不对不保证

model:
sets:
room:s1,s2;
light:a,b;
open(room,light):r;
endsets
data:
a=40,40,50,48,45
45,48,45,40,45
40,45,48,50,40
40,50,48,45,45
48,45,40,45,40
45,48,50,48,50
40,45,40,45,48
50,48,48,50,48
50,48,48,50,48;
b=42,42,48,50,36
36,36,36,36,36
27,75,48,50,42
42,48,50,36,36
36,36,36,36,27
75,48,50,48,50
36,36,27,75,48
50,48,48,50,48
50,48,48,25,45;
s1=57,79,173,173,115
108,108,108,99,108
57,222,171,189,63
76,172,175,115,108
108,108,99,144,63
230,171,189,171,184
99,144,63,230,171
189,171,171,189,180
135,135,162,63,108;
s2=51,70,154,154,102
96,96,96,88,96
51,197,152,168,56
68,153,156,102,96
96,96,88,128,56
204,152,168,152,164
88,128,56,204,152
168,152,152,168,160
120,120,144,56,96;
enddata
min=@sum(open(i,j):r(i,j)*a(j)*b(j));
@for(open(i,j):@bin(r(i,j)));
@sum(open(i,j):r(i,j)*s1(i))>=5320;
@sum(open(i,j):r(i,j)*s1(i))<=5600;
@sum(open(i,j):r(i,j)*s2(i))>=5600;
end
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式