|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
es.udc.gii.common.eaf.algorithm.operator.replace.ReplaceOperator
es.udc.gii.common.eaf.algorithm.operator.replace.mmga.PopulationMemoryReplaceOperator
public class PopulationMemoryReplaceOperator
This class implements a replace operator for replacing the population memory
of MMGAAlgorithm
. It only replaces a part of the population memory.
The rest is kept unchanged for providing diversity.
<HypercubeDivisions>25</HypercubeDivisions>
<ReplacementCycle>4</ReplacementCycle>
<ReplaceablePart>0.666</ReplaceablePart>
The values showed are the default values for these parameters. If some
parameter is not explicitly set, it takes the default value.
The HypercubeDivisions
parameter states how many divisions per
dimension has the hypercube used for crowding.
The ReplacementCycle
parameter sets the frequency in generations
with which a replacement with solutions from the Pareto front is performed
instead with those of the converged population (nominal solutions).
The PopulationMemorySize
is the total population size of the population
memory.
The ReplaceablePart
is a number between 0 and 1 that sets the portion
of the population memory that should be replaced.
Field Summary | |
---|---|
private int |
currentIndex
|
private int |
hypercubeDivisions
|
private int |
popMemSize
|
private int |
replaceablePartSize
|
private int |
replacementCycle
|
Constructor Summary | |
---|---|
PopulationMemoryReplaceOperator()
Creates a new instance of PopulationMemoryReplaceOperator |
Method Summary | |
---|---|
void |
configure(org.apache.commons.configuration.Configuration conf)
Configures the specific element that implements this method. |
int |
getHypercubeDivisions()
|
int |
getPopMemSize()
|
int |
getReplaceablePartSize()
|
int |
getReplacementCycle()
|
private int |
nextIndex()
|
protected java.util.List<Individual> |
replace(EvolutionaryAlgorithm algorithm,
java.util.List<Individual> toPopulation)
|
private java.util.List<Individual> |
replaceWithNominalSolutions(MMGAAlgorithm mmga,
java.util.List<Individual> toPopulation)
|
private java.util.List<Individual> |
replaceWithParetoFront(MMGAAlgorithm mmga,
java.util.List<Individual> toPopulation)
|
void |
setHypercubeDivisions(int hypercubeDivisions)
Estabishes the number of divisions per dimension of the hypercube. |
void |
setPopMemSize(int popMemSize)
Sets the size of the population memory. |
void |
setReplaceablePartSize(int replaceablePartSize)
Sets the number of individuals that are to be replaced from the population memory. |
void |
setReplacementCycle(int replacementCycle)
Establishes the replacement frequency (in generations) of the population memory. |
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.replace.ReplaceOperator |
---|
operate |
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 |
---|
private int hypercubeDivisions
private int replaceablePartSize
private int replacementCycle
private int currentIndex
private int popMemSize
Constructor Detail |
---|
public PopulationMemoryReplaceOperator()
Method Detail |
---|
protected java.util.List<Individual> replace(EvolutionaryAlgorithm algorithm, java.util.List<Individual> toPopulation)
replace
in class ReplaceOperator
public void configure(org.apache.commons.configuration.Configuration conf)
Configurable
configure
in interface Configurable
configure
in class ReplaceOperator
conf
- a Configuration object.Configuration
private int nextIndex()
private java.util.List<Individual> replaceWithNominalSolutions(MMGAAlgorithm mmga, java.util.List<Individual> toPopulation)
private java.util.List<Individual> replaceWithParetoFront(MMGAAlgorithm mmga, java.util.List<Individual> toPopulation)
public int getReplacementCycle()
public void setReplacementCycle(int replacementCycle)
replacementCycle
- The new frequency. As an example, setting this
frequency to 5 means that every 5 generations a replacement will take
place.public int getHypercubeDivisions()
public void setHypercubeDivisions(int hypercubeDivisions)
hypercubeDivisions
- The new number of divisions per dimension
of the hypercube.public int getReplaceablePartSize()
public void setReplaceablePartSize(int replaceablePartSize)
replaceablePartSize
- The new number of individuals that are to be
replaced.public int getPopMemSize()
public void setPopMemSize(int popMemSize)
popMemSize
- The new size of the population memory considered by
this operator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |