📄 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 + -