LINGO 错误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(li

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 11:40:07

LINGO 错误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(li
LINGO 错误
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(i,j)=1));
@for(AA(j):
@sum(cross(i):x(i,j)>=1));
整数约束;
@for(links(i,j):@bin(x(i,j)));
end
总是出现error 1070.

LINGO 错误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(li
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