lingo程序,不知道怎么办了,

问题描述:

lingo程序,不知道怎么办了,
model:
sets:
\x05flights/@file('e:\import.txt')/:L,A,D,s,f1;!航班集合,L为机型,A为到达时刻,D为离港时刻,s为分配的停机位,f1为标记;
\x05stands/@file('e:\import.txt')/:P,m,K,f2;!停机位集合,P为停机位类型,m为停靠的航班号,K为停机位可以指派的开始时刻,f2为标记;
\x05link(flights,stands):x;
endsets
data:\x05
\x05!flights,stands=@OLE('E:\IMPORT.XLS');
\x05L = @file('e:\import.txt');
\x05A = @file('e:\import.txt');
\x05D = @file('e:\import.txt');
\x05P = @file('e:\import.txt');
\x05T0 = @file('e:\import.txt');
\x05m = @file('e:\import.txt');
\x05Tend = @file('e:\import.txt');
\x05T = @file('e:\import.txt');
enddata
\x05
\x05
\x05@FOR(stands(J)|m #eq# 0:f2(J)=0);!求出J0集合;
\x05@FOR(stands(J)|m #ne# 0:f2(J)=1);!求出J1集合;
\x05@FOR(stands(J)|m #gt# 0:@FOR( flights(I)|(Tend-D) #gt# T:f2(J)=2));!求出J2集合;
\x05@FOR(stands(J)|f2 #eq# 1:
\x05\x05I=@index(flights,m);
x(I,J)=1);
\x05@FOR(flights(I)|A #lt# T0:f1(I)=0);!求出集合I0;
\x05@FOR(flights(I)|D #lt# Tend:f1(I)=1);!求出集合I1;
\x05@FOR(flights(I)|A #gt# T0 #and# A #lt# Tend:f1(I)=2);!求出集合I2;
@FOR(flights(I)|f1 #eq# 2:@SUM(stands(J)|f2 #eq# 0 #or# f2 #eq#2:x(I,J))= 1);
@FOR(stands(J)|f2 #eq# 0 #or# f2 #eq#2:@SUM(flights(I)|f1 #eq# 2:x(I,J))=0));
\x05@FOR(flights(I)|f1 #eq# 2:
\x05\x05@FOR(stands(J)|f2 #eq# 0 #or# f2 #eq#2:
\x05\x05\x05(P(J)-L(I))*x(I,J)>=0));
\x05
\x05@FOR(stands(J)|f2 #eq# 0:K=T0);
\x05
\x05@FOR(stands(J)|f2 #eq# 2:K=@SUM(flights(I)|f1 #eq#1:D(I)*X(I,J))+T);
\x05min = @SUM(flights(I)|f1 #eq# 2:@SUM(stands(J)|f2 #eq# 0 #or# f2 #eq#2:K(J)*x(I,J))-A(I))+@SUM(stands(J)|f2 #eq# 0 #or# f2 #eq#2:@SUM(flights(I)|f1 #eq# 2:A(I)*x(I,J))-K(J));
\x05@FOR(link:@bin(x));
end
txt文档
flights成员
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15~
stands成员
1 2 3 4 5
flight property L
3 4 3 4 4 5 4 3 3 4 5 3 3 4
flight property A
06:30 06:30 08:05 08:00 08:20 08:30 08:35 08:50 09:30 09:35 09:40 09:55 10:05 10:10 10:15
210 210 485 480 500 510 515 530 570 575 580 595 605 610 615~
flight property D
07:30 07:50 09:00 09:10 09:30 10:00 09:40 09:45 10:10 10:50 11:10 11:00 11:05 11:30 11:10
450 470 540 550 570 600 580 585 610 650 670 660 665 690 670~
stands property P
4 4 5 5 3
T0 value
210~
m value
0 1 0 2 0
Tend value,Tend=T0+Te,Te=120
330~
T value
40

错误很多 而且你这样写的模型可能也不能在lingo里面做 数据文件里面注释后面要有分号
模型里面如果用到赋值之类的要放到calc里面 自己百度hi找我说吧