HOG2
|
The pra* search algorithm which does partial pathfinding using abstraction. More...
#include <PRAStar.h>
Public Member Functions | |
praStar () | |
virtual | ~praStar () |
virtual path * | GetPath (GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0) |
virtual const char * | GetName () |
void | setPartialPathLimit (int limit) |
int | getPartialPathLimit () |
void | setPlanFromMiddle (bool _planFromMiddle) |
void | setExpandSearchRadius (bool _expandSearchRadius) |
void | setUseSmoothing (bool _smoothing) |
void | setCache (path **p) |
void | setFixedPlanLevel (int p) |
Set a fixed level for abstraction in planning. More... | |
void | getAbstractPathLengths (std::vector< int > &len) |
Public Member Functions inherited from SearchAlgorithm | |
SearchAlgorithm () | |
virtual | ~SearchAlgorithm () |
uint64_t | GetNodesExpanded () |
uint64_t | GetNodesTouched () |
virtual void | LogFinalStats (StatCollection *) |
Protected Member Functions | |
path * | getAbstractPath (Graph *g, unsigned int source, unsigned int destParent, std::vector< unsigned int > &eligibleNodeParents, int LABEL, unsigned int dest) |
unsigned int | astar (Graph *g, unsigned int source, unsigned int destParent, std::vector< unsigned int > &eligibleNodeParents, int LABEL, unsigned int dest) |
void | relaxEdge (Heap *nodeHeap, Graph *g, edge *e, int source, int nextNode, int dest, int LABEL) |
path * | smoothPath (path *p) |
Protected Attributes | |
path ** | cache |
int | partialLimit |
int | fixedPlanLevel |
char | algName [30] |
GraphAbstraction * | map |
bool | expandSearchRadius |
bool | planFromMiddle |
bool | smoothing |
reservationProvider * | rp |
std::vector< int > | lengths |
Additional Inherited Members | |
Public Attributes inherited from SearchAlgorithm | |
uint32_t | nodesExpanded |
uint32_t | nodesTouched |
The pra* search algorithm which does partial pathfinding using abstraction.
praStar::praStar | ( | ) |
Definition at line 18 of file PRAStar.cpp.
References algName, cache, expandSearchRadius, fixedPlanLevel, partialLimit, and planFromMiddle.
|
protected |
Definition at line 275 of file PRAStar.cpp.
References Heap::Add(), node::edgeIterNext(), GraphAbstraction::GetAbstractGraph(), node::getEdgeIter(), node::GetLabelF(), node::GetLabelL(), Graph::GetNode(), node::GetNum(), GraphAbstraction::h(), Heap::IsIn(), GraphAbstractionConstants::kAbstractionLevel, GraphAbstractionConstants::kEdgeCapacity, graph_object::key, GraphAbstractionConstants::kParent, map, node::markEdge(), MAXINT, reservationProvider::nodeOccupied(), SearchAlgorithm::nodesExpanded, SearchAlgorithm::nodesTouched, partialLimit, relaxEdge(), Heap::Remove(), rp, node::SetKeyLabel(), node::SetLabelF(), and verbose.
Referenced by getAbstractPath().
|
protected |
Definition at line 234 of file PRAStar.cpp.
References astar(), edge::getFrom(), node::getMarkedEdge(), Graph::GetNode(), edge::getTo(), path, edge::setMarked(), and verbose.
Referenced by GetPath().
|
inline |
|
inlinevirtual |
Implements SearchAlgorithm.
Definition at line 29 of file PRAStar.h.
References algName.
Referenced by praStarUnit::GetName().
|
inline |
Definition at line 32 of file PRAStar.h.
References partialLimit.
|
virtual |
Implements SearchAlgorithm.
Reimplemented in aStar2.
Definition at line 33 of file PRAStar.cpp.
References cache, expandSearchRadius, Graph::FindEdge(), fixedPlanLevel, GraphAbstraction::GetAbstractGraph(), GraphAbstraction::GetAbstractionLevel(), getAbstractPath(), node::GetLabelL(), node::GetNum(), GraphAbstraction::GetNumAbstractGraphs(), Graph::GetNumNodes(), GraphAbstractionConstants::kAbstractionLevel, GraphAbstractionConstants::kFirstData, GraphAbstractionConstants::kParent, GraphAbstractionConstants::kTemporaryLabel, path::length(), lengths, map, path::n, path::next, SearchAlgorithm::nodesExpanded, SearchAlgorithm::nodesTouched, partialLimit, path, GraphAbstraction::Pathable(), planFromMiddle, rp, and verbose.
|
protected |
Definition at line 421 of file PRAStar.cpp.
References d, Heap::DecreaseKey(), fless(), node::GetLabelF(), Graph::GetNode(), edge::GetWeight(), GraphAbstraction::h(), map, node::markEdge(), node::SetLabelF(), and verbose.
Referenced by astar().
void praStar::setCache | ( | path ** | p | ) |
|
inline |
Definition at line 34 of file PRAStar.h.
References expandSearchRadius.
Referenced by praStarUnit::makeMove().
|
inline |
Set a fixed level for abstraction in planning.
-1 to return to dynamic level selection
Definition at line 38 of file PRAStar.h.
References fixedPlanLevel.
|
inline |
Definition at line 30 of file PRAStar.h.
References algName, and partialLimit.
|
inline |
Definition at line 33 of file PRAStar.h.
References planFromMiddle.
|
inline |
Definition at line 267 of file PRAStar.cpp.
|
protected |
Definition at line 57 of file PRAStar.h.
Referenced by GetName(), praStar(), and setPartialPathLimit().
|
protected |
Definition at line 54 of file PRAStar.h.
Referenced by GetPath(), praStar(), and setCache().
|
protected |
Definition at line 59 of file PRAStar.h.
Referenced by GetPath(), praStar(), and setExpandSearchRadius().
|
protected |
Definition at line 56 of file PRAStar.h.
Referenced by GetPath(), praStar(), and setFixedPlanLevel().
|
protected |
Definition at line 63 of file PRAStar.h.
Referenced by getAbstractPathLengths(), and GetPath().
|
protected |
Definition at line 58 of file PRAStar.h.
Referenced by astar(), GetPath(), and relaxEdge().
|
protected |
Definition at line 55 of file PRAStar.h.
Referenced by astar(), getPartialPathLimit(), GetPath(), praStar(), and setPartialPathLimit().
|
protected |
Definition at line 60 of file PRAStar.h.
Referenced by GetPath(), praStar(), and setPlanFromMiddle().
|
protected |
|
protected |
Definition at line 61 of file PRAStar.h.
Referenced by setUseSmoothing().