hdbeukel / james-core

Core module of the JAMES framework
Apache License 2.0
6 stars 5 forks source link

Also validate move in tabu search aspiration criterion #40

Closed hdbeukel closed 7 years ago

hdbeukel commented 7 years ago

In Tabu search a tabu move is still considered if it yields an improvement over the best known solution. Currently the following aspiration criterion is applied to filter the collection of moves:

m -> !tabuMemory.isTabu(m, getCurrentSolution())
     || computeDelta(evaluate(m), getBestSolutionEvaluation()) > 0

Consider to change to

m -> !tabuMemory.isTabu(m, getCurrentSolution())
     || (validate(m).passed() && computeDelta(evaluate(m), getBestSolutionEvaluation()) > 0)

The current implementation is not incorrect, since all moves are validated in getBestMove anyway, but the suggested change might improve clarity (and is not slower because the validation is cached).