lingo for函数出错 sets:SUPPLY/s1 s2/;FACTORY/F1 F2/;DISTRIBUTION/D1 D2/;CUSTOMER/C1 C2/;MATERIAL/M1 M2 M3/;PRODUCT/P1/;TIME/T1 T2 T3 T4 T5/;SM_LINK(TIME,SUPPLY,MATERIAL):SMC,SMQ;FP_LINK(TIME,FACTORY,PRODUCT):FPc,FPQ;SFM_T_LINK(TIME,SUPPLY,FACTORY

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 13:26:30
lingofor函数出错sets:SUPPLY/s1s2/;FACTORY/F1F2/;DISTRIBUTION/D1D2/;CUSTOMER/C1C2/;MATERIAL/M1M2M3/;PRODU

lingo for函数出错 sets:SUPPLY/s1 s2/;FACTORY/F1 F2/;DISTRIBUTION/D1 D2/;CUSTOMER/C1 C2/;MATERIAL/M1 M2 M3/;PRODUCT/P1/;TIME/T1 T2 T3 T4 T5/;SM_LINK(TIME,SUPPLY,MATERIAL):SMC,SMQ;FP_LINK(TIME,FACTORY,PRODUCT):FPc,FPQ;SFM_T_LINK(TIME,SUPPLY,FACTORY
lingo for函数出错
sets:
SUPPLY/s1 s2/;
FACTORY/F1 F2/;
DISTRIBUTION/D1 D2/;
CUSTOMER/C1 C2/;
MATERIAL/M1 M2 M3/;
PRODUCT/P1/;
TIME/T1 T2 T3 T4 T5/;
SM_LINK(TIME,SUPPLY,MATERIAL):SMC,SMQ;
FP_LINK(TIME,FACTORY,PRODUCT):FPc,FPQ;
SFM_T_LINK(TIME,SUPPLY,FACTORY,MATERIAL):SFM_TC,SFM_TQ;
FM_I_LINK(TIME,FACTORY,MATERIAL):FM_IC,FM_IQ;
FP_I_LINK(TIME,FACTORY,PRODUCT):FP_IC,FP_IQ;
FDP_T_LINK(TIME,FACTORY,DISTRIBUTION):FDP_TC,FDP_TQ;
DP_I_LINK(TIME,DISTRIBUTION,PRODUCT):DP_IC,DP_IQ;
DCP_T_LINK(TIME,DISTRIBUTION,CUSTOMER,PRODUCT):DCP_TC,DCP_TQ;
endsets
@FOR(TIME(t):@FOR(SUPPLY(s):@FOR(MATERIAL(m):SMQ(t,s,m)=@SUM(FACTORY(f):SFM_TQ(t,s,f,m)))));

lingo for函数出错 sets:SUPPLY/s1 s2/;FACTORY/F1 F2/;DISTRIBUTION/D1 D2/;CUSTOMER/C1 C2/;MATERIAL/M1 M2 M3/;PRODUCT/P1/;TIME/T1 T2 T3 T4 T5/;SM_LINK(TIME,SUPPLY,MATERIAL):SMC,SMQ;FP_LINK(TIME,FACTORY,PRODUCT):FPc,FPQ;SFM_T_LINK(TIME,SUPPLY,FACTORY
没有任何语法错误

lingo程序哪里出错了 怎么改啊想让s为0-1变量 在v(I,J)不为0的时候,s为1.完全新手,sets:supplyment/s1..s20/:supply;receiver/r1..r20/:demand;links(supplyment,receiver ):cost,v,s;endsetsmin=@sum(links:cost*s);@for(receiver(J):@sum( lingo for函数出错 sets:SUPPLY/s1 s2/;FACTORY/F1 F2/;DISTRIBUTION/D1 D2/;CUSTOMER/C1 C2/;MATERIAL/M1 M2 M3/;PRODUCT/P1/;TIME/T1 T2 T3 T4 T5/;SM_LINK(TIME,SUPPLY,MATERIAL):SMC,SMQ;FP_LINK(TIME,FACTORY,PRODUCT):FPc,FPQ;SFM_T_LINK(TIME,SUPPLY,FACTORY lingo程序出错,model:sets:定义行列号;lines/1..31/:line;rows/1..30/:row;网点编号;shop/1..11/:l,r,m,price;人口分布;popu(lines,rows):popudata;distribution(lines,rows,shop):p;endsets目标函数;max=@sum(distribution(I,J,S) | I#ge#1#and#J lingo中sets是什么? lingo中for函数用法? lingo里面@for()函数出错,model:sets:row/1,2,3/:b;arrange/1..5/:x,c;link(row,arrange):a;endsetsdata:b=100,100,100;c=0,0.1,0.2,0.3,0.8;a=1,2,0,1,0,0,0,2,2,1,3,1,2,0,3;enddata[OBJ]min=@sum(arrange(j):c(j)*x(j);@for(row(i):@sum(arrange(j):a(i,j)*x(j lingo 程序如下我的疑惑是其中 这句是什么意思 @for(ps(j)|j#ne#15:z(j)+y(j+1)=b(j));还有为什么要用 |j#ne#15原函数 如图所示 model:sets: cai/1..7/: s,t,p; ps/1..15/: b,y,z; link(cai,ps): x, c;endsets目标函数; min= LINGO求改错目标函数:S= 约束条件:1、xi为5的倍数2、x120,h1133、xi>x(i+1)4、xi+4*hi=dLINGO程序:model:Title 1;sets:jishu/1..14/:x,h;endsets[OBJ] max=((@sum(jishu(i)|i#GT#1:(x(i)*(h(i)-h(i-1)))))+x(1)*h(1))*2;@for(jishu(i):x(i)^ 新手没有多少分 我问一下lingo的问题老是得不到应该得到的解model:sets: plane/a1..a6/:x,y,s,m; link(plane,plane); endsets!目标函数;min=@sum(plane:(@abs(m))^2);t>0.01;t=64);!偏转角度不超过30度;@for(plane:@bnd(-30 求lingo高手!关于父集函数的表示~!sets: box_area/1..6/; box_kind/1..4/; bay_area/1..3/; allowed(box_area,bay_area,box_kind):e; endsets我有这么个程序.lingo一直报错,说是出错在了allowed那里~求高手修改!~万分感谢~ Lingo 那里出错了啊?model:title 物流仓库选址问题lingo求解程序;sets:store/1..12/:w,s,m;sale/1..12/:d;links(store,sale):C,p,x;endsetsdata:从仓库i向销售中心j运送货物的运送总成本;C=100,80,50,50,60,100,120,90,60,100,120, lingo问题 错误代码29代码如下:model: !需求分配;sets: !定义集合;plant/p1..p8/: capacity; market/m1..m8/: demand; links(plant, market): cost, volume;endsetsmin=@sum(links: cost*volume); !目标函数;@for(market(J): @sum(plant( 求助!这是我第一次接触LINGO,因为写论文要建模,我输入了一下这段,可是跳错,求大侠帮忙看看 哪里出错MODEL:SETS:S/S1..S4/: SI;D/D1..D4/: DJ, R, Y;LINKS (S,D): C,A,U,X;ENDSETSDATA:SI=10, 50, 200, 100;DJ=10, 100, 200, 5 LINGO问题 我找了一个程序 自己改了改,运行出错了,求大侠帮忙.model:sets:v/1..20/:a,b,d,n,m; endsetsmin=w;w=@sum(v(i):a*b*d)*t;@sum(v(i):n*d)>=k1;@sum(v(i):n*d)=0.8*m);@for(v(i):n lingo显示无可行解,帮忙看看程序是不出错了sets:A/1..154/;B/1..74/;link(A,B):x;endsetsmax=@sum(link(i,j):x(i,j));@for(A(i):@sum(B(j):x(i,j))>=20000);x(3,1) lingo代码出错sets:s/1.7,2.2,14.4,1.1,0.4,20.6,5.3,0.7,1.9,13,12,9.3,1.4,18.7,8.5,25.5,11.6,14.1,22.1,1.1,2.5,14.4,1.7,37.6,0.6,2.2,39,0.3,15,11,7.3,22.9,1.7,0.1,1.1,0.6,9,1.7,7,20.1,0.4,2.8,14.1,9.9,10.4,10.7,30,3.6,5.6,30.8,13.3,4.2,25.5,3.4,11. 我要用lingo定义一个0-1矩阵,如何定义?要求每行和每列只有一个1,其余都为0sets:e/1..11/;matrix1/e,e/:a;endsets@for(matrix1:@bin(a));@for(e(i):@sum(e(j):a(i,j))>0);这是我自己定义的一个 但是总是报错,LINGO’s pred lingo的@if函数用法请教我的LINGO程式码在@if的地方卡住了,之前@FOR函数承蒙不知明的大大指导,感激不尽,希望这次可以有大大可以帮我解答一下,万分感激,以下是程式码的部份SETS:SET/1..2/:PT_i,TiJ,