Debug logging during search

This commit is contained in:
glax 2024-07-23 04:04:59 +02:00
parent f8b3d72292
commit 0bbda3dfd0

View File

@ -37,7 +37,6 @@ namespace astar
while (toVisitStart.Count > 0 && toVisitEnd.Count > 0)
{
logger?.LogDebug($"Length toVisit-Start: {toVisitStart.Count} -End: {toVisitEnd.Count}");
ulong currentNodeStartId = toVisitStart.Dequeue();
Node currentNodeStart = graph.Nodes[currentNodeStartId];
foreach ((ulong neighborId, ulong wayId) in currentNodeStart.Neighbors)
@ -101,6 +100,7 @@ namespace astar
}
logger?.LogTrace($"Neighbor {neighborId} {neighborNode}");
}
logger?.LogDebug($"Distance {currentNodeStart.DistanceTo(currentNodeEnd):000000.00}m toVisit-Queues: {toVisitStart.Count} {toVisitEnd.Count}");
}
return new Route(graph, Array.Empty<Step>().ToList(), false);