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:
parent
f38dde99a5
commit
1d94071693
170 changed files with 748 additions and 837 deletions
|
|
@ -46,16 +46,13 @@ public:
|
|||
*/
|
||||
bool update (const M & __move, const Fitness & __fit)
|
||||
{
|
||||
|
||||
if (first_time || __fit > best_fit)
|
||||
if ((first_time) || (__fit > best_fit))
|
||||
{
|
||||
|
||||
best_fit = __fit;
|
||||
best_move = __move;
|
||||
|
||||
first_time = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +84,6 @@ private:
|
|||
|
||||
//! The best fitness.
|
||||
Fitness best_fit;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue