From c7a0d8da41e0aeee39110c5719da61b2e11e6f4d Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 29 Jul 2024 01:35:43 +0200 Subject: [PATCH] Dependency changes --- Graph_Renderer/Benchmark.cs | 14 +++++++------- Graph_Renderer/Program.cs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Graph_Renderer/Benchmark.cs b/Graph_Renderer/Benchmark.cs index 95990ed..d05bce7 100644 --- a/Graph_Renderer/Benchmark.cs +++ b/Graph_Renderer/Benchmark.cs @@ -8,23 +8,23 @@ public static class Benchmark { public static void Run(float startLat, float startLon, float endLat, float endLon, float regionSize, string importPath, string exportPath, ILogger? logger = null) { - for (float speedRating = 0.7f; speedRating <= 1f; speedRating += 0.1f) + for (float speedRating = 0.75f; speedRating <= 0.75f; speedRating += 0.1f) { for (float angleRating = 1f; angleRating <= 1f; angleRating += 0.1f) { - for (float distanceImprovedRating = 0f; distanceImprovedRating <= 0.2f; distanceImprovedRating += 0.1f) + for (float distanceImprovedRating = 0.1f; distanceImprovedRating <= 0.1f; distanceImprovedRating += 0.1f) { - for (float distanceSpeedRating = 0f; distanceSpeedRating <= 0.2f; distanceSpeedRating += 0.1f) + for (float distanceSpeedRating = 0f; distanceSpeedRating <= 0f; distanceSpeedRating += 0.1f) { - for (int explorationDistance = 1200; explorationDistance <= 1200; explorationDistance += 100) + for (int explorationDistance = 1000; explorationDistance <= 2500; explorationDistance += 250) { - for (int additionalExploration = 65; additionalExploration <= 65; additionalExploration += 5) + for (int additionalExploration = 50; additionalExploration <= 200; additionalExploration += 25) { logger?.LogInformation($"Speed:{speedRating:0.00} Angle:{angleRating:0.00} DistanceImproved:{distanceImprovedRating:0.00} DistanceSpeed:{distanceSpeedRating:0.00} ExplorationDistance:{explorationDistance:000} Additional:{additionalExploration:000}"); string name = $"{speedRating:0.00}${angleRating:0.00}${distanceImprovedRating:0.00}${distanceSpeedRating:0.00}${explorationDistance:000}${additionalExploration:000}"; DateTime start = DateTime.Now; - Route r = new Astar(new(speedRating, angleRating, distanceImprovedRating, distanceSpeedRating)). - FindPath(startLat, startLon, endLat, endLon, regionSize, true, PathMeasure.Time, additionalExploration, importPath, logger); + Route r = new Astar(new(speedRating, angleRating, distanceImprovedRating, distanceSpeedRating), explorationDistance: explorationDistance, explorationMultiplier: additionalExploration). + FindPath(startLat, startLon, endLat, endLon, regionSize, true, PathMeasure.Time, importPath, logger); DateTime end = DateTime.Now; logger?.LogInformation($"Found path in {end - start:hh\\:mm\\:ss\\.fff}"); Directory.CreateDirectory(Path.Join(exportPath, "benchmark", name)); diff --git a/Graph_Renderer/Program.cs b/Graph_Renderer/Program.cs index 09b129c..327f99d 100644 --- a/Graph_Renderer/Program.cs +++ b/Graph_Renderer/Program.cs @@ -43,7 +43,7 @@ Logger logger = new(LogLevel.Information, consoleOut: Console.Out); if (!arguments.ContainsKey(benchmarkArg)) { DateTime start = DateTime.Now; - Route r = new Astar().FindPath(startLat, startLon, endLat, endLon, regionSize, true, PathMeasure.Time, 300, importPathVal[0], logger); + Route r = new Astar().FindPath(startLat, startLon, endLat, endLon, regionSize, true, PathMeasure.Distance, importPathVal[0], logger); DateTime end = DateTime.Now; logger.LogInformation($"Found path in {end - start:hh\\:mm\\:ss\\.fff}"); Renderer.Render(r, 25000, exportRenderPath[0]);