public GeneticAlgorithmParameters(GeneticAlgorithmParameters x) { this.NumberOfIterations = x.NumberOfIterations; this.SizeOfPopulation = x.SizeOfPopulation; this.MutationRate = x.MutationRate; this.PercentageOfChildrenFromPreviousGeneration = x.PercentageOfChildrenFromPreviousGeneration; this.EmployeesNumber = 25; this.PercentageOfParentsChosenToSelection = 0; }
public GeneticAlgorithmController(GeneticAlgorithmParameters algorithmParameteres, FactoryController factory) { _employeesNumber = algorithmParameteres.EmployeesNumber; _sizeOfPopulation = algorithmParameteres.SizeOfPopulation; _numberOfIterations = algorithmParameteres.NumberOfIterations; _mutationRate = algorithmParameteres.MutationRate; _percentageOfChildrenFromPreviousGeneration = algorithmParameteres.PercentageOfChildrenFromPreviousGeneration; _percentageOfParentsChosenToSelection = algorithmParameteres.PercentageOfParentsChosenToSelection; _factory = factory; _subjects = new Subjects(factory); _subjects.MakeSubject(); _iterationResults = new List <double>(); Population = new List <Specimen>(); CreatePopulation(_sizeOfPopulation, _employeesNumber, _subjects); }