LINGO错误161怎么改sets: stopplan/1,2,3,4/:p,x,R,Cfix,Ck; station/1..14/:SN; origin/1..14/; destination/1..14/; link1(origin,destination):Q,d; link2(stopplan,station):Yki,Cki;endsetsdata: m=6028; capacity=12; l=134;
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 18:27:51
LINGO错误161怎么改sets: stopplan/1,2,3,4/:p,x,R,Cfix,Ck; station/1..14/:SN; origin/1..14/; destination/1..14/; link1(origin,destination):Q,d; link2(stopplan,station):Yki,Cki;endsetsdata: m=6028; capacity=12; l=134;
LINGO错误161怎么改
sets:
stopplan/1,2,3,4/:p,x,R,Cfix,Ck;
station/1..14/:SN;
origin/1..14/;
destination/1..14/;
link1(origin,destination):Q,d;
link2(stopplan,station):Yki,Cki;
endsets
data:
m=6028;
capacity=12;
l=134;
k=0.1;
p=0.45,0.50,0.80,1.00;
A=612;
Cfix=8000,7000,6000,5000;
Ck=70,60,50,50;
SN=12,5,5,1,1,1,9,5,5,1,1,1,1,12;
Q=@file(1_1.txt);
d=@file(1_1.txt);
Yki=@file(1_1.txt);
Cki=@file(1_1.txt);
enddata
MAX=@sum(stopplan(i):@sum(link1:Q*d*k)*p(i)*x(i))-@sum(stopplan(i):Cfix(i)*R(i))-
@sum(stopplan(i):l*Ck(i)*R(i))-@sum(stopplan(i):@sum(station(j):Cki(i,j)*Yki(i,j))*R(i));
R(i)=@floor(x(i)/A)+1;
@for(stopplan:@sum(stopplan(i):@sum(link1:Q)*k*x(i))=m);
@for(stopplan:@sum(stopplan(i):A*R(i))>=m);
@for(stopplan:@sum(stopplan(i):0.70*A*R(i))<=m);
@for(stopplan:@sum(stopplan(i):0.90*A*R(i))>=m);
@for(stopplan:@sum(stopplan(i):R(i))<=capacity);
@for(station(j):@sum(stopplan(i):Yki(i,j)*R(i))<=SN(j));
@for(stopplan:@gin(R));
LINGO错误161怎么改sets: stopplan/1,2,3,4/:p,x,R,Cfix,Ck; station/1..14/:SN; origin/1..14/; destination/1..14/; link1(origin,destination):Q,d; link2(stopplan,station):Yki,Cki;endsetsdata: m=6028; capacity=12; l=134;
@for和@sum的集名后面一定要加下标