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); }
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); }