LINGO 错误3
发布网友
发布时间:2023-09-15 02:39
我来回答
共1个回答
热心网友
时间:2023-11-09 15:06
model:
!求解20个交巡警平台分配到92个节点的方案;
sets:
AA/1..20/;
cross/1..92/;
links(AA,cross): dis,x;
endsets
!数据的定义部分;
data:
dis=@FILE( 'C:\Users\Administrator\Desktop\dis.txt');
enddata
!目标函数;
min=@max(links(i,j):x(i,j)*dis(i,j));
@for(cross(i):
@sum(AA(j):x(j,i))=1);
@for(AA(j):
@sum(cross(i):x(j,i))>=1);
!整数约束;
@for(links(i,j):@bin(x(i,j)));
end