Ejemplo n.º 1
0
 public GeneticAlgorithmExecutor(GeneticAlgorithmConfiguration configuration, CancellationToken cancellationToken, SemaphoreSlim pauseSemaphore)
 {
     this.configuration     = configuration;
     this.cancellationToken = cancellationToken;
     this.pauseSemaphore    = pauseSemaphore;
     stohasticGenerator     = new StohasticGenerator(configuration.Operands);
     populationSelector     = new PopulationSelector(configuration.Result, configuration.EliteCount, stohasticGenerator);
 }
Ejemplo n.º 2
0
        public GeneticAlgorithm(GeneticAlgorithmConfiguration configuration)
        {
            CrossoverProbability = configuration.CrossoverProbability;
            SurvivalProbability  = configuration.SurvivalProbability;
            MutationProbability  = configuration.MutationProbability;
            PopulationSize       = configuration.PopulationSize;
            MaxStep        = configuration.MaxStep;
            GroupSize      = configuration.GroupSize;
            GenotypeLength = configuration.PeopleNumber;

            configuration.Delegate = this;
        }
Ejemplo n.º 3
0
 public void Refresh(GeneticAlgorithmConfiguration geneticAlgorithmConfiguration)
 {
     GenotypeLength = geneticAlgorithmConfiguration.PeopleNumber;
 }