HOG2
|
The pra* search algorithm which does partial pathfinding using abstraction. More...
#include <PRAStar2.h>
Public Member Functions | |
praStar2 () | |
virtual | ~praStar2 () |
virtual path * | GetPath (GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0) |
virtual const char * | GetName () |
void | setPartialPathLimit (int limit) |
int | getPartialPathLimit () |
void | setEnhancedAbstractPathing (bool enhance) |
void | setExpandSearchRadius (bool _expandSearchRadius) |
Set whether we want to expand the corridor to search in. More... | |
void | setPlanFromMiddle (bool _planFromMiddle) |
Set whether we want to start planning in the middle between base and top level of abstraction. More... | |
void | setFixedPlanLevel (int p) |
Set the level of abstraction to start pathfinding at. More... | |
void | setSkipParameter (int _skip) |
Set how many abstraction layers should be skipped at each step. More... | |
int | getTopLevel () |
int | getNumLevelsUsed () |
Public Member Functions inherited from SearchAlgorithm | |
SearchAlgorithm () | |
virtual | ~SearchAlgorithm () |
uint64_t | GetNodesExpanded () |
uint64_t | GetNodesTouched () |
virtual void | LogFinalStats (StatCollection *) |
Protected Member Functions | |
void | setupSearch (GraphAbstraction *aMap, std::vector< node * > &fromChain, node *from, std::vector< node * > &toChain, node *to) |
path * | buildNextAbstractPath (GraphAbstraction *, path *lastPath, std::vector< node * > &fromChain, std::vector< node * > &toChain, reservationProvider *) |
path * | trimPath (path *lastPath, node *origDest) |
void | selectTopAbstractionLevel (GraphAbstraction *aMap, std::vector< node * > &fromChain, std::vector< node * > &toChain) |
Protected Attributes | |
int | partialLimit |
bool | enhancedAbstractPathing |
bool | expandSearchRadius |
corridorAStar | cAStar |
char | algName [30] |
bool | planFromMiddle |
int | fixedPlanLevel |
int | skip |
int | topLevel |
int | numLevels |
Additional Inherited Members | |
Public Attributes inherited from SearchAlgorithm | |
uint32_t | nodesExpanded |
uint32_t | nodesTouched |
The pra* search algorithm which does partial pathfinding using abstraction.
Definition at line 25 of file PRAStar2.h.
praStar2::praStar2 | ( | ) |
Definition at line 18 of file PRAStar2.cpp.
References algName, enhancedAbstractPathing, expandSearchRadius, fixedPlanLevel, numLevels, partialLimit, planFromMiddle, skip, and topLevel.
|
inlinevirtual |
Definition at line 29 of file PRAStar2.h.
|
protected |
Definition at line 126 of file PRAStar2.cpp.
References cAStar, enhancedAbstractPathing, expandSearchRadius, GraphAbstraction::GetAbstractGraph(), corridorAStar::getBestPath(), Graph::getEdgeIter(), node::GetLabelL(), Graph::GetNode(), SearchAlgorithm::GetNodesExpanded(), SearchAlgorithm::GetNodesTouched(), node::GetNum(), corridorAStar::GetPath(), GraphAbstractionConstants::kAbstractionLevel, GraphAbstractionConstants::kParent, path::n, path::next, SearchAlgorithm::nodesExpanded, SearchAlgorithm::nodesTouched, numLevels, partialLimit, corridorAStar::setCorridor(), skip, and verbose.
Referenced by GetPath().
|
inlinevirtual |
|
inline |
Definition at line 64 of file PRAStar2.h.
References numLevels.
|
inline |
Definition at line 35 of file PRAStar2.h.
References partialLimit.
|
virtual |
Implements SearchAlgorithm.
Definition at line 32 of file PRAStar2.cpp.
References buildNextAbstractPath(), Graph::FindEdge(), GraphAbstraction::GetAbstractGraph(), node::GetLabelL(), node::GetNum(), GraphAbstractionConstants::kAbstractionLevel, path::n, path, and setupSearch().
|
inline |
Definition at line 63 of file PRAStar2.h.
References topLevel.
|
protected |
Definition at line 89 of file PRAStar2.cpp.
References fixedPlanLevel, GraphAbstraction::GetAbstractGraph(), GraphAbstraction::GetAbstractionLevel(), Graph::GetNumNodes(), planFromMiddle, topLevel, and verbose.
Referenced by setupSearch().
|
inline |
Definition at line 36 of file PRAStar2.h.
References enhancedAbstractPathing.
|
inline |
Set whether we want to expand the corridor to search in.
Set whether we want to expand the corridor from just the parents along the path to these parents and their neighbors
Definition at line 42 of file PRAStar2.h.
References expandSearchRadius.
|
inline |
Set the level of abstraction to start pathfinding at.
Setting the fixed plan level to -1 will do dynamic level selection if setPlanFromMiddle is true, and it will start at the highest possible level if setPlanFromMiddle is false. Default is -1.
Definition at line 55 of file PRAStar2.h.
References fixedPlanLevel.
|
inline |
Definition at line 33 of file PRAStar2.h.
References algName, and partialLimit.
|
inline |
Set whether we want to start planning in the middle between base and top level of abstraction.
If true, sets the top level for pathfinding to be the level in the middle between the top level and the base level of abstraction. If false, top level for pathfinding is the topmost abstraction if fixedPlanLevel=-1, and the fixedPlanLevel otherwise.
Definition at line 49 of file PRAStar2.h.
References planFromMiddle.
|
inline |
Set how many abstraction layers should be skipped at each step.
A skip of -1 will only do pathfinding at the top level of abstraction and at the base level. A skip of 0 is the default, which will do pathfinding at each level.
Definition at line 61 of file PRAStar2.h.
References skip.
|
protected |
Definition at line 53 of file PRAStar2.cpp.
References node::GetNum(), GraphAbstraction::GetNumAbstractGraphs(), SearchAlgorithm::nodesExpanded, SearchAlgorithm::nodesTouched, numLevels, GraphAbstraction::Pathable(), selectTopAbstractionLevel(), and verbose.
Referenced by GetPath().
Definition at line 244 of file PRAStar2.cpp.
References node::GetLabelL(), GraphAbstractionConstants::kParent, path::n, path::next, and partialLimit.
|
protected |
Definition at line 84 of file PRAStar2.h.
Referenced by GetName(), praStar2(), and setPartialPathLimit().
|
protected |
Definition at line 83 of file PRAStar2.h.
Referenced by buildNextAbstractPath().
|
protected |
Definition at line 81 of file PRAStar2.h.
Referenced by buildNextAbstractPath(), praStar2(), and setEnhancedAbstractPathing().
|
protected |
Definition at line 82 of file PRAStar2.h.
Referenced by buildNextAbstractPath(), praStar2(), and setExpandSearchRadius().
|
protected |
Definition at line 87 of file PRAStar2.h.
Referenced by praStar2(), selectTopAbstractionLevel(), and setFixedPlanLevel().
|
protected |
Definition at line 90 of file PRAStar2.h.
Referenced by buildNextAbstractPath(), getNumLevelsUsed(), praStar2(), and setupSearch().
|
protected |
Definition at line 80 of file PRAStar2.h.
Referenced by buildNextAbstractPath(), getPartialPathLimit(), praStar2(), setPartialPathLimit(), and trimPath().
|
protected |
Definition at line 86 of file PRAStar2.h.
Referenced by praStar2(), selectTopAbstractionLevel(), and setPlanFromMiddle().
|
protected |
Definition at line 88 of file PRAStar2.h.
Referenced by buildNextAbstractPath(), praStar2(), and setSkipParameter().
|
protected |
Definition at line 89 of file PRAStar2.h.
Referenced by getTopLevel(), praStar2(), and selectTopAbstractionLevel().