-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
42 lines (35 loc) · 1.12 KB
/
main.cpp
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
38
39
40
41
42
/** C++ Path optimization
* Tests various algorithms against the problem of
* finding a path between an initial state and a goal state
* @author JDumont
* */
#include "core/PathPlanning.h"
#include "visualization/DataBinder.h"
#include "visualization/Window.h"
#include "visualization/VisualizationLauncher.h"
int main() {
{
OrientedGraph g("../assets/simple.graph");
ShortestPathProblem P(g, g.getNode(0), g.getNode(5));
ShortestPathResult res = Djikstra::solve(P);
std::cout << res<<std::endl;
}
{
OrientedGraph g("../assets/simple.geograph");
ShortestPathProblem P(g, g.getNode(0), g.getNode(5));
ShortestPathResult res = Astar::solve(P);
std::cout << res<<std::endl;
}
{
OrientedGraph g("../assets/simple.graph");
ShortestPathProblem P(g, g.getNode(0), g.getNode(5));
ShortestPathResult res = BackwardsDijkstra::solve(P);
std::cout << res<<std::endl;
}
{
Terrain2d g("../assets/hall.terrain2d");
PathFinderProblem P(g, Point2d(1, 1), Point2d(8, 8));
RTT::solve(P);
}
return 0;
}