/// <summary> /// Called to check to see if the breeding sources are correct -- if you /// use this method, you must call state.Output.ExitIfErrors() immediately afterwards. /// </summary> public virtual void SourcesAreProperForm(SteadyStateEvolutionState state, BreedingSource[] breedingSources) { foreach (BreedingSource bp in breedingSources) { // all breeding sources are ISteadyStateBSource ((ISteadyStateBSource)bp).SourcesAreProperForm(state); } }
/// <summary> /// Called whenever individuals have been replaced by new individuals in the population. /// </summary> public virtual void IndividualReplaced(SteadyStateEvolutionState state, int subpop, int thread, int individual) { for (var x = 0; x < BP.Length; x++) { ((ISteadyStateBSource)BP[x]).IndividualReplaced(state, subpop, thread, individual); } // let the deselector know ((ISteadyStateBSource)Deselectors[subpop]).IndividualReplaced(state, subpop, thread, individual); }