LINGO语法错误求修改,SETS:CITY/1..7/:X;AREA/1..8/:a,b,c,d,e,f,g;LINK(CITY,AREA):N;ENDSETSDATAa=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;ENDDATAMIN = 500000*X(1)+

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 11:21:15
LINGO语法错误求修改,SETS:CITY/1..7/:X;AREA/1..8/:a,b,c,d,e,f,g;LINK(CITY,AREA):N;ENDSETSDATAa=1,1,1,1,0,0,0

LINGO语法错误求修改,SETS:CITY/1..7/:X;AREA/1..8/:a,b,c,d,e,f,g;LINK(CITY,AREA):N;ENDSETSDATAa=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;ENDDATAMIN = 500000*X(1)+
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;ENDSETSDATAa=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;ENDDATAMIN = 500000*X(1)+
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)));