-
Notifications
You must be signed in to change notification settings - Fork 13
/
anytime_cbs.h
38 lines (33 loc) · 1.41 KB
/
anytime_cbs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef ANYTIMECBS_H
#define ANYTIMECBS_H
#include "conflict_based_search.h"
#include "astar.h"
template <typename SearchType = Astar<>>
class AnytimeCBS : public MultiagentSearchInterface
{
private:
ConflictBasedSearch<SearchType>* search;
void updateNode(const Map &map, const AgentSet &agentSet, const Config &config,
std::vector<int> &costs,
ConstraintsSet &constraints,
std::vector<std::list<Node>::iterator> &starts,
std::vector<std::list<Node>::iterator> &ends,
ConflictAvoidanceTable &CAT, ConflictSet &conflictSet,
std::vector<MDD> &mdds, std::vector<double> &lb,
std::vector<int> &LLExpansions, std::vector<int> &LLNodes,
std::list<CBSNode<SearchType>>& open,
CBSNode<SearchType>* node, double focalW,
std::chrono::steady_clock::time_point globalBegin = std::chrono::steady_clock::time_point(),
int globalTimeLimit = -1);
public:
AnytimeCBS();
AnytimeCBS(ConflictBasedSearch<SearchType>* Search);
~AnytimeCBS();
MultiagentSearchResult startSearch(const Map &map, const Config &config, AgentSet &agentSet,
std::chrono::steady_clock::time_point globalBegin = std::chrono::steady_clock::time_point(),
int globalTimeLimit = -1) override;
void setChildren(std::list<CBSNode<SearchType>>& nodeSet);
void setRemoveSubtree(CBSNode<SearchType>* root);
void clear() override;
};
#endif // ANYTIMECBS_H