问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

lingo代码什么错误?

发布网友 发布时间:2022-05-01 15:27

我来回答

1个回答

热心网友 时间:2023-10-21 20:33

model:
title:第二题;
sets:
chanpin/1..7/:p,s,c,y0;!p价格,s标准差,c成本;
month/1..6/;
shebei/1..5/:W;
meishe/1..11/;!每一台具体的设备,共10台;
link(month,chanpin):y,x,M,K,z,ymax,g;!x为生产的数量,y为存储量,M为最大需求量,z为销量,K为波动系数;
yueshe(month,shebei):A,f;!工作的设备;
jushe(chanpin,shebei):H;!生产单位产品i对应设备所需台时j;
yuemeishe(month,meishe):B;!t月份的具体每一台设备;
endsets
data:
E1=0.8;E2=1.2;Wmax=70;u=5;
ymax=100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 50,50,50,50,50,50,50;
p=200,160,80,80,120,90,60;
s=50,40,10,15,20,8,2;
c=40,30,12,10,20,15,14;
A=3,2,3,1,1, 4,2,1,1,1, 4,2,3,0,1, 4,1,3,1,1, 3,1,3,1,1, 4,2,2,1,0;
H=0.5,0.1,0.2,0.05,0, 0.7,0.2,0,0.03,0, 0,0,0.8,0,0.01, 0,0.3,0,0.07,0, 0.3,0,0,0.1,0.05, 0.2,0.6,0,0,0, 0.5,0,0.6,0.08,0.05;
M=1000,1500,300,300,800,200,100, 800,600,200,0,400,300,150, 400,600,0,0,500,400,100, 400,500,400,500,200,0,100,
100,200,500,100,1000,300,0, 800,400,300,300,1500,500,80;
enddata
[obj] max=Q;
Q=@sum(link(t,i):z(t,i)*(p(i)+K(t,i)*s(i)))-@sum(link(t,i):c(i)*x(t,i))-@sum(link(t,i):y(t,i)*u)-@sum(yueshe(t,j):@if(f(t,j)#eq#1,@sum(link(tt,i):x(tt,i)*H(tt,i)-240*E2)+240*E1*W(j),@sum(link(tt,i):x(tt,i)*H(i,j)*E1)));
@for(yueshe(t,j):f(t,j)=@sign(@sum(yueshe(t,j):x(t,j)*H(t,j)-240));@free(f(t,j)));
@for(link(t,i):x(t,i)<=M(t,i)+y(t,i));!数量约束;
@for(link(t,i):y(t,i)<=ymax(t,i));!存储量约束;
@for(link(t,i)|t#gt#1:y(t,i)=y(t-1,i)+x(t,i)-z(t,i));!存储量约束;
@for(yueshe(t,j):@sum(chanpin(i):H(i,j)*x(t,i))<=A(t,j)*24*30);!台时约束;
!@for(shebei(j):W(j)*H(i,j)*x(t,i)<=Wmax*24*30);!功率约束;
@for(chanpin(i):y0(i)=0);!存储量约束;
@for(link(t,i):@gin(x(t,i));@gin(z(t,i));@gin(y(t,i)));!数据约束;
@for(chanpin(i):g(1,i)=@sign(x(1,i)+y0(i)+M(1,i)); z(1,i)=@if(g(1,i)#eq#1,M(1,i),x(1,i)+y(1,i));@free(g(1,i)));
@for(link(t,i)|t#gt#1:g(t,i)=@sign(x(t,i)+y(t-1,i)+M(t,i)); z(t,i)=@if(g(t,i)#eq#1,M(t,i),x(t,i)+y(t,i));@free(g(t,i)));!供求关系约束;
@for(yuemeishe(t,l):@bin(B(t,l)));@sum(yuemeishe(t,l):B(t,l))=5;!维修约束;
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,1)*x(t,i))<=(B(t,1)+B(t,2)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,2)*x(t,i))<=(B(t,5)+B(t,6)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,3)*x(t,i))<=(B(t,7)+B(t,8)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,4)*x(t,i))<=(B(t,9)+B(t,10)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,5)*x(t,i))<=(B(t,11)*24*30));
@for(yuemeishe(t,l):(B(t,1)+B(t,2)+B(t,3)+B(t,4))*5+(B(t,5)+B(t,6))*8+(B(t,7)+B(t,8)+B(t,9))*6+B(t,10)*8+B(t,11)*12<=72);
end

热心网友 时间:2023-10-21 20:33

model:
title:第二题;
sets:
chanpin/1..7/:p,s,c,y0;!p价格,s标准差,c成本;
month/1..6/;
shebei/1..5/:W;
meishe/1..11/;!每一台具体的设备,共10台;
link(month,chanpin):y,x,M,K,z,ymax,g;!x为生产的数量,y为存储量,M为最大需求量,z为销量,K为波动系数;
yueshe(month,shebei):A,f;!工作的设备;
jushe(chanpin,shebei):H;!生产单位产品i对应设备所需台时j;
yuemeishe(month,meishe):B;!t月份的具体每一台设备;
endsets
data:
E1=0.8;E2=1.2;Wmax=70;u=5;
ymax=100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 50,50,50,50,50,50,50;
p=200,160,80,80,120,90,60;
s=50,40,10,15,20,8,2;
c=40,30,12,10,20,15,14;
A=3,2,3,1,1, 4,2,1,1,1, 4,2,3,0,1, 4,1,3,1,1, 3,1,3,1,1, 4,2,2,1,0;
H=0.5,0.1,0.2,0.05,0, 0.7,0.2,0,0.03,0, 0,0,0.8,0,0.01, 0,0.3,0,0.07,0, 0.3,0,0,0.1,0.05, 0.2,0.6,0,0,0, 0.5,0,0.6,0.08,0.05;
M=1000,1500,300,300,800,200,100, 800,600,200,0,400,300,150, 400,600,0,0,500,400,100, 400,500,400,500,200,0,100,
100,200,500,100,1000,300,0, 800,400,300,300,1500,500,80;
enddata
[obj] max=Q;
Q=@sum(link(t,i):z(t,i)*(p(i)+K(t,i)*s(i)))-@sum(link(t,i):c(i)*x(t,i))-@sum(link(t,i):y(t,i)*u)-@sum(yueshe(t,j):@if(f(t,j)#eq#1,@sum(link(tt,i):x(tt,i)*H(tt,i)-240*E2)+240*E1*W(j),@sum(link(tt,i):x(tt,i)*H(i,j)*E1)));
@for(yueshe(t,j):f(t,j)=@sign(@sum(yueshe(t,j):x(t,j)*H(t,j)-240));@free(f(t,j)));
@for(link(t,i):x(t,i)<=M(t,i)+y(t,i));!数量约束;
@for(link(t,i):y(t,i)<=ymax(t,i));!存储量约束;
@for(link(t,i)|t#gt#1:y(t,i)=y(t-1,i)+x(t,i)-z(t,i));!存储量约束;
@for(yueshe(t,j):@sum(chanpin(i):H(i,j)*x(t,i))<=A(t,j)*24*30);!台时约束;
!@for(shebei(j):W(j)*H(i,j)*x(t,i)<=Wmax*24*30);!功率约束;
@for(chanpin(i):y0(i)=0);!存储量约束;
@for(link(t,i):@gin(x(t,i));@gin(z(t,i));@gin(y(t,i)));!数据约束;
@for(chanpin(i):g(1,i)=@sign(x(1,i)+y0(i)+M(1,i)); z(1,i)=@if(g(1,i)#eq#1,M(1,i),x(1,i)+y(1,i));@free(g(1,i)));
@for(link(t,i)|t#gt#1:g(t,i)=@sign(x(t,i)+y(t-1,i)+M(t,i)); z(t,i)=@if(g(t,i)#eq#1,M(t,i),x(t,i)+y(t,i));@free(g(t,i)));!供求关系约束;
@for(yuemeishe(t,l):@bin(B(t,l)));@sum(yuemeishe(t,l):B(t,l))=5;!维修约束;
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,1)*x(t,i))<=(B(t,1)+B(t,2)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,2)*x(t,i))<=(B(t,5)+B(t,6)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,3)*x(t,i))<=(B(t,7)+B(t,8)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,4)*x(t,i))<=(B(t,9)+B(t,10)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,5)*x(t,i))<=(B(t,11)*24*30));
@for(yuemeishe(t,l):(B(t,1)+B(t,2)+B(t,3)+B(t,4))*5+(B(t,5)+B(t,6))*8+(B(t,7)+B(t,8)+B(t,9))*6+B(t,10)*8+B(t,11)*12<=72);
end

热心网友 时间:2023-10-21 20:33

model:
title:第二题;
sets:
chanpin/1..7/:p,s,c,y0;!p价格,s标准差,c成本;
month/1..6/;
shebei/1..5/:W;
meishe/1..11/;!每一台具体的设备,共10台;
link(month,chanpin):y,x,M,K,z,ymax,g;!x为生产的数量,y为存储量,M为最大需求量,z为销量,K为波动系数;
yueshe(month,shebei):A,f;!工作的设备;
jushe(chanpin,shebei):H;!生产单位产品i对应设备所需台时j;
yuemeishe(month,meishe):B;!t月份的具体每一台设备;
endsets
data:
E1=0.8;E2=1.2;Wmax=70;u=5;
ymax=100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 50,50,50,50,50,50,50;
p=200,160,80,80,120,90,60;
s=50,40,10,15,20,8,2;
c=40,30,12,10,20,15,14;
A=3,2,3,1,1, 4,2,1,1,1, 4,2,3,0,1, 4,1,3,1,1, 3,1,3,1,1, 4,2,2,1,0;
H=0.5,0.1,0.2,0.05,0, 0.7,0.2,0,0.03,0, 0,0,0.8,0,0.01, 0,0.3,0,0.07,0, 0.3,0,0,0.1,0.05, 0.2,0.6,0,0,0, 0.5,0,0.6,0.08,0.05;
M=1000,1500,300,300,800,200,100, 800,600,200,0,400,300,150, 400,600,0,0,500,400,100, 400,500,400,500,200,0,100,
100,200,500,100,1000,300,0, 800,400,300,300,1500,500,80;
enddata
[obj] max=Q;
Q=@sum(link(t,i):z(t,i)*(p(i)+K(t,i)*s(i)))-@sum(link(t,i):c(i)*x(t,i))-@sum(link(t,i):y(t,i)*u)-@sum(yueshe(t,j):@if(f(t,j)#eq#1,@sum(link(tt,i):x(tt,i)*H(tt,i)-240*E2)+240*E1*W(j),@sum(link(tt,i):x(tt,i)*H(i,j)*E1)));
@for(yueshe(t,j):f(t,j)=@sign(@sum(yueshe(t,j):x(t,j)*H(t,j)-240));@free(f(t,j)));
@for(link(t,i):x(t,i)<=M(t,i)+y(t,i));!数量约束;
@for(link(t,i):y(t,i)<=ymax(t,i));!存储量约束;
@for(link(t,i)|t#gt#1:y(t,i)=y(t-1,i)+x(t,i)-z(t,i));!存储量约束;
@for(yueshe(t,j):@sum(chanpin(i):H(i,j)*x(t,i))<=A(t,j)*24*30);!台时约束;
!@for(shebei(j):W(j)*H(i,j)*x(t,i)<=Wmax*24*30);!功率约束;
@for(chanpin(i):y0(i)=0);!存储量约束;
@for(link(t,i):@gin(x(t,i));@gin(z(t,i));@gin(y(t,i)));!数据约束;
@for(chanpin(i):g(1,i)=@sign(x(1,i)+y0(i)+M(1,i)); z(1,i)=@if(g(1,i)#eq#1,M(1,i),x(1,i)+y(1,i));@free(g(1,i)));
@for(link(t,i)|t#gt#1:g(t,i)=@sign(x(t,i)+y(t-1,i)+M(t,i)); z(t,i)=@if(g(t,i)#eq#1,M(t,i),x(t,i)+y(t,i));@free(g(t,i)));!供求关系约束;
@for(yuemeishe(t,l):@bin(B(t,l)));@sum(yuemeishe(t,l):B(t,l))=5;!维修约束;
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,1)*x(t,i))<=(B(t,1)+B(t,2)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,2)*x(t,i))<=(B(t,5)+B(t,6)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,3)*x(t,i))<=(B(t,7)+B(t,8)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,4)*x(t,i))<=(B(t,9)+B(t,10)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,5)*x(t,i))<=(B(t,11)*24*30));
@for(yuemeishe(t,l):(B(t,1)+B(t,2)+B(t,3)+B(t,4))*5+(B(t,5)+B(t,6))*8+(B(t,7)+B(t,8)+B(t,9))*6+B(t,10)*8+B(t,11)*12<=72);
end

热心网友 时间:2023-10-21 20:33

model:
title:第二题;
sets:
chanpin/1..7/:p,s,c,y0;!p价格,s标准差,c成本;
month/1..6/;
shebei/1..5/:W;
meishe/1..11/;!每一台具体的设备,共10台;
link(month,chanpin):y,x,M,K,z,ymax,g;!x为生产的数量,y为存储量,M为最大需求量,z为销量,K为波动系数;
yueshe(month,shebei):A,f;!工作的设备;
jushe(chanpin,shebei):H;!生产单位产品i对应设备所需台时j;
yuemeishe(month,meishe):B;!t月份的具体每一台设备;
endsets
data:
E1=0.8;E2=1.2;Wmax=70;u=5;
ymax=100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 100,100,100,100,100,100,100, 50,50,50,50,50,50,50;
p=200,160,80,80,120,90,60;
s=50,40,10,15,20,8,2;
c=40,30,12,10,20,15,14;
A=3,2,3,1,1, 4,2,1,1,1, 4,2,3,0,1, 4,1,3,1,1, 3,1,3,1,1, 4,2,2,1,0;
H=0.5,0.1,0.2,0.05,0, 0.7,0.2,0,0.03,0, 0,0,0.8,0,0.01, 0,0.3,0,0.07,0, 0.3,0,0,0.1,0.05, 0.2,0.6,0,0,0, 0.5,0,0.6,0.08,0.05;
M=1000,1500,300,300,800,200,100, 800,600,200,0,400,300,150, 400,600,0,0,500,400,100, 400,500,400,500,200,0,100,
100,200,500,100,1000,300,0, 800,400,300,300,1500,500,80;
enddata
[obj] max=Q;
Q=@sum(link(t,i):z(t,i)*(p(i)+K(t,i)*s(i)))-@sum(link(t,i):c(i)*x(t,i))-@sum(link(t,i):y(t,i)*u)-@sum(yueshe(t,j):@if(f(t,j)#eq#1,@sum(link(tt,i):x(tt,i)*H(tt,i)-240*E2)+240*E1*W(j),@sum(link(tt,i):x(tt,i)*H(i,j)*E1)));
@for(yueshe(t,j):f(t,j)=@sign(@sum(yueshe(t,j):x(t,j)*H(t,j)-240));@free(f(t,j)));
@for(link(t,i):x(t,i)<=M(t,i)+y(t,i));!数量约束;
@for(link(t,i):y(t,i)<=ymax(t,i));!存储量约束;
@for(link(t,i)|t#gt#1:y(t,i)=y(t-1,i)+x(t,i)-z(t,i));!存储量约束;
@for(yueshe(t,j):@sum(chanpin(i):H(i,j)*x(t,i))<=A(t,j)*24*30);!台时约束;
!@for(shebei(j):W(j)*H(i,j)*x(t,i)<=Wmax*24*30);!功率约束;
@for(chanpin(i):y0(i)=0);!存储量约束;
@for(link(t,i):@gin(x(t,i));@gin(z(t,i));@gin(y(t,i)));!数据约束;
@for(chanpin(i):g(1,i)=@sign(x(1,i)+y0(i)+M(1,i)); z(1,i)=@if(g(1,i)#eq#1,M(1,i),x(1,i)+y(1,i));@free(g(1,i)));
@for(link(t,i)|t#gt#1:g(t,i)=@sign(x(t,i)+y(t-1,i)+M(t,i)); z(t,i)=@if(g(t,i)#eq#1,M(t,i),x(t,i)+y(t,i));@free(g(t,i)));!供求关系约束;
@for(yuemeishe(t,l):@bin(B(t,l)));@sum(yuemeishe(t,l):B(t,l))=5;!维修约束;
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,1)*x(t,i))<=(B(t,1)+B(t,2)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,2)*x(t,i))<=(B(t,5)+B(t,6)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,3)*x(t,i))<=(B(t,7)+B(t,8)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,4)*x(t,i))<=(B(t,9)+B(t,10)+2)*24*30);
@for(yuemeishe(t,l):@sum(chanpin(i):H(i,5)*x(t,i))<=(B(t,11)*24*30));
@for(yuemeishe(t,l):(B(t,1)+B(t,2)+B(t,3)+B(t,4))*5+(B(t,5)+B(t,6))*8+(B(t,7)+B(t,8)+B(t,9))*6+B(t,10)*8+B(t,11)*12<=72);
end
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
如何分别真金和仿金首饰 怎样区分真金和仿金首饰呢 小学生新年晚会主持人的串词!!(不要太多)急 大大后天就需要了!!!_百度... 周年晚会策划公司 奥格瑞玛传送门大厅在哪 奥格瑞玛传送门大厅怎么走 锻炼颈椎的几个动作 水多久能结冰 冰能在多长时间内形成 请问水低于0度会结冰吗? 如何防止脱发严重 嘴唇上有黑印用蜜蜡和棉线去除了胡须 gαy time是什么意思? gay里gαy气什么意思, 关于拉格朗日插值的编程问题,要用c语言的。 今年三者险200万比三者险100万还便宜? 老鼠咬电线为什么不触电? 国旗下的演讲:关于冲刺中考 要求600字左右 电缆、皮线怕老鼠咬吗?有请电力专家 每周一升旗,国旗下讲话演讲稿(关于新学期打算和快要中考的初三学生的祝愿)急需!跪求!!! 如何防止老鼠咬电线?求大神帮助 急求一篇名为:{珍惜时间,勤奋学习}为题的演讲稿,初三水平。600字左右。星期一要在国旗下讲话的啊!!! 怎样保护电线不被老鼠咬 新学期,新气象,新风貌,国旗下演讲稿 我是初三的,代表学生发言 急求 怎样防老鼠咬汽车电线,汽车发动机怎样防老 急求:初三学生国旗下讲话 防老鼠咬汽车电线的方法 初三学生国旗下讲话稿 手机爱发热怎么解决 有什么办法防老鼠咬电线 什么电缆叫防鼠咬电缆 表示“执行力强”的成语有哪些? 像小写g似的特殊符号 英语g a y是么意思? 外地人在上海买房可以落户口吗 外地人在上海落户条件 外地人买上海的青浦朱家角西湖新村的房子可以落户吗?需要什么条件_百度问一问 现在外地人在上海买房可以办理上海户口了吗? 外地人在上海买房,落户可以吗,有什么要求吗 GBX-100NS-4PR闹钟怎么调 求各位大神知道这款卡西欧g-shock上市时间是什么时候出的 今天在卖点买了卡西欧ga-110gbx,但是网上找不到这款型号。求大神看看是不是进口的,正品吗。 卡西欧电子表能拿水洗吗? GA一810MIMB怎么调时间 卡西欧ga-710Gb怎么设置白底黑字!!! G-shock GMA-S140和GA-100GBX哪个配置高,买那个比较好? ga-810b-1a4pr怎么调时间? 哪些银行ATM机跨行异地取款不要手续费 有机物都可以燃烧吗 是不是所有的有机物都能燃烧啊? 处涸辙而相欢 有机物都能燃烧吗?