Exemple #1
0
        private static void SetupEnviroment()
        {
            Program.settings = ProgramSettings.GetSettingsFromConsole();

            ExponentialDistribution.SetupExponentialDistribution(settings.meanValue);
            EvolutionModel kimuraModel = new EvolutionModel(settings.alpha, settings.beta);

            DnaSequenceEvolver.SetupEvolver(kimuraModel);
            NodeEvolutionScheduler.SetupScheduler(settings.evolutionTime);

            //
            // Setup main evolution timer but don't enable it yet as there is no telling how long will it take the user to input sequence
            //
            Program.evolutionTimer           = new Timer(settings.evolutionTime);
            Program.evolutionTimer.Elapsed  += new ElapsedEventHandler(Program.EvolutionEndCallback);
            Program.evolutionTimer.AutoReset = false;
        }
 public static void SetupScheduler(double overallEvolutionTime)
 {
     NodeEvolutionScheduler.scheduler = new NodeEvolutionScheduler(overallEvolutionTime);
 }