es.udc.gii.common.eaf.algorithm.operator.evaluate
Class LocalSearchOperator

java.lang.Object
  extended by java.util.Observable
      extended by es.udc.gii.common.eaf.algorithm.operator.evaluate.EvaluationOperator
          extended by es.udc.gii.common.eaf.algorithm.operator.evaluate.LocalSearchOperator
All Implemented Interfaces:
Operator, Configurable

public class LocalSearchOperator
extends EvaluationOperator

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  IndividualChooser chooser
           
private  boolean evaluateReference
           
private  IndividualImprover improver
           
 
Constructor Summary
LocalSearchOperator()
           
LocalSearchOperator(IndividualImprover generator, IndividualChooser chooser)
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
 IndividualChooser getChooser()
           
 IndividualImprover getImprover()
           
 java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
          Execute this operator over a group of individuals.
 void setChooser(IndividualChooser chooser)
           
 void setImprover(IndividualImprover improver)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

improver

private IndividualImprover improver

chooser

private IndividualChooser chooser

evaluateReference

private boolean evaluateReference
Constructor Detail

LocalSearchOperator

public LocalSearchOperator(IndividualImprover generator,
                           IndividualChooser chooser)

LocalSearchOperator

public LocalSearchOperator()
Method Detail

operate

public java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm,
                                          java.util.List<Individual> individuals)
                                   throws OperatorException
Description copied from interface: Operator
Execute this operator over a group of individuals. This method will be invoked by the current algorithm during its execution. It will be applied on a list of individuals and will return a list of modified individuals.

This method will recive two parameters. The current algorithm, to visit it if it is necessary, for example, to get some parameter of the current execution. And a list of individuals on wich we will apply this operator.

Parameters:
algorithm - the current algorithm, to visit when it is necessary.
individuals - list of individuals on wich we will apply the operator.
Returns:
the result of apply this operator to a individuals' lisr.
Throws:
OperatorException - when occurs some type of error during the execution of this operator.

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Specified by:
configure in interface Configurable
Overrides:
configure in class EvaluationOperator
Parameters:
conf - a Configuration object.
See Also:
Configuration

getChooser

public IndividualChooser getChooser()

setChooser

public void setChooser(IndividualChooser chooser)

getImprover

public IndividualImprover getImprover()

setImprover

public void setImprover(IndividualImprover improver)