Exemplo n.º 1
0
        public Dictionary <string, string> Execute()
        {
            optimizer.Run();
            Type type = typeof(OptimizationResult);

            if (type == typeof(Optimizers.SingleObjective.OptimizationResult <Element>))
            {
                var result = optimizer.Result as Optimizers.SingleObjective.OptimizationResult <Element>;
                info["fitness"]   = result.BestValue.ToString();
                info["time"]      = result.BestTime.ToString();
                info["iteration"] = result.BestIteration.ToString();
                info["FFE"]       = result.BestFFE.ToString();
            }
            else if (type == typeof(Optimizers.BiObjective.OptimizationResult <Element>))
            {
                var result = optimizer.Result as Optimizers.BiObjective.OptimizationResult <Element>;
                info["HV"]        = result.Front.HyperVolume().ToString();
                info["IGD"]       = result.Front.InversedGenerationalDistance().ToString();
                info["time"]      = result.LastUpdateTime.ToString();
                info["iteration"] = result.LastUpdateIteration.ToString();
                info["FFE"]       = result.LastUpdateFFE.ToString();
            }
            else
            {
                throw new NotSupportedException();
            }
            finishListener();
            return(info);
        }
Exemplo n.º 2
0
        public Dictionary <string, string> Execute()
        {
            optimizer.Run();
            var result = optimizer.Result;

            info["fitness"]   = result.BestValue.ToString();
            info["time"]      = result.BestTime.ToString();
            info["iteration"] = result.BestIteration.ToString();
            info["FFE"]       = result.BestFFE.ToString();
            finishListener();
            return(info);
        }