Class simMoran
- All Implemented Interfaces:
Runnable,IBS.HasIBS,MilestoneListener,Model.HasDE,Model.HasDE.EM,Model.HasDE.ODE,Model.HasDE.PDE,Model.HasDE.PDEADV,Model.HasDE.PDERD,Model.HasDE.RK5,Model.HasDE.SDE,Features,Features.Payoffs,Features.Static,HasHistogram,HasHistogram.Degree,HasHistogram.Fitness,HasHistogram.StatisticsProbability,HasHistogram.StatisticsStationary,HasHistogram.StatisticsTime,HasMean,HasMean.Fitness,HasMean.Traits,HasPop2D,HasPop2D.Fitness,HasPop2D.Traits,HasPop3D,HasPop3D.Fitness,HasPop3D.Traits,CLOProvider
- Author:
- Christoph Hauert
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Features
Features.Groups, Features.Multispecies, Features.Pairs, Features.Payoffs, Features.StaticNested classes/interfaces inherited from interface HasHistogram
HasHistogram.Degree, HasHistogram.Fitness, HasHistogram.StatisticsProbability, HasHistogram.StatisticsStationary, HasHistogram.StatisticsTime, HasHistogram.StrategyNested classes/interfaces inherited from interface HasMean
HasMean.Fitness, HasMean.TraitsNested classes/interfaces inherited from interface HasPop2D
HasPop2D.Fitness, HasPop2D.TraitsNested classes/interfaces inherited from interface HasPop3D
HasPop3D.Fitness, HasPop3D.TraitsNested classes/interfaces inherited from interface IBS.HasIBS
IBS.HasIBS.CGroups, IBS.HasIBS.CPairs, IBS.HasIBS.DGroups, IBS.HasIBS.DPairs, IBS.HasIBS.MCGroups, IBS.HasIBS.MCPairsNested classes/interfaces inherited from interface Model.HasDE
Model.HasDE.DGroups, Model.HasDE.DPairs, Model.HasDE.DualDynamics, Model.HasDE.EM, Model.HasDE.ODE, Model.HasDE.PDE, Model.HasDE.PDEADV, Model.HasDE.PDERD, Model.HasDE.RK5, Model.HasDE.SDE -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CLOptionCommand line option to show the simulation progress.(package private) EvoLudoJREThe EvoLudoJRE engine for running the simulation.(package private) PrintStreamThe output stream.(package private) booleanThe flag to indicate whether to show progress.Fields inherited from class Moran
cloFitness, MUTANT, RESIDENT, typeScoresFields inherited from class Discrete
cloMonoStop, monoStop, mutationFields inherited from class Module
cloDeathRate, cloGeometry, cloNGroup, cloNPopulation, cloPhase2DAxes, cloTraitColors, cloTraitDisable, cloTraitNames, competition, deathRate, defaultColor, engine, interaction, logger, map2fitness, markers, model, nActive, name, nGroup, nPopulation, nTraits, playerUpdate, structure, traitColor, trajectoryColor, VACANT -
Constructor Summary
ConstructorsConstructorDescriptionsimMoran(EvoLudoJRE engine) Create a new simulation to investigate fixation probabilities and times in the Moran process. -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectCLO(CLOParser parser) All providers of command line options must implement this method to collect their options.Type[]Return array of Model types that this Module supports.static voidMain method to run the simulation.private StringmsecToString(long msec) Helper method to convert milliseconds to a more readable string representation in the format 'HH:mm:ss.ss'.voidrun()Methods inherited from class Moran
getAuthors, getCustomLevels, getDependent, getFitness, getFitness, getMaxPayoff, getMinPayoff, getMonoPayoff, getStaticScores, getTitle, load, modelSettings, rhoA, setFitness, setFitness, t1, tA1, tAi, ti, unloadMethods inherited from class Discrete
add, getMaxMonoPayoff, getMinMonoPayoff, getMonoStop, getMutation, setMonoStopMethods inherited from class Module
check, createGeometry, createIBSPop, createModel, getActiveTraits, getCompetitionGeometry, getDeathRate, getGeometry, getIBSPopulation, getID, getInteractionGeometry, getKey, getMap2Fitness, getMarkers, getMeanColors, getNActive, getName, getNGroup, getNPopulation, getNRoles, getNSpecies, getNTraits, getOpponent, getPlayerUpdate, getSpecies, getSpecies, getTraitColor, getTraitColors, getTraitName, getTraitNames, getTrajectoryColor, getVacant, init, processColorMap, reset, setActiveTraits, setDeathRate, setGeometries, setIBSPopulation, setModel, setName, setNGroup, setNPopulation, setNTraits, setOpponent, setTraitColors, setTraitNames, setTrajectoryColorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CLOProvider
adjustCLOMethods inherited from interface Features
isMultispecies, isPairwiseMethods inherited from interface Features.Payoffs
getMap2Fitness, getMaxMonoPayoff, getMinMonoPayoff, isNeutralMethods inherited from interface Features.Static
isStaticMethods inherited from interface HasHistogram
getNTraits, getTraitColorsMethods inherited from interface IBS.HasIBS
createIBSMethods inherited from interface MilestoneListener
modelDidInit, modelDidReset, modelLoaded, modelRelaxed, modelRunning, modelStopped, modelUnloaded, moduleLoaded, moduleRestored, moduleUnloaded
-
Field Details
-
progress
boolean progressThe flag to indicate whether to show progress. -
out
PrintStream outThe output stream. Defaults toSystem.out. -
jrengine
EvoLudoJRE jrengineThe EvoLudoJRE engine for running the simulation. This is a convenience field that saves us casting engine to EvoLudoJRE every time we need to access its methods. -
cloProgress
Command line option to show the simulation progress.
-
-
Constructor Details
-
simMoran
public simMoran(EvoLudoJRE engine) Create a new simulation to investigate fixation probabilities and times in the Moran process.- Parameters:
engine- the pacemaker for running the model
-
-
Method Details
-
getModelTypes
Description copied from class:ModuleReturn array of Model types that this Module supports.- Overrides:
getModelTypesin classModule- Returns:
- the array of supported Model types
-
run
public void run()Description copied from class:ModuleDefault run-loop for modules. Opportunity to override in subclasses for running customized simulations. Currently only called from
EvoLudoJRE.simulation()if custom simulation class is specified injarfile. -
msecToString
Helper method to convert milliseconds to a more readable string representation in the format 'HH:mm:ss.ss'.- Parameters:
msec- the time in milliseconds- Returns:
- the formatted string
-
collectCLO
Description copied from interface:CLOProviderAll providers of command line options must implement this method to collect their options.Each command line option is (uniquely) identified by it's name (see
CLOption.getName()), which corresponds to the long version of the option. If an attempt is made to add an option with a name that already exists, theparserissues a warning and ignores the option. Thus, in general, implementing subclasses should first register their options and callsuper.collectCLO(CLOParser)at the end such that subclasses are able to override command line options specified in a parental class.Override this method in subclasses to add further command line options. Subclasses must make sure that they include a call to super.
- Specified by:
collectCLOin interfaceCLOProvider- Overrides:
collectCLOin classMoran- Parameters:
parser- the reference to parser that manages command line options- See Also:
-
main
Main method to run the simulation.- Parameters:
args- the array of command line arguments
-