急!lingo程序运行时出现以下错误:index variables may not share names with other variables.SETS:PORTE/1,2,3,4,5,6,7,8,9/:INCLUDEA;PORTW/1,2,3,4/:INCLUDEB;PAIREW(PORTE,PORTW):FREIGHT,CARGO,B,V,S,L;ENDSETSMAX=@SUM(PAIREW(i,j):FREIGHT(i,j)*CA
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 11:47:05
急!lingo程序运行时出现以下错误:index variables may not share names with other variables.SETS:PORTE/1,2,3,4,5,6,7,8,9/:INCLUDEA;PORTW/1,2,3,4/:INCLUDEB;PAIREW(PORTE,PORTW):FREIGHT,CARGO,B,V,S,L;ENDSETSMAX=@SUM(PAIREW(i,j):FREIGHT(i,j)*CA
急!lingo程序运行时出现以下错误:index variables may not share names with other variables.
SETS:
PORTE/1,2,3,4,5,6,7,8,9/:INCLUDEA;
PORTW/1,2,3,4/:INCLUDEB;
PAIREW(PORTE,PORTW):FREIGHT,CARGO,B,V,S,L;
ENDSETS
MAX=@SUM(PAIREW(i,j):FREIGHT(i,j)*CARGO(i,j))-60580000-346000*@SUM(PORTE(i):INCLUDEA(i))-346000*@SUM(PORTW(j):INCLUDEB(j))-154*@SUM(PAIREW(i,j):CARGO(i,j));
!FREIGHT CALCULATION;
CALC:
FREIGHT(i,j)=(1.5*(60580000+346000*@SUM(PORTE(i):INCLUDEA(i))+346000*@SUM(PORTW(j):INCLUDEB(j))+154*@SUM(PAIREW(i,j):CARGO(i,j)))*L(i,j))
/(6700*@SUM(PAIREW(i,j):CARGO(i,j)));
!CARGO QUANTITY CALCULATION;
CARGO(i,j)=B(i,j)-V(i,j)*FREIGHT(i,j);
ENDCALC
@FOR(PORTE(i):@BIN(INCLUDEA(i)));
@FOR(PORTW(j):@BIN(INCLUDEB(j)));
@FOR(PORTE(i):@SUM(PORTE(i):INCUDEA(i))<=5);
@FOR(PORTE(i):@SUM(PORTE(i):INCUDEA(i))>=2);
@FOR(PORTW(j):@SUM(PORTW(j):INCUDEB(j))<=2);
@FOR(PORTW(j):@SUM(PORTW(j):INCUDEB(j))>=1);
DATA:
L=
6534,6520,7144,6827,
6499,6485,7109,6798,
6758,6749,7373,7061,
6745,6731,7355,7038,
6129,6119,6739,6428,
6090,6079,6700,6389,
5086,5075,5696,5384,
6114,6103,6724,6415,
6132,6121,6742,6432;
B=
89.7,18.22,603.08,54.9,
90.64,106.22,4834.6,153.7,
168,237.24,4125,813,
1278.5,1205.3,28317.5,1511,
1959.54,3237.88,19015.34,1375.5,
1338.98,1748.88,8900.06,516.84,
1508,410.42,5410.54,711.75,
137,248.98,2117.36,446.4,
68.98,294.66,902.3,515.36;
V=
0.03,0.01,0.18,0.01,
0.11,0.12,1.54,0.05,
0.04,0.07,1.25,0.24,
0.34,0.35,8.75,0.44,
0.63,1.12,6.66,0.45,
0.44,0.61,3.07,0.16,
0.55,0.17,2.12,0.25,
0.05,0.09,0.56,0.11,
0.02,0.11,0.27,0.14;
ENDDATA
急!lingo程序运行时出现以下错误:index variables may not share names with other variables.SETS:PORTE/1,2,3,4,5,6,7,8,9/:INCLUDEA;PORTW/1,2,3,4/:INCLUDEB;PAIREW(PORTE,PORTW):FREIGHT,CARGO,B,V,S,L;ENDSETSMAX=@SUM(PAIREW(i,j):FREIGHT(i,j)*CA
calc里面那句 你循环要写@for啊 这样当然不对