#include <localsearch.h>
Inherits IReset.
Inherited by realea::internal::RatioLocalSearchManager.
Public Member Functions | |
NewIndividualLocalSearchManager (ILocalSearch *ls) | |
void | reset (void) |
virtual bool | applyNewSol (tChromosomeReal &sol, tFitness *pfitness, ILSParameters *params=NULL)=0 |
virtual | ~NewIndividualLocalSearchManager (void) |
It is the responsable of applied the Local Search when it is created a new solution
This is responsable of calling to LS method when it is needed.
Definition at line 40 of file localsearch.h.
NewIndividualLocalSearchManager::NewIndividualLocalSearchManager | ( | ILocalSearch * | ls | ) |
Constructor
Definition at line 26 of file localsearch.cc.
NewIndividualLocalSearchManager::~NewIndividualLocalSearchManager | ( | void | ) | [virtual] |
Destructor. Only removes the LocalSearch object.
Definition at line 29 of file localsearch.cc.
virtual bool realea::internal::NewIndividualLocalSearchManager::applyNewSol | ( | tChromosomeReal & | sol, | |
tFitness * | pfitness, | |||
ILSParameters * | params = NULL | |||
) | [pure virtual] |
This method is called by each new individual, and applies the LS if it is needed.
This method is called by each new individual generated. If must decide if apply the LS or not, in the last case it called the method m_localsearch->apply().
sol | new Chromosome to improve, it could ber modified | |
pfitness | fitness of the solution, it will be updated if sol is changed | |
options | options to LS method (by default it is NULL). |
void NewIndividualLocalSearchManager::reset | ( | void | ) |
Restart the local search process
Definition at line 84 of file localsearch.cc.