public InternalEngine(IPopulationGenerator populationGenerator, IChildrenGenerator childrenGenerator,
                       GeneticSearchOptions options)
 {
     this.populationGenerator = populationGenerator;
     this.childrenGenerator   = childrenGenerator;
     this.options             = options;
 }
示例#2
0
 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);
 }
示例#3
0
        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));
        }