/// <summary> /// Initializes a new instance of the <see cref="FARMethod"/> class. /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public DummyMethod(Graph graph, int seed, PathPlanningCommunicator logger) : base(graph, seed, logger) { if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } _deadlockHandler = new DeadlockHandler(graph, seed); _blocked = new HashSet <int>(); }
/// <summary> /// Initializes a new instance of the <see cref="FARMethod"/> class. /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public CBSMethod(Graph graph, int seed, PathPlanningCommunicator logger) : base(graph, seed, logger) { if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } _reservationTable = new ReservationTable(graph); _agentReservationTable = new ReservationTable(graph, false, true, false); _deadlockHandler = new DeadlockHandler(graph, seed); }
/// <summary> /// Initializes a new instance of the <see cref="FARMethod"/> class. /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public BCPMethod(Graph graph, int seed, PathPlanningCommunicator logger) : base(graph, seed, logger) { if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } _reservationTable = new ReservationTable(graph, true, true, false); _biasedCost = new Dictionary <int, Dictionary <int, double> >(); _deadlockHandler = new DeadlockHandler(graph, seed); }
/// <summary> /// constructor /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public WHCAvStarMethod(Graph graph, int seed, PathPlanningCommunicator logger) : base(graph, seed, logger) { if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } rraStars = new Dictionary <int, ReverseResumableAStar>(); _reservationTable = new ReservationTable(graph); if (UseDeadlockHandler) { _deadlockHandler = new DeadlockHandler(graph, seed); } }
/// <summary> /// Initializes a new instance of the <see cref="FARMethod"/> class. /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public FARMethod(Graph graph, int seed, EvadingStrategy evadingStragety, PathPlanningCommunicator logger) : base(graph, seed, logger) { _evadingStragety = evadingStragety; if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } _waitFor = new Dictionary <int, int>(); _reservationTable = new ReservationTable(graph, false, true, false); _rraStar = new Dictionary <int, ReverseResumableAStar>(); _moveTime = new Dictionary <int, double>(); _waitTime = new Dictionary <int, double>(); _es2evadedFrom = new Dictionary <int, HashSet <int> >(); if (UseDeadlockHandler) { _deadlockHandler = new DeadlockHandler(graph, seed); } }
/// <summary> /// constructor /// </summary> /// <param name="graph">graph</param> /// <param name="seed">The seed to use for the randomizer.</param> /// <param name="logger">The logger to use.</param> public WHCAnStarMethod(Graph graph, int seed, List <int> agentIds, List <int> startIds, PathPlanningCommunicator logger) : base(graph, seed, logger) { if (graph.BackwardEdges == null) { graph.GenerateBackwardEgdes(); } rraStars = new Dictionary <int, ReverseResumableAStar>(); _reservationTable = new ReservationTable(graph, true, false, false); _calculatedReservations = new Dictionary <int, List <ReservationTable.Interval> >(); for (var i = 0; i < agentIds.Count; i++) { _calculatedReservations.Add(agentIds[i], new List <ReservationTable.Interval>(new ReservationTable.Interval[] { new ReservationTable.Interval(startIds[i], 0, double.PositiveInfinity) })); _reservationTable.Add(_calculatedReservations[agentIds[i]]); } if (UseDeadlockHandler) { _deadlockHandler = new DeadlockHandler(graph, seed); } }
/// <summary> /// Initializes a new instance of the <see cref="IndependenceDetection" /> class. /// </summary> /// <param name="lowLevelSolver">The low level solver.</param> /// <param name="seed">The seed to use for the randomizer.</param> public IndependenceDetection(Graph graph, int seed, LowLevelSolver lowLevelSolver = null) { this.LowLevSolver = lowLevelSolver; this._graph = graph; this._deadlockHandler = new DeadlockHandler(_graph, seed); }