Exemple #1
0
        private void RunLocalSearch()
        {
            LocalSearch localSearch = new LocalSearch();
            Route       bestRoute   = localSearch.RunLocalSearch(graph, randomRouteGenerator.GenerateSingleRandomRoute(graph.GraphOfNodes.Count));

            DataDisplay.PrintRouteAndCalculation(bestRoute.RouteIds, bestRoute.RouteCost);
        }
Exemple #2
0
        private void EvaluateRouteAndPrint()
        {
            int[]  route       = randomRouteGenerator.GenerateSingleRandomRoute(graph.GraphOfNodes.Count);
            double costOfRoute = routeEvaluator.CalculateCostOfSingleRoute(route, graph);

            DataDisplay.PrintRouteAndCalculation(route, costOfRoute);
        }
Exemple #3
0
        private void RunTimeBasedRandomSearch(int timeToExecuteFor)
        {
            ReadGraphFromFile();
            KeyValuePair <int[], double> routeAndTimeTaken = timeBasedEvaluator.CalculateBestRandomRouteInGivenTime(graph, timeToExecuteFor);

            DataDisplay.PrintRouteAndCalculation(routeAndTimeTaken.Key, routeAndTimeTaken.Value);
        }