public GAConfiguration(GATask task) { if (task == null) { throw new ArgumentException("Task can not be null"); } TaskUUID = task.UUID; Reflection.CopyProperties(task, this); ValidateProperties(); SetGeneSize(); SetupStrategies(task); SetupRandomVariables(); ValidateFactoryObjects(); }
private void SetupStrategies(GATask task) { Crossover = JarrusObjectFactory.Instance.GetCrossover(CrossoverStrategy); Mutation = JarrusObjectFactory.Instance.GetMutation(MutationStrategy); ParentSelection = JarrusObjectFactory.Instance.GetParentSelection(ParentSelectionStrategy); }