?? tabu_routingmove.asv
字號:
function [x1,changex,l1,tabu]=tabu_routingmove(x0,l0,tabu)
global bestx;
global bestl;
global bestSC;
[x1,changex,l1]=insert(x0,l0);'inser'
% 滿足容量需求
while condition(x1,changex,l1)==0 %不滿足條件
[x1,changex,l1]=insert(x0,l0);'inser'
end
while findintabu(changex,tabu)==1 %在tabu中
SCx1=SC(x1,l1);
if SCx1<=bestSC
bestx=x1;
bestl=l1;
bestSC=SCx1;
tabu=updatetaburouting(changex,tabu);
break;%解禁
else %如果不比最優解優,轉回循環
[x1,changex,l1]=swap_routing(x0,l0);'swap_routing'
% 滿足容量需求
while condition(x1,changex,l1)==0 %不滿足條件
'tbr2'
[x1,changex,l1]=newroute(x0,l0);'newroute'
end
end
end%與if相對
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -