Esempio n. 1
0
 public void InitialValues()
 {
     GAParams = new GAParams();
     GAParams.Elitism = false;
 }
Esempio n. 2
0
 public void Load(string fileName)
 {
     IRepository<GAParams> repository = new GARepository(fileName);
     var value = repository.GetAll();
     if (value.Count() > 0)
     {
         GAParams = value.ToList()[0];
         Console.WriteLine("Loaded Genetic Algorithm: Crossover " + GAParams.CrossoverRate + ", Mutation Rate " + GAParams.MutationRate + ", Pop Size " + GAParams.PopulationSize + ", Gen Size " + GAParams.Generations + ", Current Gen " + GAParams.CurrentGeneration);
     }
 }