Package org.evoludo.simulator.models
Class PopulationUpdate
Object
PopulationUpdate
The implementation of population updates. Population updates are used to update
the population size and composition of individuals.
The population update type can be set to one of the following:
- synchronous
- Synchronized population updates.
- Wright-Fisher
- Wright-Fisher process (synchronous)
- asynchronous
- Asynchronous population updates (default).
- Bd
- Moran process (birth-death, asynchronous).
- dB
- Moran process (death-birth, asynchronous).
- imitate
- Moran process (imitate, asynchronous).
- ecology
- Asynchronous updates (non-constant population size).
The population update type can be set via the command line option
--popupdate <u> [<p>]
where <u>
is the population update type, and
<p>
the fraction of individuals that reassess their strategy.
- Author:
- Christoph Hauert
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Types of species updates (only relevant for multi-species models): synchronous Synchronized population updates. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPopulationUpdate
(IBS ibs) Instantiate new population update for use in IBSmodel
s. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Gets the population update type.boolean
isMoran()
Determine whether population update is a variant of Moran updates.boolean
Determine whether population update is synchronous.boolean
setType
(PopulationUpdate.Type type) Sets the population update type.
-
Field Details
-
ibs
IBS ibsThe model that is using this population update.- Implementation Notes:
- Currently only IBS models use population updates.
-
type
The population update type.- See Also:
-
clo
Command line option to set the method for updating the population(s).- See Also:
-
-
Constructor Details
-
PopulationUpdate
Instantiate new population update for use in IBSmodel
s.- Parameters:
ibs
- the model using this player update
-
-
Method Details
-
setType
Sets the population update type.- Parameters:
type
- the updating type for the population- Returns:
true
if population update type changed
-
getType
Gets the population update type.- Returns:
- the population update type
-
isSynchronous
public boolean isSynchronous()Determine whether population update is synchronous.- Returns:
true
if update is synchronous
-
isMoran
public boolean isMoran()Determine whether population update is a variant of Moran updates. Moran type updates do not require specifying a player update type separately.- Returns:
true
if update is Moran- See Also:
-