sets:shiduan/1..5/:h,t; xinghao/1..3/:NN,m,MM,G,F,Q; link(xinghao,shiduan):n,w; endsets min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1))+ @sum(shiduan(j)|j #ge# 2:G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(j)*t(i)+@if(n(i,j)#g

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 12:26:44

sets:shiduan/1..5/:h,t; xinghao/1..3/:NN,m,MM,G,F,Q; link(xinghao,shiduan):n,w; endsets min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1))+ @sum(shiduan(j)|j #ge# 2:G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(j)*t(i)+@if(n(i,j)#g
sets:
shiduan/1..5/:h,t;
xinghao/1..3/:NN,m,MM,G,F,Q;
link(xinghao,shiduan):n,w;
endsets
min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1))+
@sum(shiduan(j)|j #ge# 2:G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(j)*t(i)+@if(n(i,j)#gt# n(i,j-1) ,(n(i,j)-n(i,j-1))*Q(i),0));
@for(link(i,j):n(i,j)=m(i));
@for(link(i,j):w(i,j)=h(j)*(1+0.15));
@for(link:@gin(n));
data:
t=6 3 6 3 6;
h=15000 30000 25000 40000 27000;
NN=12 10 5;
m=850 1250 1500;
MM=2000 1750 4000;
G=1000 2600 3000;
F=2 1.3 3;
Q=2000 1000 500;
enddata
end

sets:shiduan/1..5/:h,t; xinghao/1..3/:NN,m,MM,G,F,Q; link(xinghao,shiduan):n,w; endsets min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1))+ @sum(shiduan(j)|j #ge# 2:G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(j)*t(i)+@if(n(i,j)#g
sets:
shiduan/1..5/:h,t;
xinghao/1..3/:NN,m,MM,G,F,Q;
link(xinghao,shiduan):n,w;
endsets
min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1)+
@sum(shiduan(j)|j#ge#2:
G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(i)*t(j)+@if(n(i,j)#gt# n(i,j-1) ,(n(i,j)-n(i,j-1))*Q(i),0)));
@for(link(i,j):n(i,j)=m(i));
@for(link(i,j):w(i,j)=h(j)*(1+0.15));
@for(link:@gin(n));
data:
t=6 3 6 3 6;
h=15000 30000 25000 40000 27000;
NN=12 10 5;
m=850 1250 1500;
MM=2000 1750 4000;
G=1000 2600 3000;
F=2 1.3 3;
Q=2000 1000 500;
enddata
附运行结果:
Local optimal solution found.
Objective value: 1190500.
Extended solver steps: 22
Total solver iterations: 6072
Variable Value
H( 1) 15000.00
H( 2) 30000.00
H( 3) 25000.00
H( 4) 40000.00
H( 5) 27000.00
T( 1) 6.000000
T( 2) 3.000000
T( 3) 6.000000
T( 4) 3.000000
T( 5) 6.000000
NN( 1) 12.00000
NN( 2) 10.00000
NN( 3) 5.000000
M( 1) 850.0000
M( 2) 1250.000
M( 3) 1500.000
MM( 1) 2000.000
MM( 2) 1750.000
MM( 3) 4000.000
G( 1) 1000.000
G( 2) 2600.000
G( 3) 3000.000
F( 1) 2.000000
F( 2) 1.300000
F( 3) 3.000000
Q( 1) 2000.000
Q( 2) 1000.000
Q( 3) 500.0000
N( 1, 1) 12.00000
N( 1, 2) 12.00000
N( 1, 3) 12.00000
N( 1, 4) 12.00000
N( 1, 5) 12.00000
N( 2, 1) 4.000000
N( 2, 2) 10.00000
N( 2, 3) 10.00000
N( 2, 4) 10.00000
N( 2, 5) 10.00000
N( 3, 1) 0.000000
N( 3, 2) 0.000000
N( 3, 3) 0.000000
N( 3, 4) 3.000000
N( 3, 5) 0.000000
W( 1, 1) 854.1667
W( 1, 2) 1416.667
W( 1, 3) 937.5000
W( 1, 4) 2000.000
W( 1, 5) 1129.167
W( 2, 1) 1750.000
W( 2, 2) 1750.000
W( 2, 3) 1750.000
W( 2, 4) 1750.000
W( 2, 5) 1750.000
W( 3, 1) 1502.716
W( 3, 2) 1504.173
W( 3, 3) 1501.395
W( 3, 4) 1500.000
W( 3, 5) 1504.321

sets:shiduan/1..5/:h,t; xinghao/1..3/:NN,m,MM,G,F,Q; link(xinghao,shiduan):n,w; endsets min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1))+ @sum(shiduan(j)|j #ge# 2:G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(j)*t(i)+@if(n(i,j)#g lingo 关于and的用法sets:jishu/1..n/:x,h,y;endsets当i>1且i 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语法问题sets:V/1..36/;E/1..198/:x,q;B/1..12/:A;matrix(V,E):H; 36x198的矩阵;endsetsdata:A=0 1 2 3 4 5 6 7 8 9 10 11;H=...;enddata怎样实现H中每3行(前三行开始)与x向量的乘机之和为3,并且对应与H矩阵乘积的x向量 运行lingo8.0提示属性下标越界,请高人改改,有其他错误的话也一并改一下,程序:model:sets:product/1..5/:x,h,k;material/1..6/:c,e;material2/1..6/:g,f;product2/1..5/;price/1..7/;form(product2,price):a;amount(material,material2) lingo 提示 :missing right parenthesismodel:sets:supply/1..10/:h,f,c;demand/1..5/:p,e;link(supply,demand):x,s;endsetsdata:..enddata@for(demand(j):@sum(supply(i):x(i,j)=p(j)));却出现了:missing right parenthesis 的提示请问该怎么办提 lingo线性规划问题sets:jbxq/1..4/:a;zgxq/1..4/:b;xz/1..4/:e,f,g,h;nf/1..5/;jd/1..4/;kc(nf,jd):s;jbsc(nf,jd):c,x;endsetsdata:e=1370,1380,1310,1390;f=1250,1240,1200,1230;g=1390,1370,1350,1420;h=65,67,66,70;a=18,24,33,19;b=24,33,44,26;c=11,12,13,15 高手给看看哪错了 lingo 在这里谢谢了model:sets:part/1..7/:a;equipment/1..5/:g;time/1..6/:t;machine_hour(equipment,part):d;machine(equipment,time):h,n,m;pxt(time,part):c,v,x;endsetsdata:a=100 60 80 40 110 90 30;g=2 2 3 1 1;h=4 4 4 4 4 4 2 sets 是什么意思 sets是什么意思 NO SETS . lingo提示没有最优解,model:sets:k/1..10/:e,l,g;endsetsmin=(f/h+(a*b*c)/18000+(4/132.6)*@sum(k(j):g(j)));b=79.6;c=3;h=67;d=3.98;r=40;f/h=x/(a/2-d);a>150.06;ar/2-d;(h-f)^2+((a/2-d)-(a/2-d-x)*@cos(o))^2 巧取h值:1.h-h=h×h h=( ) 2.h÷h=h×h h=( ) 3.h×h=h+h h=( ) model:sets:year/1..3/:demand,new,nature,gouxie; gou/1..8/:pay,xie; link(year,gou):c; endsets datamodel:sets:year/1..3/:demand,new,nature,gouxie;gou/1..8/:pay,xie;link(year,gou):c;endsetsdata:demand=150,160,170;nature=46.15,41.55,37.12;pay=5,7,5,4,6,5 lingo sets中可以由已知数 和 未知数组成吗?例如 sets zuobio/1..22/:x,y; endsets 前20个已知,怎么写 lingo 非线性规划哪位高手能用lingo或matlab解这个问题?我把意思写出来了,可能不符合语法,model:sets:empoly/1..6/:e;fire/1..6/:f;jh/1..6/:h;prov/1..6/:p;wb/1..6/:w;demand/1..6/:d;storage/1..6/:s;endsetsdata:demand=1200,1400, 小弟刚接触LINGO,实在是没辙了,编写完成后出现model is ill difined希望各位好心人帮助,十万火急,谢谢model:sets:DMU/1..14/:H,W;II/1..2/;OI/1..2/; IV(II,DMU):X;OV(OI,DMU):Y; endsetsdata:X=0.37418 0.144448 0.106145 0.122964 求lingo高手!mcm1988b题目,用lingo咋写代码.新手待解救,财富不多,见谅!貌似自己写的很多错啊...先谢过了!model:Title:train problem;sets:huowu/1..7/:t,w,k;train/1..2/:x;link(huowu,train):h;endsetsdata:t=48.7,52.0,61.3,72.0,