Esempio n. 1
0
        public override IOperation Apply()
        {
            var qualities  = QualitiesParameter.ActualValue;
            int objectives = qualities[0].Length;

            var optimalfront = TestFunctionParameter.ActualValue.OptimalParetoFront(objectives);

            if (optimalfront == null)
            {
                return(base.Apply());
            }

            var distance = GenerationalDistance.Calculate(qualities.Select(x => x.CloneAsArray()), optimalfront, Dampening);

            GenerationalDistanceResultParameter.ActualValue.Value = distance;

            return(base.Apply());
        }
Esempio n. 2
0
 public static double Calculate(IEnumerable <double[]> front, IEnumerable <double[]> optimalFront, double p)
 {
     return(GenerationalDistance.Calculate(optimalFront, front, p));
 }