Testsetup for time

This commit is contained in:
glax 2023-04-24 19:38:23 +02:00
parent f525b88a3a
commit f19aa0007e

View File

@ -118,20 +118,16 @@ public class Server
Queue<Thread> 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;