Algorithm TSPTW中的禁忌搜索

Algorithm TSPTW中的禁忌搜索,algorithm,traveling-salesman,tabu-search,Algorithm,Traveling Salesman,Tabu Search,我将禁忌搜索应用于TSPTW问题,但它给出的结果与使用交换枢轴规则(2个城市之间的交换)获得最佳改进的结果相似,然而在一些文章中,有人指出禁忌搜索在接近最佳结果的地方给出了很好的结果(我使用另一种算法得到了相同初始解的最佳解,其中0个约束冲突)。因此我想确定,这个结果是否正常?下面是我应用禁忌的伪代码: Running Tabu for number of iteration Tabu tenure=7 list TabuList with each solution I saved, the

我将禁忌搜索应用于TSPTW问题,但它给出的结果与使用交换枢轴规则(2个城市之间的交换)获得最佳改进的结果相似,然而在一些文章中,有人指出禁忌搜索在接近最佳结果的地方给出了很好的结果(我使用另一种算法得到了相同初始解的最佳解,其中0个约束冲突)。因此我想确定,这个结果是否正常?下面是我应用禁忌的伪代码:

Running Tabu for number of iteration
Tabu tenure=7
list TabuList
with each solution I saved, the two exchanged cities
bestsol=initial solution
currsol=initial solution
tabufun()
{
   while(i<iteration)
   {
    i++;
    currsol=bestneighbourhood(currsol)
    if(currsol.fitness < bestsol.fitness)  // curr is better than best
      bestsol=currsol
  }
return bestsol // result of tabu search
}

bestneighbourhood(currsol)
{
  solutions=getallexchanepossiblesolution(currsol)
  // if for first time save global min, firsttime is global variable set to true
 for(each sol in solutions)
{
   bestneigh=sol;
   if(firstTime)
  {
      globalmin= sol.fitness
      firsttime=false
  }
if(sol.fitness()<globalmin)
{
   globalmin=sol.fitness()
}
   check if cityi and cityj existing in tabulist
   if not existing
  {
    //update all elements in tabulist, element has tabu value=0 remove it from list
    //and decrement tabu value of others
    //add cityi and cityj in tabu list with intial tabu value=tabu tenure
    break;
  }
  else
 {
   //check for aspiration
   if(sol.fitness<globalmin)
   {
     //update tabu list
     //reinitialize this cityi and cityj with tabu tenure
   break;
 }
else
 conitnue

}
 return bestneigh
运行禁忌搜索迭代次数
禁忌保有权=7
列表选项卡列表
通过我保存的每个解决方案,两个城市进行了交换
bestsol=初始解
currsol=初始解
塔布芬()
{

然而(i)可能会有帮助:与禁忌中使用的相比,禁忌更多的是艺术而不是科学,“近”在这里实际上是一个营销术语。