对下面问题用lingo求解哪里错了 急……

对下面问题用lingo求解)某大学计算机实验室聘用4名大学生(代号1、2、3、4)和两名研究生(代号5、6)值班答疑。已知每人从周一到周五最多可安排的值班时间及每人每小时值班报酬如下表,该实验室开放时间为上午8点至晚10点,开放时间内须且仅须一人值班,规定每名大学生
每周值班不少于8h,研究生不少于7h,建立使该实验室总支付报酬为最小的数学模型
每天最多可安排的值班时间
学生代号 报酬元/h 周一 周二 周三 周四 周五
1 10 6 0 6 0 7
2 10 0 6 0 6 0
3 9.9 4 8 3 0 5
4 9.8 5 5 6 0 4
5 10.8 3 0 4 8 0
6 11.3 0 6 0 0 3
设:xij为学生i在周j的值班时间

代码如下:
model:
sets:
student/1..6/:pay;
day/1..5/:;
link(student,day):t,x,c;
endsets
data:
pay=10 10 9.9 9.8 10.8 11.3;
t=
6 0 6 0 7
0 6 0 6 0
4 8 3 0 5
5 5 6 0 4
3 0 4 8 0
0 6 0 6 3;
enddata
min=@sum(student(i):pay(i)*@sum(day(j):x(i,j)));
@for(link:c=@if(x#gt#0,1,0));
@for(link:x#ge#2);
@for(link:x<=t);
@for(day(j):@sum(student(i):x(i,j))=14);
@for(student(i)|i#le#4:@sum(day(j):x(i,j))>=8);
@for(student(i)|i#gt#5:@sum(day(j):x(i,j))>=7);
@for(student(i):@sum(day(j):c(i,j))<=3);
@for(day(j):@sum(student(i):c(i,j))<=3);
@for(day(j):@sum(student(i)|i#gt#4:c(i,j))>=1);
end
请问哪里错了……

注释掉了那几句多余的,还有改正了几个错误
model:
sets:
student/1..6/:pay;
day/1..5/:;
link(student,day):t,x,c;
endsets
data:
pay=10 10 9.9 9.8 10.8 11.3;
t=
6 0 6 0 7
0 6 0 6 0
4 8 3 0 5
5 5 6 0 4
3 0 4 8 0
0 6 0 6 3;
enddata
min=@sum(student(i):pay(i)*@sum(day(j):x(i,j)));
!@for(link:c=@if(x#gt#0,1,0));
!@for(link:x>=2);!x#gt#2改成x>2;
@for(link:x<=t);
@for(day(j):@sum(student(i):x(i,j))=14);
@for(student(i)|i#le#4:@sum(day(j):x(i,j))>=8);
@for(student(i)|i#ge#5:@sum(day(j):x(i,j))>=7);!i#gt#5改成i#ge#5;
!@for(student(i):@sum(day(j):c(i,j))<=3);
!@for(day(j):@sum(student(i):c(i,j))<=3);
!@for(day(j):@sum(student(i)|i#gt#4:c(i,j))>=1);
end
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答
大家正在搜