请问各位大侠,我编了一个lingo程序,求任意两点最短路的,程序如下: 总是说p(i,j)那里括号不对称 150
各位大侠看一下,在线等啊,急!!!sets:cities/1..30/:f;roads(cities,cities):d,x;EndsetsDATA:d=@ole('F:...
各位大侠看一下,在线等啊,急!!!
sets:
cities/1..30/:f;
roads(cities,cities):d,x;
Endsets
DATA:
d=@ole('F:/juli.xlsx',d);
ENDDATA
f(@size(cities))=0;
@for(cities(i)|i#lt#@size(cities):
f(i)=@min(roads(i,j):d(i,j)+f(j)));
@for(roads(i,j):
p(i,j)=@if(f(i)#eq#d(i,j)+f(j),1,0)
);
end
忘给lingo程序了,嘿嘿!! 展开
sets:
cities/1..30/:f;
roads(cities,cities):d,x;
Endsets
DATA:
d=@ole('F:/juli.xlsx',d);
ENDDATA
f(@size(cities))=0;
@for(cities(i)|i#lt#@size(cities):
f(i)=@min(roads(i,j):d(i,j)+f(j)));
@for(roads(i,j):
p(i,j)=@if(f(i)#eq#d(i,j)+f(j),1,0)
);
end
忘给lingo程序了,嘿嘿!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询