src/GenFx/GeneticAlgorithm.cs
/// <summary>
/// Initializes the genetic algorithm with a starting <see cref="GeneticEnvironment"/>.
/// </summary>
/// <exception cref="ValidationException">The state of a component's configuration is invalid.</exception>
/// <exception cref="InvalidOperationException">The configuration for a required component has not been set.</exception>
/// <exception cref="InvalidOperationException">An exception occured while instantiating a component.</exception>
Initializes the genetic algorithm with a starting .
Initializes the genetic algorithm with a starting .
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
        public async Task InitializeAsync()
        {
            this.Environment = new GeneticEnvironment(this);
            this.CompileExternalValidatorMapping();
            this.Validate(this);
            foreach (GeneticComponentWithAlgorithm component in this.GetAllComponents())
            {
                component.Initialize(this);
                this.Validate(component);
            }
            this.SortMetrics();
            this.Environment.Populations.Clear();
            this.CurrentGeneration = 0;
            await this.Environment.InitializeAsync();
            this.isInitialized = true;
            this.OnGenerationCreated();
            await this.Environment.EvaluateFitnessAsync();
            this.RaiseFitnessEvaluatedEvent();
        }
[ SuppressMessage ( " " , " " ) ] public async Task InitializeAsync ( ) { this . Environment = new GeneticEnvironment ( this ) ; this . CompileExternalValidatorMapping ( ) ; this . Validate ( this ) ; foreach ( GeneticComponentWithAlgorithm component in this . GetAllComponents ( ) ) { component . Initialize ( this ) ; this . Validate ( component ) ; } this . SortMetrics ( ) ; this . Environment . Populations . Clear ( ) ; this . CurrentGeneration = 0 ; await this . Environment . InitializeAsync ( ) ; this . isInitialized = true ; this . OnGenerationCreated ( ) ; await this . Environment . EvaluateFitnessAsync ( ) ; this . RaiseFitnessEvaluatedEvent ( ) ; }
Initializes the genetic algorithm with a starting .
Initializes the genetic algorithm with a starting .
The state of a component's configuration is invalid.
The state of a component ' s configuration is invalid .
The configuration for a required component has not been set.
The configuration for a required component has not been set .
An exception occured while instantiating a component.
An exception occured while instantiating a component .