net.sourceforge.jabm.evolution
Class EvolvingPopulation

java.lang.Object
  extended by net.sourceforge.jabm.Population
      extended by 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
 

Field Summary
protected  Breeder breeder
          The breeder for this population which specifies how the population reproduces.
protected  int breedingInterval
           
 
Fields inherited from class net.sourceforge.jabm.Population
agentList, prng
 
Constructor Summary
EvolvingPopulation()
           
 
Method Summary
 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.
 
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
 

Field Detail

breeder

protected Breeder breeder
The breeder for this population which specifies how the population reproduces.


breedingInterval

protected int breedingInterval
Constructor Detail

EvolvingPopulation

public EvolvingPopulation()
Method Detail

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