private IndividualsGroup UNDX_MGG(IndividualsGroup parents, EvaluationMethod evaluationMethod) { UNDX_Parameters UNDXConfiguration = new UNDX_Parameters() { Alpha = 0.5, Beta = 0.35, NumberOfCrossovers = 10, NumberOfParameters = parents.IndivisualsGroup[0].OptParameters.Length }; UNDX undxExecutor = new UNDX(UNDXConfiguration); MGG mggExecutor = new MGG(); // Execute Crossove with UNDX var parameters = undxExecutor.ExecuteCrossover(parents); var parentsIndex = undxExecutor.ParentsIndex; // Calculate Characteristics var fitnesses = evaluationMethod(parameters); // Create Individuals var offsprings = CreateIndividuals(parameters, fitnesses); // Create New Individuals var newIndividuals = mggExecutor.ExecuteSelection(offsprings); // Return new population return(UpdatePopulation(parents, (int[])parentsIndex, newIndividuals)); }
public UNDX(UNDX_Parameters parameters) { nCrossover = parameters.NumberOfCrossovers; nParams = parameters.NumberOfParameters; alpha = parameters.Alpha; beta = parameters.Beta; ParentsIndex = new int[2]; numberGenerator = new General.RandomNumber.RandomNumberGenerator(); }