moILS has been updated to avoid initial solution without fitness
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1264 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
10ed630d41
commit
4f804ac318
2 changed files with 11 additions and 8 deletions
|
|
@ -157,14 +157,15 @@ class moILS:public moAlgo < typename M::EOType >
|
||||||
*/
|
*/
|
||||||
bool operator()(EOT & _solution)
|
bool operator()(EOT & _solution)
|
||||||
{
|
{
|
||||||
if ( _solution.invalid() )
|
EOT _solution_saved;
|
||||||
{
|
|
||||||
full_evaluation(_solution);
|
if ( _solution.invalid() )
|
||||||
}
|
{
|
||||||
|
full_evaluation(_solution);
|
||||||
EOT _solution_saved=_solution;
|
}
|
||||||
|
|
||||||
|
_solution_saved=_solution;
|
||||||
|
|
||||||
continu.init ();
|
continu.init ();
|
||||||
|
|
||||||
// some code has been duplicated in order to avoid one perturbation and one evaluation without adding a test in the loop.
|
// some code has been duplicated in order to avoid one perturbation and one evaluation without adding a test in the loop.
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ class moTSMoveLoopExpl:public moMoveLoopExpl < M >
|
||||||
|
|
||||||
move_selection.init( _old_solution.fitness() );
|
move_selection.init( _old_solution.fitness() );
|
||||||
|
|
||||||
|
selection_update_is_ok=true;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
fitness = incremental_evaluation(move, _old_solution);
|
fitness = incremental_evaluation(move, _old_solution);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue