lingo中输入代码提示 在目标函数那一行提示有invalid input:a synatax error. 望高手帮忙!! 5
sets:job/1..2/;op/1..2/;machine/1..2/;link1(job,op,machine):s,t,e;!开始时间,工时定额,最晚完工时间;e...
sets:
job/1..2/;
op/1..2/;
machine/1..2/;
link1(job,op,machine):s,t,e;!开始时间,工时定额,最晚完工时间;
endsets
data:
t=1 0
0 1
0 3
4 0;
enddata
!目标函数;
min=@max(link1:e);
!关系;
@for(link1:e=s+t);
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#ne#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#ne#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<-0.01))));
@for(machine(k):@foe(job(i):@for(op(j1)|t(i,j1,k)#eq#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#eq#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<0))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#ne#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#ne#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<-0.01))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#eq#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#eq#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<0))));
@for(job(i):@for(link1(i,j,k1)|t(i,j,k1)#ne#0:@for(link1(i,j+1,k2)|t(i,j+1,k2)#ne#0:e(i,j,k1)-s(i,j+1,k2)<=0)));
end 展开
job/1..2/;
op/1..2/;
machine/1..2/;
link1(job,op,machine):s,t,e;!开始时间,工时定额,最晚完工时间;
endsets
data:
t=1 0
0 1
0 3
4 0;
enddata
!目标函数;
min=@max(link1:e);
!关系;
@for(link1:e=s+t);
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#ne#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#ne#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<-0.01))));
@for(machine(k):@foe(job(i):@for(op(j1)|t(i,j1,k)#eq#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#eq#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<0))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#ne#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#ne#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<-0.01))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#eq#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#eq#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<0))));
@for(job(i):@for(link1(i,j,k1)|t(i,j,k1)#ne#0:@for(link1(i,j+1,k2)|t(i,j+1,k2)#ne#0:e(i,j,k1)-s(i,j+1,k2)<=0)));
end 展开
1个回答
展开全部
sets:
job/1..2/;
op/1..2/;
machine/1..2/;
link1(job,op,machine):s,t,e;!开始时间,工时定额,最晚完工时间;
endsets
data:
t=1 0
0 1
0 3
4 0;
enddata
!目标函数;
min=@max(link1:e);
!关系;
@for(link1:e=s+t);
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#ne#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#ne#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<-0.01))));
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#eq#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#eq#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<0))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#ne#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#ne#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<-0.01))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#eq#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#eq#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<0))));
@for(job(i):@for(link1(i,j,k1)|t(i,j,k1)#ne#0:@for(link1(i,j+1,k2)|t(i,j+1,k2)#ne#0:e(i,j,k1)-s(i,j+1,k2)<=0)));
end
原有问题已修改
需要更多帮助
请给原题
job/1..2/;
op/1..2/;
machine/1..2/;
link1(job,op,machine):s,t,e;!开始时间,工时定额,最晚完工时间;
endsets
data:
t=1 0
0 1
0 3
4 0;
enddata
!目标函数;
min=@max(link1:e);
!关系;
@for(link1:e=s+t);
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#ne#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#ne#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<-0.01))));
@for(machine(k):@for(job(i):@for(op(j1)|t(i,j1,k)#eq#0:@for(op(j2)|(j1#ne#j2)#and#(t(i,j2,k)#eq#0):(e(i,j1,k)-s(i,j2,k))*(s(i,j2,k)-s(i,j1,k))<0))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#ne#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#ne#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<-0.01))));
@for(job(i):@for(op(j):@for(machine(k1)|t(i,j,k1)#eq#0:@for(machine(k2)|(k1#ne#k2)#and#(t(i,j,k2)#eq#0):(e(i,j,k1)-s(i,j,k2))*(s(i,j,k2)-s(i,j,k1))<0))));
@for(job(i):@for(link1(i,j,k1)|t(i,j,k1)#ne#0:@for(link1(i,j+1,k2)|t(i,j+1,k2)#ne#0:e(i,j,k1)-s(i,j+1,k2)<=0)));
end
原有问题已修改
需要更多帮助
请给原题
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询