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); }
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; }
public void Refresh(GeneticAlgorithmConfiguration geneticAlgorithmConfiguration) { GenotypeLength = geneticAlgorithmConfiguration.PeopleNumber; }