I applied Tabu Search in TSPTW problem, but it gives me result similar to getting best improvement using exchanging pivot rule (exchange between 2 cities ), However in some papers, it is stated that Tabu gives good result near to the optimal one (I have the best solution of the same initial solution with 0 constraints violation using another algorithm). SO I would like to be sure, Does this result is normal ?, and Here's my pseudo code of applying Tabu:
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
}