public InternalEngine(IPopulationGenerator populationGenerator, IChildrenGenerator childrenGenerator, GeneticSearchOptions options) { this.populationGenerator = populationGenerator; this.childrenGenerator = childrenGenerator; this.options = options; }
public GeneticSearchEngine(GeneticSearchOptions options, IPopulationGenerator populationGenerator, IChildrenGenerator childrenGenerator, IEnvironment environment) { this.options = options; searchContext = new SearchContext(options.IncludeAllHistory, environment); engine = new InternalEngine(populationGenerator, childrenGenerator, options); runAndPauseManager = new RunAndPauseManager(pauseTimeout); }
public virtual GeneticSearchEngine Build() { PreBuildActions(); var options = new GeneticSearchOptions(populationSize, stopManagers, includeAllHistory, populationRenwalManagers, elitePercentage, mutationManager, populationConverters, chromosomeEvaluator); var childrenGenerator = new ChildrenGenerator(crossoverManager, mutationManager, selectionStrategy); return(new GeneticSearchEngine(options, populationGenerator, childrenGenerator, environment)); }