コード例 #1
0
        protected EncodedIndividual <Element> CreateIndividual(List <Element> genotype = null)
        {
            if (genotype == null)
            {
                genotype = generator.Create(Evaluation.iSize);
            }

            return(new EncodedIndividual <Element>(genotype, this.seed));
        }
コード例 #2
0
        protected Individual <Element> CreateIndividual(List <Element> genotype = null)
        {
            if (genotype == null)
            {
                genotype = generator.Create(evaluation.iSize);
            }

            return(new Individual <Element>(genotype));
        }
        protected override bool RunIteration(long itertionNumber, DateTime startTime)
        {
            List <bool> solution = generator.Create(Evaluation.iSize);

            greedyOptimizer.setSolution(solution);

            greedyOptimizer.Run();

            solution = greedyOptimizer.Result.BestSolution;

            return(CheckNewBest(solution, Evaluation.dEvaluate(solution)));
        }
コード例 #4
0
        private bool RunIteration(long itertionNumber, DateTime startTime)
        {
            List <double> solution = generator.Create(evaluation.iSize);

            return(CheckNewBest(solution, evaluation.tEvaluate(solution)));
        }
コード例 #5
0
        protected override bool RunIteration(long itertionNumber, DateTime startTime)
        {
            List <Element> solution = generator.Create(evaluation.iSize);

            return(CheckNewBest(solution, evaluation.dEvaluate(solution)));
        }