diff --git a/Graph.cpp b/Graph.cpp index f397008..19c7fc7 100755 --- a/Graph.cpp +++ b/Graph.cpp @@ -565,14 +565,7 @@ void Graph::travellingSalesmanTabuSearchEngine(Graph &graph, unsigned tabuSteps, // ...jezeli niespelnione - pomijamy ruch continue; - if(nextRouteLength == -1) - { - nextRouteLength = neighbourRouteLength; - nextRoute = neighbourRoute; - nextTabu.at(1) = i; - nextTabu.at(2) = j; - } - else if(nextRouteLength > neighbourRouteLength) + if(nextRouteLength == -1 || nextRouteLength > neighbourRouteLength) { nextRouteLength = neighbourRouteLength; nextRoute = neighbourRoute;