From f19aa0007ec81e6d09ac6c36f2f3dbb5a0c4e667 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 24 Apr 2023 19:38:23 +0200 Subject: [PATCH] Testsetup for time --- Server/Server.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Server/Server.cs b/Server/Server.cs index edb8057..7f43b9e 100644 --- a/Server/Server.cs +++ b/Server/Server.cs @@ -118,20 +118,16 @@ public class Server Queue calcThreads = new(); - for (double roadLevelPriority = 0.016; roadLevelPriority < 0.02; roadLevelPriority += 0.0002) + for (double extraTime = 30; extraTime > 1; extraTime -= 1) { - for (double maxAngle = 25; maxAngle < 35; maxAngle += 1) + double time = extraTime; + calcThreads.Enqueue(new Thread(() => { - double priority = roadLevelPriority; - double angle = maxAngle; - calcThreads.Enqueue(new Thread(() => - { - Pathfinder testresult = new Pathfinder(rm, priority, angle).AStar(start, - finish, Tag.SpeedType.car); - string fileName = $"angle{angle:00}_level{priority:0.0000}.result"; - testresult.SaveResult(Path.Join(parentFolder, fileName)); - })); - } + Pathfinder testresult = new Pathfinder(workingDir, 0.0215, 30).AStar(start, + finish, Tag.SpeedType.car, time); + string fileName = $"time{time:0}.result"; + testresult.SaveResult(Path.Join(parentFolder, fileName)); + })); } int totalTasks = calcThreads.Count;