示例#1
0
 public PRVJTFinder(PRVJTConfig config, IRouteService routeService)
 {
     Config       = config;
     GaFinder     = new GeneticAlgorithmFinder(routeService, config.Settings);
     Settings     = Config.Settings;
     RouteService = routeService;
 }
        static async Task Main()
        {
            Console.WriteLine("Calc routes:");

            var service = new CachedGoogleService(httpClient);
            var ga      = new GeneticAlgorithmFinder(
                Fitness.FitnessTimePath,
                Mutates.MutateSM,
                Crossover.CrossoverOBX,
                Selection.SelectCouple,
                service,
                new GASettings()
                );

            var address = new[] {
                "Rua Maria Roschel Schunck 817",
                "Avenida Manuel Alves Soares 460",
                "Lambda3",
                "Senac Santo Amaro",
            };

            var locals = new List <Local>();

            foreach (var item in address)
            {
                locals.Add(await service.GetPointAsync(item, item));
            }

            var response = await ga.Epoch(locals);
        }