removed nodeAngleFactor

This commit is contained in:
2023-04-23 15:00:22 +02:00
parent af1d9baf4f
commit 886ccaa8dc
3 changed files with 14 additions and 16 deletions

View File

@ -26,8 +26,8 @@ public class Server
Coordinates start = new (48.7933798f, 9.8275859f);
Coordinates finish = new (48.795918f, 9.021618f);
//TestVariables(workingDir, start, finish, 16);
//GetShortestRoute("D:");
TestVariables(workingDir, start, finish, 16);
GetShortestRoute("D:");
/*
ValueTuple<Image, Renderer.Bounds> area = RenderAreaBaseImage(workingDir, start, finish);
@ -41,7 +41,7 @@ public class Server
PathResult.PathresultFromFile(@"D:\angle0,160_level0,020_same0,020.result"), Image.FromFile(@"D:\Base.png"), area.Item2);
areaWeight.Item1.Save(@"D:\Weight.png", ImageFormat.Png);
*/
/*
string parentFolder = new DirectoryInfo(workingDir).Parent!.FullName;
Pathfinder result = new Pathfinder(workingDir, 0.002, 0,
@ -118,22 +118,22 @@ public class Server
Queue<Thread> calcThreads = new();
for (double sameRoadPriority = 0.02; sameRoadPriority < 0.1; sameRoadPriority += 0.02)
for (double sameRoadPriority = 0; sameRoadPriority < 0.02; sameRoadPriority += 0.001)
{
for (double roadLevelPriority = 0.05; roadLevelPriority > 0; roadLevelPriority -= 0.002)
for (double roadLevelPriority = 0.02; roadLevelPriority > 0; roadLevelPriority -= 0.001)
{
for (double angleWeightFactor = 0.12; angleWeightFactor < 0.17; angleWeightFactor += 0.002)
for (double maxAngle = 5; maxAngle < 45; maxAngle += 5)
{
double priority = roadLevelPriority;
double roadPriority = sameRoadPriority;
double factor = angleWeightFactor;
double angle = maxAngle;
calcThreads.Enqueue(new Thread(() =>
{
Pathfinder testresult = new Pathfinder(rm, priority, roadPriority,
0, factor, 30).AStar(start,
0, angle).AStar(start,
finish, Tag.SpeedType.car);
string fileName =
$"angle{factor:0.000}_level{priority:0.000}_same{roadPriority:0.000}.result";
$"angle{angle:0.000}_level{priority:0.000}_same{roadPriority:0.000}.result";
testresult.SaveResult(Path.Join(parentFolder, fileName));
}));
}