把中文注释后面的分号改为半角分号就行了
model:
sets:
store/1..9/:u;
link(store,store):distance,x; !x(i,j)=1 若i,j之间存在连接;
endsets
data:
distance=
010.811.313.428.831.331.621.836.1
10.806.58.917.514.520.51124.8
11.36.502.612.77.712.317.518.3
13.48.92.609.65.610.211.316.2
28.817.512.79.60436.818
31.314.57.75.6404.69.513.5
31.620.512.310.234.609.815
21.81117.511.36.89.59.8023.2
36.124.818.316.21813.51523.20
;
enddata
n=@size(store);
min=@sum(link:distance*x);
@for(store(k): @sum(store(i)|i#ne#k:x(i,k))=1;
@sum(store(j)|j#ne#k:x(k,j))=1;);
@for(store(i): @for(store(j)|j#GT#1 #AND# i#NE#j:
u(i)-u(j)+n*x(i,j)