Fixed TS crash when entire neighborhood is on tabu list
This commit is contained in:
@@ -517,7 +517,9 @@ void Graph::travellingSalesmanTabuSearchEngine(Graph &graph, unsigned tabuSteps,
|
|||||||
|
|
||||||
while(cheeseSupplied == true)
|
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;
|
int nextRouteLength = -1;
|
||||||
|
|
||||||
std::vector<unsigned> nextTabu(3, 0);
|
std::vector<unsigned> nextTabu(3, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user