RAIN.Path.LPAPathFinder Class Reference

LPAPathFinder is an implementation of the Lifelong Planning A* algorithm described in this research: http://idm-lab.org/project-a.html. More...

List of all members.

Public Member Functions

 LPAPathFinder (PathGraph graph)
 Constructor.
void PathTest ()
 A test function that attempts to construct a path from every graph node to every other graph node.
List< int > ConstructPath (int startNodeIndex, int goalNodeIndex, out float cost)
 ConstructPath performs a new pathfinding search from startNodeIndex to goalNodeIndex.
List< int > ConstructPath (int startNodeIndex, int goalNodeIndex, int maxIterationsThisTurn, bool newSearch, out float cost, out bool done)
 ConstructPath performs a new pathfinding search from startNodeIndex to goalNodeIndex.
void UpdateState (int index)
 Normally this will be called by the pathfinding system as part of computing the path May be called manually to force a node to be re-evaluated when the graph has changed.
bool ComputePath (int maxIterations)
 Compute the path from the start to the end node. Normally this will be called as part of ConstructPath. However, this may be called manually to recompute the path if one or more nodes have been updated by UpdateState.
string PathString ()
 Returns a string representing the path graph indices in order.
List< int > PathNodesIndices (out float cost)
 Returns the found path as an ordered list of path graph node indices.

Public Attributes

int maxHeapSize = 25000

Detailed Description

LPAPathFinder is an implementation of the Lifelong Planning A* algorithm described in this research: http://idm-lab.org/project-a.html.

LPA* supports dynamic updates of the path at minimum additional pathfinding cost. This works because localized path information is stored at each node. The update algorithm supports propagating changes only to the extent that they impact past searches.


Constructor & Destructor Documentation

RAIN.Path.LPAPathFinder.LPAPathFinder ( PathGraph  graph)

Constructor.

Parameters:
graphThe graph to pathfind over

Member Function Documentation

bool RAIN.Path.LPAPathFinder.ComputePath ( int  maxIterations)

Compute the path from the start to the end node. Normally this will be called as part of ConstructPath. However, this may be called manually to recompute the path if one or more nodes have been updated by UpdateState.

Parameters:
maxIterationsmaxIterations defines how many loops can be processed before quitting for this frame
Returns:
true if processing completed, false if there is more work to be done next frame
List<int> RAIN.Path.LPAPathFinder.ConstructPath ( int  startNodeIndex,
int  goalNodeIndex,
out float  cost 
)

ConstructPath performs a new pathfinding search from startNodeIndex to goalNodeIndex.

Parameters:
startNodeIndexpath graph node to start from
goalNodeIndexpath graph node to end at
costout variable with final path cost
Returns:
An ordered list of path node indices defining the path
List<int> RAIN.Path.LPAPathFinder.ConstructPath ( int  startNodeIndex,
int  goalNodeIndex,
int  maxIterationsThisTurn,
bool  newSearch,
out float  cost,
out bool  done 
)

ConstructPath performs a new pathfinding search from startNodeIndex to goalNodeIndex.

Parameters:
startNodeIndexpath graph node to start from
goalNodeIndexpath graph node to end at
maxIterationsThisTurnhow many compute passes can be performed this frame, at most
newSearchif true, initialize and restart pathfinding
costout variable with final path cost
donevalue set to true if pathfinding completed work this frame. set to false if more work should be done
Returns:
An ordered list of path node indices defining the path
List<int> RAIN.Path.LPAPathFinder.PathNodesIndices ( out float  cost)

Returns the found path as an ordered list of path graph node indices.

Parameters:
costan out parameter with the total path cost
Returns:
An ordered list of path graph node indices
string RAIN.Path.LPAPathFinder.PathString ( )

Returns a string representing the path graph indices in order.

Returns:
a string representation of the path
void RAIN.Path.LPAPathFinder.PathTest ( )

A test function that attempts to construct a path from every graph node to every other graph node.

void RAIN.Path.LPAPathFinder.UpdateState ( int  index)

Normally this will be called by the pathfinding system as part of computing the path May be called manually to force a node to be re-evaluated when the graph has changed.

Parameters:
indexThe index of the node to re-evaluate