lingo运行时出现improper use of set name!MODEL:建立集合;SETS:Three products; PRODUCT/A,B,C/;Two distctrs; DISTCTR/DCl,DC2/;F;Five customers; CUSTOMER/C1,C2,C3,C4,C5/; D=Demand for a product by a customer.; DEMLINK(PRODUCT,CUSTOMER):D; Each

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 09:42:15
lingo运行时出现improperuseofsetname!MODEL:建立集合;SETS:Threeproducts;PRODUCT/A,B,C/;Twodistctrs;DISTCTR/DCl,

lingo运行时出现improper use of set name!MODEL:建立集合;SETS:Three products; PRODUCT/A,B,C/;Two distctrs; DISTCTR/DCl,DC2/;F;Five customers; CUSTOMER/C1,C2,C3,C4,C5/; D=Demand for a product by a customer.; DEMLINK(PRODUCT,CUSTOMER):D; Each
lingo运行时出现improper use of set name!
MODEL:
建立集合;
SETS:
Three products;
PRODUCT/A,B,C/;
Two distctrs;
DISTCTR/DCl,DC2/;F;
Five customers;
CUSTOMER/C1,C2,C3,C4,C5/;
D=Demand for a product by a customer.;
DEMLINK(PRODUCT,CUSTOMER):D;
Each customer is served by one DC,
indicated by Z.;
ZLINK(PRODUCT,DISTCTR,CUSTOMER):z;
C=Cost/ton of a product to a DC,
X=tons shipped.;
CLINK(PRODUCT,DISTCTR):C,X;
G=Cost/ton of a product from a DC to a customer:G;
GLINK(PRODUCT,DISTCTR,CUSTOMER):G;
ENDSETS
DATA:
Shipping costs,plant to DC;
C=3,3.5,Product A;
3.5,3,Product B;
3.5,3; Product C;
DC fixed costs;
F=30000,35000;
Shipping costs,DC to customer;
G=22,30,33,30,26,Product A;
25,33,36,30,28,
27,30,33,29,26,Product B;
25,32,35,29,26,
25,30,33,29,26,Product C;
25,32,33,29,28;
Customer Demands;
D=80,100,100,200,100,
240,160,280,150,150,
280,100,200,170,240;
ENDDATA
----------------------------------- ;
Objective function minimizes COSTS.;
[OBJ]MIN=SHIPDC+SHIPCUST+FXCOST;
SHIPDC=@SUM(CLINK:C*X);
SHIPCUST=
@SUM(GLINK(I,H,J):
G(I,H,J)*D(I,J)*Z(I,H,J));
Five customers;
FXCOST=@SUM(DISTCTR:F*X);
DC balance constraints;
@FOR(PRODUCT(I):
@FOR(DISTCTR(H):
X(I,H)=
@sum(CUSTOMER(J):D(I,J)*Z(I,H,J)))
);
Demands;
@FOR(PRODUCT(I):
@FOR(CUSTOMER(J):
@SUM(DISTCTR(H):Z(I,H,J))=1)
);
Z binary;
@FOR(PRODUCT(I):
@FOR(DISTCTR(H):
@FOR(CUSTOMER(J):@BIN(Z(I,H,J))))
);
END
FXCOST=@SUM(DISTCTR:F*X); 这一句显示是F出现错误,

lingo运行时出现improper use of set name!MODEL:建立集合;SETS:Three products; PRODUCT/A,B,C/;Two distctrs; DISTCTR/DCl,DC2/;F;Five customers; CUSTOMER/C1,C2,C3,C4,C5/; D=Demand for a product by a customer.; DEMLINK(PRODUCT,CUSTOMER):D; Each
MODEL:
!建立集合;
SETS:
!Three products;
PRODUCT/A,B,C/;
!Two distctrs;
DISTCTR/DCl,DC2/:F;
!Five customers;
CUSTOMER/C1,C2,C3,C4,C5/;
!D=Demand for a product by a customer.;
DEMLINK(PRODUCT,CUSTOMER):D;
!Each customer is served by one DC,
indicated by Z.;
ZLINK(PRODUCT,DISTCTR,CUSTOMER):z;
!C=Cost/ton of a product to a DC,
X=tons shipped. ;
CLINK(PRODUCT,DISTCTR):C, X;
!G=Cost/ton of a product from a DC to a customer: G;
GLINK(PRODUCT,DISTCTR,CUSTOMER):G;
ENDSETS
DATA:
!Shipping costs,plant to DC;
C=3,3.5, !Product A;
3.5,3, !Product B;
3.5,3; !Product C;
!DC fixed costs;
F=30000,35000;
!Shipping costs,DC to customer;
G=22,30,33,30,26,!Product A;
25,33,36,30,28,
27,30,33,29,26,!Product B;
25,32,35,29,26,
25,30,33,29,26,!Product C;
25,32,33,29,28;
!Customer Demands;
D=80,100,100,200,100,
240,160,280,150,150,
280,100,200,170,240;
ENDDATA
!----------------------------------- ;
!Objective function minimizes COSTS.;
[OBJ]MIN=SHIPDC+SHIPCUST+FXCOST;
SHIPDC=@SUM(CLINK:C*X);
SHIPCUST= @SUM(GLINK(I,H,J):
G(I,H,J)*D(I,J)*Z(I,H,J));
!Five customers;
FXCOST=@SUM(CLINK(I,J):F(J)*X(I,J));
!DC balance constraints;
@FOR(PRODUCT(I):
@FOR(DISTCTR(H):
X(I,H)=
@sum(CUSTOMER(J):D(I,J)*Z(I,H,J)))
);
!Demands;
@FOR(PRODUCT(I):
@FOR(CUSTOMER(J):
@SUM(DISTCTR(H):Z(I,H,J))=1)
);
!Z binary;
@FOR(PRODUCT(I):
@FOR(DISTCTR(H):
@FOR(CUSTOMER(J):@BIN(Z(I,H,J))))
);
END

lingo运行时出现improper use of set name!MODEL:建立集合;SETS:Three products; PRODUCT/A,B,C/;Two distctrs; DISTCTR/DCl,DC2/;F;Five customers; CUSTOMER/C1,C2,C3,C4,C5/; D=Demand for a product by a customer.; DEMLINK(PRODUCT,CUSTOMER):D; Each Lingo运行出现“Improper use of set name”,怎么修改?model:sets: num1/nl1/:i; num2/nz0..nz33/:j;endsets目标函数; min=@sum(num1(I):@sum(num2(J):num1(I)*Q-X0*((num1(I)-1)*t+num2(J))))*0.2+282*0.2+18*m*q+75*m+48000;约束条件; 3+(m-1)* Lingo 错误代码 12-(data missing right parenthesis)运行时出现,数据缺少右括号的错误,这是怎么回事? Improper use of @FOR() function 运行lingo出现了这句话sets:r/1..4/:f,g,d,a,y;c/1..12/:b;m(r,c):x,p;endsetsdata:p=24 35 47 43 83 80 97 100 96 85 57 6551 39 70 66 74 73 90 101 101 90 365841 49 83 56 64 63 80 68 91 80 382862 41 64 49 57 50 52 60 lingo程序如何运行 lingo运行错误improper use of attribute name,model:sets:chan/c1..c10/:p,q,w,f;xie/1..5/:d;links(chan,xie):x,c,l,a,b,t;endsets@for(chan(i):@sum(xie(j):x(i,j)) lingo运行时总是出现index variables may not share name with other variables是怎么回事用的下标n跟其他变量什么的没有重复的啊, lingo使用错误在使用lingo时出现unexpected jacobian overflow contact lindo systems for patch availability是怎么回事?由于初学lingo所以还请大家多多指教, 为啥运行LINGO时会出现错误代码11,MODEL:SETS:CHSH/1..6/;LINKS(CHSH,CHSH)/1,2 1,3 2,3 2,4 3,5 4,3 4,6 5,4 5,6 6,1/:C,U,F;ENDSETSDATA:U=8,7,5,9,9,2,5,6,10,15;C=2,8,5,2,3,1,6,4,7,8;ENDDATDN= @SIZE(CHSH);F(6,1)=14;MIN= @MIN( LINKS(I,J)|I#LT#N:C origin7.5运行时出现的对话框, 在运行Dota2时出现了下图, 在lingo里表示:当从0-1或从1-1,即运行状态时,使xmin lingo中tsp问题求解,运行时提示有语法错误,迷惑中...MODEL:SETS:CITY / 1..10/:U; LINK( CITY,CITY):DIST,X;ENDSETSDATA:DIST=0 22.3 22.7 24.5 22.7 22 22.1 26.5 27.3 24.222.3 0 1.8 5.1 3.3 2.5 3.6 9.2 10 6.122.7 1.8 0 3.5 5.1 2.6 1.8 7.4 8. LINGO运行时,总是提示:subscript out of range on attribute,程序如下model:sets:chang/1..3/:;cangku/1..5/:;wuzi/1..10/:t,c;dian/1..8/:;links1(cangku,wuzi):s,d;links2(dian,wuzi):u;links3(chang,wuzi):y;links4(chang,dian):a,x;endsetsdata:c=80,1 用LINGO做题时出现未知数怎么做? 请教各位LINGO高手,在lingo中,K属于1到3,I属于1到K-1怎么表示,就是求和时同时出现 为什么下面程序用lingo运行时出现subscript out of range on attribute 求解释?model:sets: cities/s,a1,a2,a3,b1,b2,c1,c2,t/:l; roads(cities,cities)/ s,a1 s,a2 s,a3 a1,b1 a1,b2 a2,b1 a2,b2 a3,b1 a3,b2 b1,c1 b1,c2 b2,c1 b2,b2 c1,t c2 急!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