public abstract class GeneticSolution extends Solution implements SolutionGeneticDef
Modifier and Type | Field and Description |
---|---|
protected Chromosome |
chromosome
The chromosome this solution uses
|
protected java.util.ArrayList<java.lang.String> |
createdFrom
List of names of entities that this solution was created from.
|
evaluation, name
Constructor and Description |
---|
GeneticSolution(java.lang.String thisName)
Create a new instance of GeneticSolution.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addCreatedFrom(java.lang.String entityName)
Add an entity name to the list that this solution was created from.
|
void |
clearCreatedFrom()
Clear the list of entities that this solution was created from.
|
Chromosome |
getChromosome()
Get the chromosome that this solution uses.
|
java.util.ArrayList<java.lang.String> |
getCreatedFrom()
Get the list of entity names that this solution was created from.
|
void |
setChromosome(Chromosome thisChromosome)
Set the chromosome or this solution.
|
getEvaluation, getName, setEvaluation, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evolve
solve
getEvaluation, getName, setEvaluation, setName
protected Chromosome chromosome
protected java.util.ArrayList<java.lang.String> createdFrom
public GeneticSolution(java.lang.String thisName)
thisName
- the solution name.public void setChromosome(Chromosome thisChromosome)
setChromosome
in interface SolutionGeneticDef
thisChromosome
- the chromosome.public Chromosome getChromosome()
getChromosome
in interface SolutionGeneticDef
public void clearCreatedFrom()
public boolean addCreatedFrom(java.lang.String entityName)
entityName
- the entity name.public java.util.ArrayList<java.lang.String> getCreatedFrom()