HOG2
SpreadPRAStar.h
Go to the documentation of this file.
1 /*
2  * $Id: spreadPRAStar.h
3  * hog2
4  *
5  * Created by Nathan Sturtevant on 6/27/05.
6  * Modified by Nathan Sturtevant on 02/29/20.
7  *
8  * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9  *
10  */
11 
12 #include "SearchAlgorithm.h"
13 #include "Heap.h"
14 #include "CorridorAStar.h"
15 
16 #ifndef SPREADPRASTAR_H
17 #define SPREADPRASTAR_H
18 
20 
22 public:
23  spreadPRAStar();
24  virtual ~spreadPRAStar() {}
25  void setPartialPathLimit(int limit)
26  { partialLimit = limit; sprintf(algName, "SpreadPRA*(%d)", partialLimit); }
27 
28  virtual path *GetPath(GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp = 0);
30  int getNumThinkSteps();
31  path *think();
32 private:
34  std::vector<node *> &fromChain, node *from,
35  std::vector<node *> &toChain, node *to);
37  std::vector<node *> &fromChain,
38  std::vector<node *> &toChain,
40  path *trimPath(path *lastPath, node *origDest);
41 
42  char algName[30];
46  std::vector<node *> startChain, endChain;
48 };
49 
50 #endif
spreadExecSearchAlgorithm
Definition: SpreadExecSearchAlgorithm.h:17
GraphAbstraction
A generic class for basic operations on Graph abstractions.
Definition: GraphAbstraction.h:63
spreadPRAStar::setPartialPathLimit
void setPartialPathLimit(int limit)
Definition: SpreadPRAStar.h:25
Heap.h
spreadPRAStar::getNumThinkSteps
int getNumThinkSteps()
how many times do we have to "think" to find the solution, return -1 if unknown
Definition: SpreadPRAStar.cpp:54
spreadPRAStar::trimPath
path * trimPath(path *lastPath, node *origDest)
Definition: SpreadPRAStar.cpp:204
SearchAlgorithm.h
corridorAStar
Corridor AStar builds a a* path between two nodes, restricting itself to a particular corridor,...
Definition: CorridorAStar.h:25
spreadExecSearchAlgorithm::aMap
GraphAbstraction * aMap
Definition: SpreadExecSearchAlgorithm.h:32
spreadPRAStar::~spreadPRAStar
virtual ~spreadPRAStar()
Definition: SpreadPRAStar.h:24
spreadPRAStar::lastPath
path * lastPath
Definition: SpreadPRAStar.h:45
spreadPRAStar::buildNextAbstractPath
path * buildNextAbstractPath(GraphAbstraction *, path *lastPath, std::vector< node * > &fromChain, std::vector< node * > &toChain, reservationProvider *)
Definition: SpreadPRAStar.cpp:121
spreadPRAStar::algName
char algName[30]
Definition: SpreadPRAStar.h:42
spreadPRAStar::GetPath
virtual path * GetPath(GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0)
Definition: SpreadPRAStar.cpp:25
spreadPRAStar::think
path * think()
do next processing for path, returns avaliability of path moves
Definition: SpreadPRAStar.cpp:60
spreadPRAStar::partialLimit
int partialLimit
Definition: SpreadPRAStar.h:43
spreadPRAStar::cAStar
corridorAStar cAStar
Definition: SpreadPRAStar.h:47
spreadExecSearchAlgorithm::rp
reservationProvider * rp
Definition: SpreadExecSearchAlgorithm.h:31
spreadPRAStar::endChain
std::vector< node * > endChain
Definition: SpreadPRAStar.h:46
spreadPRAStar::setTargets
void setTargets(GraphAbstraction *, node *, node *, reservationProvider *)
Definition: SpreadPRAStar.cpp:43
CorridorAStar.h
spreadPRAStar::setupSearch
void setupSearch(GraphAbstraction *aMap, std::vector< node * > &fromChain, node *from, std::vector< node * > &toChain, node *to)
Definition: SpreadPRAStar.cpp:76
spreadPRAStar::expandSearchRadius
bool expandSearchRadius
Definition: SpreadPRAStar.h:44
spreadPRAStar::spreadPRAStar
spreadPRAStar()
Definition: SpreadPRAStar.cpp:18
reservationProvider
Definition: ReservationProvider.h:33
path
A linked list of nodes which form a continuous path.
Definition: Path.h:20
spreadPRAStar::startChain
std::vector< node * > startChain
Definition: SpreadPRAStar.h:46
SpreadExecSearchAlgorithm.h
spreadPRAStar
Definition: SpreadPRAStar.h:21
node
Nodes to be stored within a Graph.
Definition: Graph.h:170