public class EvolvingPopulation extends Population
A population of agents which evolves through reproduction.
Modifier and Type | Field and Description |
---|---|
protected Breeder |
breeder
The breeder for this population which specifies how the population
reproduces.
|
protected int |
breedingInterval |
agentList, prng
Constructor and Description |
---|
EvolvingPopulation() |
Modifier and Type | Method and Description |
---|---|
void |
eventOccurred(SimEvent event) |
Breeder |
getBreeder() |
int |
getBreedingInterval() |
void |
reproduce()
Produce the next generation of agents.
|
void |
setBreeder(Breeder breeder)
Configure the breeder for this population which specifies
how the agents in this population reproduce.
|
void |
setBreedingInterval(int breedingInterval)
Configure the breeding interval which specifies the rate at which
reproduction occurs.
|
add, getAgentList, getAgents, getPrng, getRandomAgent, getSize, reset, setAgentList, setPrng, setSize, size
protected Breeder breeder
protected int breedingInterval
public void reproduce()
public Breeder getBreeder()
public void setBreeder(Breeder breeder)
breeder
- public int getBreedingInterval()
public void setBreedingInterval(int breedingInterval)
breedingInterval
- The number of simulation ticks between reproduction events.public void eventOccurred(SimEvent event)
eventOccurred
in interface EventListener
eventOccurred
in class Population
Copyright © 2014. All rights reserved.