-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsipp.h
37 lines (32 loc) · 1.22 KB
/
sipp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef SIPP_H
#define SIPP_H
#include "structs.h"
#include "map.h"
#include <unordered_map>
#include <map>
#include <set>
#include "heuristic.h"
class SIPP
{
public:
SIPP() { h_values = nullptr;}
~SIPP() { h_values = nullptr; }
Path find_path(Agent agent, const Map &map, const std::vector<std::vector<int> > &cat, std::list<Constraint> cons = {}, Heuristic *h_values = nullptr);
private:
Agent agent;
void find_successors(const Node curNode, const Map &map, std::list<Node> &succs);
void add_open(Node newNode, const std::vector<std::vector<int> > &cat);
Node find_min(int size);
int count_h_value(int i, int j, int goal_i, int goal_j);
void reconstruct_path(Node curNode);
void make_constraints(std::list<Constraint> &cons);
void clear();
unsigned int openSize;
std::unordered_multimap<int, Node> close;
std::vector<std::list<Node>> open;
Path path;
Heuristic* h_values;
std::map<Move, std::vector<Move>> constraints;//stores sets of constraints associated with moves
std::map<std::pair<int,int>, std::vector<std::pair<int,int>>> collision_intervals;//stores sets of collision intervals associated with cells
};
#endif // SIPP_H