private void drawBestPaths() { CIterationList iterationList = CIterationList.getInstance(); if (mDraw.optPath) { CTour optimumTour = CAntAlgorithmParameters.getInstance().optTour; drawTour(optimumTour, OPT_TOUR_DRAW_LAYER, 0f, 0f, 1f); } if (mDraw.bestPathOfIteration) { CTour bestIterationTour = iterationList.getBestLastIterationTour(); drawTour(bestIterationTour, BEST_GLOBAL_TOUR_DRAW_LAYER, 0f, 1f, 0f); } if (mDraw.bestPathOfAllIterations) { CTour bestGlobalTour = iterationList.getBestGlobalTour(); drawTour(bestGlobalTour, BEST_ITERATION_TOUR_DRAW_LAYER, 1f, 0f, 0f); } #if DEBUG if (debugTour != null) { drawTour(debugTour, OPT_TOUR_DRAW_LAYER - 0.5f, 1f, 1f, 0f, true); } #endif }
public void refreshStatisticNumbers() { CIterationList iterationList = CIterationList.getInstance(); if (iterationList.Last() != null) { tØIteration.Text = String.Format("{0:f}", iterationList.Last().AverageTourLength); } if (iterationList.GlobalAverageTourLength() != 0) { tØGlobal.Text = String.Format("{0:f}", iterationList.GlobalAverageTourLength()); } if (iterationList.getBestLastIterationTour() != null) { tBestIteration.Text = String.Format("{0:f}", iterationList.getBestLastIterationTour().getTourLength()); } if (iterationList.getBestGlobalTour() != null) { tBestGlobal.Text = String.Format("{0:f}", iterationList.getBestGlobalTour().getTourLength()); } }