求Lingo高手帮忙混合整数规划求解!求Lingo编程!
发布网友
发布时间:2022-04-26 00:19
我来回答
共1个回答
热心网友
时间:2023-10-24 02:57
model:
sets:
city/1..5/:x,demand;
link(city,city):c,time;
endsets
data:
price=20;
time=
1 2 3 3 2
2 1 2 3 3
3 2 1 2 3
3 3 2 1 2
1 3 3 2 1;
demand=20 30 10 15 25;
enddata
min=@sum(city(j):demand(j)*@sum(city(i):c(i,j)*time(i,j)));
@sum(city:x)=2;
@for(city(i):@for(city(j):c(i,j)<=x(i)));
@for(city(j):@sum(city(i):c(i,j))=1);
@for(link:@bin(c));
@for(city:@bin(x));
end