早教吧作业答案频道 -->数学-->
急!lingo程序运行时出现以下错误:indexvariablesmaynotsharenameswithothervariables.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
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
▼优质解答
答案和解析
calc里面那句 你循环要写@for啊 这样当然不对
看了 急!lingo程序运行时出现...的网友还看了以下:
高一数学指数,对数函数!要详细过程!请指教!一.求下列函数的定义域.1.y=根号下的1-3^x2. 2020-04-27 …
化简(3√5-2√3)(2√5+3√3)(3√5-2√3)(2√5+3√3)根号前面的是几倍,(3 2020-05-13 …
[根号下54-根号6分之1-2倍根号2分之1]+根号下32-2分之1倍根号下242倍根号3分之2- 2020-05-15 …
根号下2+3分之2=2.根据规律得出一般性结论 根号下2+3分之2=2倍根号3分之2 根号下3+8 2020-05-16 …
1)(3次根号下25-根号下125)除以4次根号下52)4次根号下81乘根号下9的3分之2次方3) 2020-05-17 …
某市对50户居民的家庭存款额进行了调查,数据如下(单位:万元)如下1.6,3.5,2.3,6.5, 2020-06-07 …
一些二次根试计算(1)(根号下8a^3/c^4)/(-根号下ab/2c^2)(2)3(根号下2)/ 2020-06-17 …
时钟敲3下2秒钟敲完,敲5下几秒 2020-06-23 …
观察下列各式:1*2=1/3(1*2*3-0*1*2)观察下列各式:1×2=1/3(1×2×3-0 2020-07-31 …
2道数学题x+y+z=2倍(根号下X-1加根号下Y-2加根号下Z-3的和)+3,求未知数XYZ(X+ 2020-11-07 …