Dependency changes

This commit is contained in:
glax 2024-07-29 01:35:43 +02:00
parent 60b4e44244
commit c7a0d8da41
2 changed files with 8 additions and 8 deletions

View File

@ -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));

View File

@ -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]);