Mutlithreaded RegionManager
This commit is contained in:
parent
976108569b
commit
d8ce6e4ce5
@ -26,7 +26,7 @@ public class Server
|
||||
Coordinates start = new (48.7933798f, 9.8275859f);
|
||||
Coordinates finish = new (48.795918f, 9.021618f);
|
||||
|
||||
TestVariables(workingDir, start, finish, 16);
|
||||
TestVariables(workingDir, start, finish, 32);
|
||||
|
||||
/*
|
||||
string parentFolder = new DirectoryInfo(workingDir).Parent!.FullName;
|
||||
@ -72,6 +72,8 @@ public class Server
|
||||
private static void TestVariables(string workingDir, Coordinates start, Coordinates finish, int threads)
|
||||
{
|
||||
string parentFolder = new DirectoryInfo(workingDir).Parent!.FullName;
|
||||
|
||||
RegionManager rm = new (workingDir);
|
||||
|
||||
Queue<Thread> calcThreads = new();
|
||||
|
||||
@ -86,7 +88,7 @@ public class Server
|
||||
double factor = angleWeightFactor;
|
||||
calcThreads.Enqueue(new Thread(() =>
|
||||
{
|
||||
Pathfinder testresult = new Pathfinder(workingDir).AStar(start,
|
||||
Pathfinder testresult = new Pathfinder(rm).AStar(start,
|
||||
finish, Tag.SpeedType.car, priority, roadPriority,
|
||||
0, factor);
|
||||
string fileName =
|
||||
|
Loading…
Reference in New Issue
Block a user