lingo代码错误,不能运行,麻烦帮我纠正!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/12/23 13:26:52
lingo代码错误,不能运行,麻烦帮我纠正!Threeproducts;PRODUCT/A,B,C/;Twodistctrs;DISTCTR/DCl,DC2/:F;Fivecustomers;CUST

lingo代码错误,不能运行,麻烦帮我纠正!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代码错误,不能运行,麻烦帮我纠正!
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.;
GLINK(PRODUCT,DISTCTR,CUSTOMER):G;
ENDSETS
DATA:
Shipping costs,plant to DC;
C=3,3.5,ProductA;
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;
ENDDATE
--------------------------------------
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));.
FXCOST=@SUM(DISTCTR:F*Y);
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代码错误,不能运行,麻烦帮我纠正!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:
JIZU/1..8/:P;
CHULI/1..12/;
T(CHULI,JIZU):B,O,Q;
Di/1..8/:M;
Vi/1..8/:N;
XIANZHI/1..8/:E,F;
ENDSETS
DATA:
Q=
70 70 87 120 120 120 150 150 150 150 153 190
30 30 50 58 58 73 79 81 81 81 88 89
110 110 132 150 150 180 180 200 228 240 240 280
55 60 60.5 70 80 90 99.5 100 115 115 115 116
75 80 95 95 98 110 125 125 135 145 152 155
95 95 95 105 125 125 140 150 155 170 170 180
50 60.1 65 70 85 95 102.1 105 110 120 123 125
63 70 70 90 90 110 110 117 130 140 155 160
;
B=
-505 0 124 124 168 210 252 312 330 363 489 489
-560 0 182 203 203 245 300 320 360 410 495 495
-610 0 152 152 189 233 258 308 356 356 415 500
500 150 170 170 200 255 302 302 325 380 435 800
-590 0 116 146 188 188 215 250 310 396 510 510
-607 -607 0 159 173 205 252 305 380 380 405 520
-500 120 120 180 251 260 306 306 315 335 348 548
-800 -800 153 183 233 253 283 303 303 318 400 800
;
M=120 73 180 80 125 125 81.1 90;
N=2.2 1 3.2 1.3 1.8 2 1.4 1.8;
ENDDATA
@FOR(T(I,J):@BIN(O(I,J)));
@FOR(JIZU(J):@SUM(T(I,J):O(I,J))=1);
@FOR(XIANZHI(I):E(I)=M(I)+15*N(I));
@FOR(XIANZHI(I):F(I)=M(I)-15*N(I));
@FOR(JIZU(J):P(J)=@SUM(jizu(I):O(I,J)*Q(I,J)));
@for(JIZU(i):p(i)>=f(i);P(i)<=e(i););
@SUM(T(I,J):B(I,J)*O(I,J))>=982.4;
[OBJ]MIN=@SMAX(P(1),P(2),P(3),P(4),P(5),P(6),P(7),P(8));
END
(982.4的那行应该是B(I,J)*O(I,J)吧?)
结果如下:
Global optimal solution found.
Objective value: 132.0000
Objective bound: 132.0000
Infeasibilities: 0.000000
Extended solver steps: 1
Total solver iterations: 1507

lingo代码错误,不能运行,麻烦帮我纠正!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编程问题,代码在下面,运行说第三行有错误max=2*x1+x2;st5*x2 lingo求解麻烦用lingo代码求解下以下这个模型规划,要能运行的,特别是Ci这部分的表达,(补充:如果可以的话,lindo代码也给出下). lingo的一个代码运行错误了 帮我看看model:sets:mu/i1..i2/:d;zh/j1..j3/:s,u;link(mu,zh):c,k;endsetsdata:d=60,80;s=85,70,90;u=0.07364,0.09531,0.084;c=171 150 143176 159 145;enddatamin=@sum(link:2*d*c+k*u*d);@for(mu(i):@sum(zh(j):k(i,j))=1;) 帮我看看这段lingo代码,我不明白为什么一直出现error code11的错误MODEL: SETS: QUARTERS/1,2,3,4/:DEM,RP,OP,INV; ENDSETS MIN=@sum{QUARTERS:400*RP(i)+450*OP+20*INV}; @FOR{QUARTERS{I}:RP{I} lingo程序如何运行 麻烦哪位高手帮我解释一下这段代码,越详细越好,十分感谢 Fibonacci数列的C++编程,运行错误,请帮我看看以下是代码,会的朋友帮我看看错在哪?算法是正确的吗,有更好的吗?//递归算法——求Fibonacci数列的第n项和前n项和#include using namespace std;int main(){int n 还是昨天那个问题,还有一步的解答(matlab),我写的积分表达式可能错了,所以运行出来结果错误.要得出L的结果,积分的上下限你不用帮我整了,我模仿你昨天写给我的代码,而且里面有点其他 lingo问题,谁帮我运行下这个程序,有错误的话帮我看看model:sets:xcs/1..20/:A,m,n,q;ccs/1..2/:x;link(xcs,ccs):c,b;endsetsdata:A=300,320,340,360,380,400,440,460,500,540,480,440,380,340,280,200,160,80,60,40;m=16,16,16,16,16,16,16,16,16, 'list index out of bounds(0)'怎么处理?我用delphi编程序,编译没错误,一运行就蹦出了 'list index out of bounds(0)'登录后显示主窗口.可主窗口不能正常显示涉及代码://显示当前的系统时间procedure TMain_Form 急求运行LINGO出现unexpected jacobian overflow错误,代码如下,希望大牛帮忙指出哪错了.MODEL:SETS:WH/W1..W13/:Q,C;NE/N1..N13/:N;LINKS(WH,NE):W,B;ENDSETSDATA:C=2,1,4,4,4,5,3,2,1,4,3,10,8;N=48757.8,29912.3,76360.4,68715.1,61605.9,1724 关于LINGO使用的问题,以下代码哪里有错误?无法运行啊model:sets:object/1..3/:f;endsetsdata:a,b = 3,4;!两个直角边长,修改很方便;enddataf (1) = a*@sin(x);f (2) = b*@cos(x);!从这一行开始提醒有语法错误;f (3) = 麻烦你再帮我算一下,序列号还是你刚发的,安装代码不一样了,序列号:DR16R22-68PDYAQ-MQYLETA-FJMRLLW安装代码:XXY5-7WNM-TT93-Y6BS-MGJT麻烦帮我算下 激活码是多少? Flash中AS2.0的代码能不能麻烦帮我换成AS3.0的 on (release) { gotoAndPlay(开场, 252); } 麻烦各位帮忙看下我的代码有什么错误!我就是想知道为什么我的数据库没有被创建! Lingo 错误代码 12-(data missing right parenthesis)运行时出现,数据缺少右括号的错误,这是怎么回事? 运行Virtual PC是总提示如下错误.你所运行的Virtual pc版本不能在PAE模式下运行.请恢复到正常模式下运行.请问如何恢复成正常模式.我的系统是WINXP.