In the TSP, the fitness has to be minimized ... with all the needed modification (for example, moSA.h)

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@587 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jboisson 2007-08-03 14:28:06 +00:00
commit 1d94071693
170 changed files with 748 additions and 837 deletions

View file

@ -15,11 +15,11 @@
void RouteEval :: operator () (Route & __route)
{
float len = 0 ;
tspFitness len = 0 ;
for (unsigned int i = 0 ; i < Graph :: size () ; i ++)
{
len -= Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ;
len = len + Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ;
}
__route.fitness (len) ;