Beispiel #1
0
        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();
        }
Beispiel #2
0
 private void SetupStrategies(GATask task)
 {
     Crossover       = JarrusObjectFactory.Instance.GetCrossover(CrossoverStrategy);
     Mutation        = JarrusObjectFactory.Instance.GetMutation(MutationStrategy);
     ParentSelection = JarrusObjectFactory.Instance.GetParentSelection(ParentSelectionStrategy);
 }