Add constructor to set PriorityWeights for inital search

This commit is contained in:
glax 2024-07-24 23:46:42 +02:00
parent 2f24a491b2
commit 34e6eb95b5

View File

@ -6,11 +6,11 @@ using OSM_Regions;
namespace astar
{
public class Astar(ValueTuple<float, float, float, float>? optimizingWeights = null, int? explorationDistance = null, int? explorationMultiplier = null)
public class Astar(ValueTuple<float, float, float, float>? priorityWeights = null, ValueTuple<float, float, float, float>? optimizingWeights = null, int? explorationDistance = null, int? explorationMultiplier = null)
{
private static readonly ValueTuple<float, float, float, float> DefaultPriorityWeights = new(1, 1.4f, 0, 0);
private readonly ValueTuple<float, float, float, float> DefaultPriorityWeights = priorityWeights ?? new(1, 1.4f, 0, 0);
private readonly ValueTuple<float, float, float, float> OptimizingWeights = optimizingWeights ?? new(0, 0.07f, 0, 0);
private int ExplorationDistanceFromRoute = explorationDistance ?? 200;
private int ExplorationDistanceFromRoute = explorationDistance ?? 1200;
private int ExplorationMultiplier = explorationMultiplier ?? 65;
public Route FindPath(float startLat, float startLon, float endLat, float endLon, float regionSize, bool car = true, PathMeasure pathing = PathMeasure.Distance, float additionalExploration = 3, string? importFolderPath = null, ILogger? logger = null)