HOG2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
praStar Class Reference

The pra* search algorithm which does partial pathfinding using abstraction. More...

#include <PRAStar.h>

Inheritance diagram for praStar:
Inheritance graph
[legend]
Collaboration diagram for praStar:
Collaboration graph
[legend]

Public Member Functions

 praStar ()
 
virtual ~praStar ()
 
virtual pathGetPath (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

pathgetAbstractPath (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)
 
pathsmoothPath (path *p)
 

Protected Attributes

path ** cache
 
int partialLimit
 
int fixedPlanLevel
 
char algName [30]
 
GraphAbstractionmap
 
bool expandSearchRadius
 
bool planFromMiddle
 
bool smoothing
 
reservationProviderrp
 
std::vector< int > lengths
 

Additional Inherited Members

- Public Attributes inherited from SearchAlgorithm
uint32_t nodesExpanded
 
uint32_t nodesTouched
 

Detailed Description

The pra* search algorithm which does partial pathfinding using abstraction.

Definition at line 23 of file PRAStar.h.

Constructor & Destructor Documentation

◆ praStar()

praStar::praStar ( )

Definition at line 18 of file PRAStar.cpp.

References algName, cache, expandSearchRadius, fixedPlanLevel, partialLimit, and planFromMiddle.

◆ ~praStar()

virtual praStar::~praStar ( )
inlinevirtual

Definition at line 27 of file PRAStar.h.

Member Function Documentation

◆ astar()

unsigned int praStar::astar ( Graph g,
unsigned int  source,
unsigned int  destParent,
std::vector< unsigned int > &  eligibleNodeParents,
int  LABEL,
unsigned int  dest 
)
protected

◆ getAbstractPath()

path * praStar::getAbstractPath ( Graph g,
unsigned int  source,
unsigned int  destParent,
std::vector< unsigned int > &  eligibleNodeParents,
int  LABEL,
unsigned int  dest 
)
protected

◆ getAbstractPathLengths()

void praStar::getAbstractPathLengths ( std::vector< int > &  len)
inline

Definition at line 39 of file PRAStar.h.

References lengths.

◆ GetName()

virtual const char* praStar::GetName ( )
inlinevirtual

Implements SearchAlgorithm.

Definition at line 29 of file PRAStar.h.

References algName.

Referenced by praStarUnit::GetName().

◆ getPartialPathLimit()

int praStar::getPartialPathLimit ( )
inline

Definition at line 32 of file PRAStar.h.

References partialLimit.

◆ GetPath()

path * praStar::GetPath ( GraphAbstraction aMap,
node from,
node to,
reservationProvider rp = 0 
)
virtual

◆ relaxEdge()

void praStar::relaxEdge ( Heap nodeHeap,
Graph g,
edge e,
int  source,
int  nextNode,
int  dest,
int  LABEL 
)
protected

◆ setCache()

void praStar::setCache ( path **  p)

Definition at line 28 of file PRAStar.cpp.

References cache.

Referenced by praStarUnit::makeMove().

◆ setExpandSearchRadius()

void praStar::setExpandSearchRadius ( bool  _expandSearchRadius)
inline

Definition at line 34 of file PRAStar.h.

References expandSearchRadius.

Referenced by praStarUnit::makeMove().

◆ setFixedPlanLevel()

void praStar::setFixedPlanLevel ( int  p)
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.

◆ setPartialPathLimit()

void praStar::setPartialPathLimit ( int  limit)
inline

Definition at line 30 of file PRAStar.h.

References algName, and partialLimit.

◆ setPlanFromMiddle()

void praStar::setPlanFromMiddle ( bool  _planFromMiddle)
inline

Definition at line 33 of file PRAStar.h.

References planFromMiddle.

◆ setUseSmoothing()

void praStar::setUseSmoothing ( bool  _smoothing)
inline

Definition at line 35 of file PRAStar.h.

References smoothing.

◆ smoothPath()

path * praStar::smoothPath ( path p)
protected

Definition at line 267 of file PRAStar.cpp.

Member Data Documentation

◆ algName

char praStar::algName[30]
protected

Definition at line 57 of file PRAStar.h.

Referenced by GetName(), praStar(), and setPartialPathLimit().

◆ cache

path** praStar::cache
protected

Definition at line 54 of file PRAStar.h.

Referenced by GetPath(), praStar(), and setCache().

◆ expandSearchRadius

bool praStar::expandSearchRadius
protected

Definition at line 59 of file PRAStar.h.

Referenced by GetPath(), praStar(), and setExpandSearchRadius().

◆ fixedPlanLevel

int praStar::fixedPlanLevel
protected

Definition at line 56 of file PRAStar.h.

Referenced by GetPath(), praStar(), and setFixedPlanLevel().

◆ lengths

std::vector<int> praStar::lengths
protected

Definition at line 63 of file PRAStar.h.

Referenced by getAbstractPathLengths(), and GetPath().

◆ map

GraphAbstraction* praStar::map
protected

Definition at line 58 of file PRAStar.h.

Referenced by astar(), GetPath(), and relaxEdge().

◆ partialLimit

int praStar::partialLimit
protected

Definition at line 55 of file PRAStar.h.

Referenced by astar(), getPartialPathLimit(), GetPath(), praStar(), and setPartialPathLimit().

◆ planFromMiddle

bool praStar::planFromMiddle
protected

Definition at line 60 of file PRAStar.h.

Referenced by GetPath(), praStar(), and setPlanFromMiddle().

◆ rp

reservationProvider* praStar::rp
protected

Definition at line 62 of file PRAStar.h.

Referenced by astar(), and GetPath().

◆ smoothing

bool praStar::smoothing
protected

Definition at line 61 of file PRAStar.h.

Referenced by setUseSmoothing().


The documentation for this class was generated from the following files: