|
@@ -565,14 +565,7 @@ void Graph::travellingSalesmanTabuSearchEngine(Graph &graph, unsigned tabuSteps,
|
565
|
565
|
// ...jezeli niespelnione - pomijamy ruch
|
566
|
566
|
continue;
|
567
|
567
|
|
568
|
|
- if(nextRouteLength == -1)
|
569
|
|
- {
|
570
|
|
- nextRouteLength = neighbourRouteLength;
|
571
|
|
- nextRoute = neighbourRoute;
|
572
|
|
- nextTabu.at(1) = i;
|
573
|
|
- nextTabu.at(2) = j;
|
574
|
|
- }
|
575
|
|
- else if(nextRouteLength > neighbourRouteLength)
|
|
568
|
+ if(nextRouteLength == -1 || nextRouteLength > neighbourRouteLength)
|
576
|
569
|
{
|
577
|
570
|
nextRouteLength = neighbourRouteLength;
|
578
|
571
|
nextRoute = neighbourRoute;
|