示例#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;
        }
示例#2
0
 public static void SetupExponentialDistribution(double meanValue)
 {
     ExponentialDistribution.randomExponential = new ExponentialDistribution(meanValue);
 }