SBPL Environment represented as an adjacency list graph. More...
#include <environment_precomputed_adjacency_list.h>
Public Member Functions | |
void | addPoint (const Coords &c) |
Add point to roadmap. Does not check for duplicates. | |
AdjacencyListSBPLEnv () | |
vector< Coords > | findOptimalPath (int *solution_cost) |
Use ARA* to find an optimal path between the currently set start and goal states. | |
int | GetFromToHeuristic (int FromStateID, int ToStateID) |
heuristic estimate from state FromStateID to state ToStateID | |
int | GetGoalHeuristic (int stateID) |
heuristic estimate from state with stateID to goal state | |
void | GetPreds (int TargetStateID, vector< int > *PredIDV, vector< int > *CostV) |
int | GetStartHeuristic (int stateID) |
heuristic estimate from start state to state with stateID | |
void | GetSuccs (int SourceStateID, vector< int > *SuccIDV, vector< int > *CostV) |
bool | hasPoint (const Coords &c) |
Does the roadmap contain this point? | |
bool | InitializeEnv (const char *sEnvFile) |
initialization environment from file (see .cfg files for examples) | |
bool | InitializeMDPCfg (MDPConfig *MDPCfg) |
initialization of MDP data structure | |
void | PrintEnv_Config (FILE *fOut) |
prints environment config file | |
void | PrintState (int stateID, bool bVerbose, FILE *fOut=NULL) |
prints the state variables for a state with stateID | |
void | removeLastPoints (unsigned int n=1) |
Remove the last N points added using addPoint (and all their incident edges) in O(N) time. | |
void | SetAllActionsandAllOutcomes (CMDPSTATE *state) |
see comments for GetSuccs functon | |
void | SetAllPreds (CMDPSTATE *state) |
see comments for GetSuccs functon | |
void | setCost (const Coords &c1, const Coords &c2, int cost) |
void | setCost (const Coords &c1, const Coords &c2) |
void | setGoalState (const Coords &c) |
void | setStartState (const Coords &c) |
int | SizeofCreatedEnv () |
returns the number of states (hashentries) created | |
void | writeToStream (ostream &str=cout) |
Private Member Functions | |
void | resetStateId2IndexMapping (void) |
Private Attributes | |
vector< Adjacencies > | adjacency_vector_ |
int | goalStateId_ |
map< Coords, int > | pointIds_ |
vector< Coords > | points_ |
int | startStateId_ |
SBPL Environment represented as an adjacency list graph.
Coords | Coords must be a type that 1) has operator<< and heuristicDistanceTo (const Coords&) const defined on it 2) can be used as a key of an STL map |
Nodes of the graph are labelled with Coords. Edges have integer costs attached to them. ARA* planning is done on this graph, and the function heuristicDistanceTo is used as the admissible heuristic.
Definition at line 33 of file environment_precomputed_adjacency_list.h.
AdjacencyListSBPLEnv< Coords >::AdjacencyListSBPLEnv | ( | ) |
Definition at line 101 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::addPoint | ( | const Coords & | c | ) |
Add point to roadmap. Does not check for duplicates.
Definition at line 126 of file environment_precomputed_adjacency_list.h.
vector< Coords > AdjacencyListSBPLEnv< Coords >::findOptimalPath | ( | int * | solution_cost | ) |
Use ARA* to find an optimal path between the currently set start and goal states.
Definition at line 351 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::GetFromToHeuristic | ( | int | FromStateID, |
int | ToStateID | ||
) | [virtual] |
heuristic estimate from state FromStateID to state ToStateID
Implements DiscreteSpaceInformation.
Definition at line 250 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::GetGoalHeuristic | ( | int | stateID | ) | [virtual] |
heuristic estimate from state with stateID to goal state
Implements DiscreteSpaceInformation.
Definition at line 256 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::GetPreds | ( | int | TargetStateID, |
vector< int > * | PredIDV, | ||
vector< int > * | CostV | ||
) |
Definition at line 344 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::GetStartHeuristic | ( | int | stateID | ) | [virtual] |
heuristic estimate from start state to state with stateID
Implements DiscreteSpaceInformation.
Definition at line 262 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::GetSuccs | ( | int | SourceStateID, |
vector< int > * | SuccIDV, | ||
vector< int > * | CostV | ||
) |
Definition at line 327 of file environment_precomputed_adjacency_list.h.
bool AdjacencyListSBPLEnv< Coords >::hasPoint | ( | const Coords & | c | ) |
Does the roadmap contain this point?
Definition at line 141 of file environment_precomputed_adjacency_list.h.
bool AdjacencyListSBPLEnv< Coords >::InitializeEnv | ( | const char * | sEnvFile | ) | [virtual] |
initialization environment from file (see .cfg files for examples)
Implements DiscreteSpaceInformation.
Definition at line 290 of file environment_precomputed_adjacency_list.h.
bool AdjacencyListSBPLEnv< Coords >::InitializeMDPCfg | ( | MDPConfig * | MDPCfg | ) | [virtual] |
initialization of MDP data structure
Implements DiscreteSpaceInformation.
Definition at line 241 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::PrintEnv_Config | ( | FILE * | fOut | ) | [virtual] |
prints environment config file
Implements DiscreteSpaceInformation.
Definition at line 275 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::PrintState | ( | int | stateID, |
bool | bVerbose, | ||
FILE * | fOut = NULL |
||
) | [virtual] |
prints the state variables for a state with stateID
Implements DiscreteSpaceInformation.
Definition at line 268 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::removeLastPoints | ( | unsigned int | n = 1 | ) |
Remove the last N points added using addPoint (and all their incident edges) in O(N) time.
Definition at line 148 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::resetStateId2IndexMapping | ( | void | ) | [private] |
Definition at line 373 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::SetAllActionsandAllOutcomes | ( | CMDPSTATE * | state | ) | [virtual] |
see comments for GetSuccs functon
Implements DiscreteSpaceInformation.
Definition at line 299 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::SetAllPreds | ( | CMDPSTATE * | state | ) | [virtual] |
see comments for GetSuccs functon
Implements DiscreteSpaceInformation.
Definition at line 319 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::setCost | ( | const Coords & | c1, |
const Coords & | c2, | ||
int | cost | ||
) |
Definition at line 184 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::setCost | ( | const Coords & | c1, |
const Coords & | c2 | ||
) |
Definition at line 178 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::setGoalState | ( | const Coords & | c | ) |
Definition at line 233 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::setStartState | ( | const Coords & | c | ) |
Definition at line 225 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::SizeofCreatedEnv | ( | ) | [virtual] |
returns the number of states (hashentries) created
Implements DiscreteSpaceInformation.
Definition at line 283 of file environment_precomputed_adjacency_list.h.
void AdjacencyListSBPLEnv< Coords >::writeToStream | ( | ostream & | str = cout | ) |
Definition at line 106 of file environment_precomputed_adjacency_list.h.
vector<Adjacencies> AdjacencyListSBPLEnv< Coords >::adjacency_vector_ [private] |
Definition at line 90 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::goalStateId_ [private] |
Definition at line 92 of file environment_precomputed_adjacency_list.h.
map<Coords,int> AdjacencyListSBPLEnv< Coords >::pointIds_ [private] |
Definition at line 89 of file environment_precomputed_adjacency_list.h.
vector<Coords> AdjacencyListSBPLEnv< Coords >::points_ [private] |
Definition at line 88 of file environment_precomputed_adjacency_list.h.
int AdjacencyListSBPLEnv< Coords >::startStateId_ [private] |
Definition at line 91 of file environment_precomputed_adjacency_list.h.