lingo提示MODEL IS ILL DEFINED.model:sets:project/1..7/;year/1..5/;assignment(project,year):a,b,c,d,e,x;endsetsdata:a=360,600,400,950,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,950,10.5,6.8,7.0,360,600,400,1

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 11:54:54
lingo提示MODELISILLDEFINED.model:sets:project/1..7/;year/1..5/;assignment(project,year):a,b,c,d,e,x;en

lingo提示MODEL IS ILL DEFINED.model:sets:project/1..7/;year/1..5/;assignment(project,year):a,b,c,d,e,x;endsetsdata:a=360,600,400,950,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,950,10.5,6.8,7.0,360,600,400,1
lingo提示MODEL IS ILL DEFINED.
model:
sets:
project/1..7/;
year/1..5/;
assignment(project,year):a,b,c,d,e,x;
endsets
data:
a=360,600,400,950,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0,
360,600,400,950,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0;
b=20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0;
c=30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1;
d=0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0;
e=1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0;
enddata
max=@sum(assignment:a(i,j)*x(i,j));
@sum(assignment:b(i,j)*x(i,j))

lingo提示MODEL IS ILL DEFINED.model:sets:project/1..7/;year/1..5/;assignment(project,year):a,b,c,d,e,x;endsetsdata:a=360,600,400,950,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,1350,10.5,6.8,7.0,360,600,400,950,10.5,6.8,7.0,360,600,400,1
改成这样就行了
model:
sets:
project/1..7/;
year/1..5/;
assignment(project,year):a,b,c,d,e,x;
endsets
data:
a=360,600,400,950,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0,
360,600,400,950,10.5,6.8,7.0,
360,600,400,1350,10.5,6.8,7.0;
b=20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0,
20,35,10,100,0.6,1,0;
c=30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1,
30,75,40,50,0.3,0,1;
d=0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0,
0,0,0,400,3,0,0;
e=1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0,
1,1,1,1.5,0,0,0;
enddata
max=@sum(assignment(i,j):a(i,j)*x(i,j));
@sum(assignment(i,j):b(i,j)*x(i,j))