Ejemplo n.º 1
0
        private void CalculateRouteButton_Click(object sender, EventArgs e)
        {
            MainHelper mainHelper = new MainHelper(loadedData);

            if (!int.TryParse(StartingCityTextBox.Text, out startingCityId) || startingCityId > loadedData.Count)
            {
                startingCityId = 1;
            }

            switch (currentHeuristic)
            {
            case HeuristicTypeEnum.ILS:
                currentPath = mainHelper.ILS(startingCityId);
                RedrawMap();
                break;

            case HeuristicTypeEnum.VNS:
                currentPath = mainHelper.Basic_VNS(startingCityId);
                RedrawMap();
                break;

            default:
                break;
            }

            StatisticsButton.Visible  = true;
            HideMarkersButton.Visible = true;
        }