Class simMoran

All Implemented Interfaces:
Runnable, IBS.HasIBS, MilestoneListener, ODE.HasDE, ODE.HasODE, PDE.HasPDE, SDE.HasSDE, Features, Features.Static, HasHistogram, HasHistogram.Degree, HasHistogram.Fitness, HasHistogram.StatisticsProbability, HasHistogram.StatisticsStationary, HasHistogram.StatisticsTime, HasMean, HasMean.Fitness, HasMean.Strategy, HasPop2D, HasPop2D.Fitness, HasPop2D.Strategy, HasPop3D, HasPop3D.Fitness, HasPop3D.Strategy, CLOProvider

public class simMoran extends Moran
Simulations to investigate the Moran process on graph structured populations.
Author:
Christoph Hauert
See Also:
  • "Lieberman, E., Hauert, C., & Nowak, M. A. (2005). <em>Evolutionary dynamics on graphs.</em>Nature, 433(7023), 312-316. <a href='http://dx.doi.org/10.1038/nature03204'>doi: 10.1038/nature03204</a>"
  • Field Details

    • progress

      boolean progress
      The flag to indicate whether to show progress.
    • out

      The output stream. Defaults to System.out.
    • jrengine

      EvoLudoJRE jrengine
      The 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

      final CLOption 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

      public Type[] getModelTypes()
      Description copied from class: Module
      Return array of Model types that this Module supports.
      Overrides:
      getModelTypes in class Module
      Returns:
      the array of supported Model types
    • run

      public void run()
      Description copied from class: Module

      Default 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 in jar file.

      Specified by:
      run in interface Runnable
      Overrides:
      run in class Module
    • msecToString

      private String msecToString(long msec)
      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

      public void collectCLO(CLOParser parser)
      Description copied from interface: CLOProvider
      All 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, the parser issues a warning and ignores the option. Thus, in general, implementing subclasses should first register their options and call super.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:
      collectCLO in interface CLOProvider
      Overrides:
      collectCLO in class Moran
      Parameters:
      parser - the reference to parser that manages command line options
      See Also:
    • main

      public static void main(String[] args)
      Main method to run the simulation.
      Parameters:
      args - the array of command line arguments