作业帮 > 综合 > 作业

LINGO语法错误求修改,

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 21:17:23
LINGO语法错误求修改,
SETS:
CITY/1..7/:X;
AREA/1..8/:a,b,c,d,e,f,g;
LINK(CITY,AREA):N;
ENDSETS
DATA
a=1,1,1,1,0,0,0,0;
b=0,0,0,0,1,1,1,1;
c=0,1,1,1,1,1,0,0;
d=1,0,0,0,0,0,1,1;
e=0,0,0,1,1,1,1,0;
f=1,0,1,1,0,0,0,1;
g=0,0,0,0,1,1,1,1;
ENDDATA
MIN = 500000*X(1)+800000*X(2)+400000*X(3)+900000*X(4)+300000*X(5)+450000*X(6)+550000*X(7);
@FOR(AREA(M):[AREA_CON]@SUM(CITY(I):X(I)*N(I,M)>0;);
@BIN(X(I));
LINGO语法错误求修改,
SETS:
CITY/1..7/:X;
AREA/1..8/:a,b,c,d,e,f,g;
LINK(CITY,AREA):N;
ENDSETS
DATA:
a=1,1,1,1,0,0,0,0;
b=0,0,0,0,1,1,1,1;
c=0,1,1,1,1,1,0,0;
d=1,0,0,0,0,0,1,1;
e=0,0,0,1,1,1,1,0;
f=1,0,1,1,0,0,0,1;
g=0,0,0,0,1,1,1,1;
ENDDATA
MIN = 500000*X(1)+800000*X(2)+400000*X(3)+900000*X(4)+300000*X(5)+450000*X(6)+550000*X(7);
@FOR(AREA(M):[AREA_CON]@SUM(CITY(I):X(I)*N(I,M))>0;);
@FOR(CITY(I):@BIN(X(I)));