net.sourceforge.jabm.evolution
Class EvolvingPopulation
java.lang.Object
net.sourceforge.jabm.Population
net.sourceforge.jabm.evolution.EvolvingPopulation
- All Implemented Interfaces:
- java.io.Serializable, EventListener
public class EvolvingPopulation
- extends Population
A population of agents which evolves through reproduction.
- See Also:
- Serialized Form
-
-
Methods inherited from class net.sourceforge.jabm.Population |
add, getAgentList, getAgents, getPrng, getRandomAgent, getSize, reset, setAgentList, setPrng, setSize, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
breeder
protected Breeder breeder
- The breeder for this population which specifies how the population
reproduces.
breedingInterval
protected int breedingInterval
EvolvingPopulation
public EvolvingPopulation()
reproduce
public void reproduce()
- Produce the next generation of agents.
getBreeder
public Breeder getBreeder()
setBreeder
public void setBreeder(Breeder breeder)
- Configure the breeder for this population which specifies
how the agents in this population reproduce.
- Parameters:
breeder
-
getBreedingInterval
public int getBreedingInterval()
setBreedingInterval
public void setBreedingInterval(int breedingInterval)
- Configure the breeding interval which specifies the rate at which
reproduction occurs.
- Parameters:
breedingInterval
- The number of simulation ticks between reproduction events.
eventOccurred
public void eventOccurred(SimEvent event)
- Specified by:
eventOccurred
in interface EventListener
- Overrides:
eventOccurred
in class Population