Exemple #1
0
        public void Initialize()
        {
            IsInitialized = true;
            ArgumentValidation();

            Population.Algorithm     = this;
            Fitness.Algorithm        = this;
            Statistics.Algorithm     = this;
            HyperHeuristic.Algorithm = this;

            Population.Initialize();
            Fitness.Initialize();
            Population.Individuals.ForEach(i => i.Fitness = Fitness.Evaluate(i));
            Statistics.Initialize();
            HyperHeuristic.Initialize();

            OnInitialization ??= _ => { };
            OnGenerationProgress ??= _ => { };
            OnTermination ??= _ => { };
            OnInitialization(this);
            OnGenerationProgress(this);
        }
Exemple #2
0
 public async Task EvolveOneGeneration() => Population.Individuals = await HyperHeuristic.Generate();
Exemple #3
0
 public void Update()
 {
     Statistics.Update();
     HyperHeuristic.Update();
 }