|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Population
A Population is the repository for all the Individuals being bred or evaluated in the evolutionary run at a given time. A Population is basically an array of Subpopulations, each of which are arrays of Individuals coupled with a single Species per Subpoulation.
The first Population is created using the initializePopulation method of the Initializer object, which typically calls the Population's populate() method in turn. On generational systems, subsequent populations are created on a generation-by-generation basis by the Breeder object, replacing the previous Population.
In a multithreaded area of a run, Populations should be considered immutable. That is, once they are created, they should not be modified, nor anything they contain. This protocol helps ensure read-safety under multithreading race conditions.
Parameters
base.subpops int >= 1 |
(the number of subpopulations) |
base.subpop.n classname, inherits or = ec.Subpopulation |
(the class for subpopulation #n) |
Parameter bases
base.subpop.n | Subpopulation #n. |
Field Summary | |
static java.lang.String |
P_SIZE
|
static java.lang.String |
P_SUBPOP
|
Subpopulation[] |
subpops
|
Constructor Summary | |
Population()
|
Method Summary | |
Group |
emptyClone()
Returns an instance of Population just like it had been before it was populated with individuals. |
void |
populate(EvolutionState state)
Populates the population with new random individuals. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Subpopulation[] subpops
public static final java.lang.String P_SIZE
public static final java.lang.String P_SUBPOP
Constructor Detail |
public Population()
Method Detail |
public Group emptyClone()
emptyClone
in interface Group
Group.emptyClone()
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
public void populate(EvolutionState state)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |