Fixed TS crash when entire neighborhood is on tabu list

このコミットが含まれているのは:
Jan Potocki
2020-01-20 19:23:47 +01:00
コミット c10d296d82
+3 -1
ファイルの表示
@@ -517,7 +517,9 @@ void Graph::travellingSalesmanTabuSearchEngine(Graph &graph, unsigned tabuSteps,
while(cheeseSupplied == true)
{
std::vector<unsigned> nextRoute;
std::vector<unsigned> nextRoute = currentRoute;
// ...na wszelki wypadek, gdyby cale sasiedztwo bylo na liscie tabu
// (zeby algorytm sie nie wywalil)
int nextRouteLength = -1;
std::vector<unsigned> nextTabu(3, 0);