v2.0.1: tabu tenure verification bugfix
This commit is contained in:
@@ -624,17 +624,17 @@ void Graph::travellingSalesmanTabuSearchEngine(Graph &graph, unsigned tabuSteps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Weryfikacja listy tabu...
|
// Weryfikacja listy tabu...
|
||||||
// ...aktualizacja kadencji na liscie tabu
|
int tabuPos = 0;
|
||||||
for(int i = 0; i < tabuArray.size(); i++)
|
while(tabuPos < tabuArray.size())
|
||||||
{
|
{
|
||||||
|
// ...aktualizacja kadencji na liscie tabu
|
||||||
tabuArray.at(i).at(0)--;
|
tabuArray.at(i).at(0)--;
|
||||||
}
|
|
||||||
|
//...usuniecie zerowych kadencji
|
||||||
//...usuniecie zerowych kadencji
|
|
||||||
for(int i = 0; i < tabuArray.size(); i++)
|
|
||||||
{
|
|
||||||
if(tabuArray.at(i).at(0) == 0)
|
if(tabuArray.at(i).at(0) == 0)
|
||||||
tabuArray.erase(tabuArray.begin() + i);
|
tabuArray.erase(tabuArray.begin() + i);
|
||||||
|
else
|
||||||
|
tabuPos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...dopisanie ostatniego ruchu do listy tabu
|
// ...dopisanie ostatniego ruchu do listy tabu
|
||||||
|
|||||||
+1
-1
@@ -204,7 +204,7 @@ void parseTSPLIB_EUC_2D(const char *filename, Graph **graph)
|
|||||||
|
|
||||||
void banner()
|
void banner()
|
||||||
{
|
{
|
||||||
cout << "PEA Projekt 2 Plus v2.0" << endl;
|
cout << "PEA Projekt 2 Plus v2.0.1" << endl;
|
||||||
cout << "Jan Potocki 2017-2019" << endl;
|
cout << "Jan Potocki 2017-2019" << endl;
|
||||||
cout << "(beerware)" << endl;
|
cout << "(beerware)" << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user