lingo运行出现model is ill defined我的代码:model:sets:duration/1..27/:t;start/1..240/;restrain/1..39/:m,n,c;c_a(start,duration):a;endsetsdata:t=30,41,40,70,40,80,32,24,50,80,10,44,90,23,21,50,36,55,70,70,90,42,44,50,70,90,12;m=17,17,16,16,16
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 10:34:30
lingo运行出现model is ill defined我的代码:model:sets:duration/1..27/:t;start/1..240/;restrain/1..39/:m,n,c;c_a(start,duration):a;endsetsdata:t=30,41,40,70,40,80,32,24,50,80,10,44,90,23,21,50,36,55,70,70,90,42,44,50,70,90,12;m=17,17,16,16,16
lingo运行出现model is ill defined
我的代码:
model:
sets:
duration/1..27/:t;
start/1..240/;
restrain/1..39/:m,n,c;
c_a(start,duration):a;
endsets
data:
t=30,41,40,70,40,80,32,24,50,80,10,44,90,23,21,50,36,55,70,70,90,42,44,50,70,90,12;
m=17,17,16,16,16,15,14,14,13,7,13,8,8,8,9,10,10,11,5,5,6,5,5,3,1,1,2,19,19,25,25,25,21,20,20,21,21,21,23;
n=18,16,18,14,15,14,13,19,19,13,8,7,9,10,10,11,12,12,6,7,7,4,3,4,2,6,6,20,25,20,26,21,26,21,22,22,23,24,24;
enddata
@for(c_a:@bin(a));
min=z;
@for(c_a:a(i,j)*i+t(j)<=z);
@for(c_a:(a(i,18)+a(i,17))<=1);
@for(c_a:@sum(start:a(i,j))=1);
end
运行后出现图中提示~
lingo运行出现model is ill defined我的代码:model:sets:duration/1..27/:t;start/1..240/;restrain/1..39/:m,n,c;c_a(start,duration):a;endsetsdata:t=30,41,40,70,40,80,32,24,50,80,10,44,90,23,21,50,36,55,70,70,90,42,44,50,70,90,12;m=17,17,16,16,16
只能给你在语法上修改正确
min=z;
@for(c_a(i,j):a(i,j)*i+t(j)