diff --git a/inc/CBS/CBS.h b/inc/CBS/CBS.h index a0c7eca..773ca57 100644 --- a/inc/CBS/CBS.h +++ b/inc/CBS/CBS.h @@ -137,9 +137,6 @@ class CBS int num_of_agents; - - - vector<Path> paths_found_initially; // contain initial paths found // vector<MDD*> mdds_initially; // contain initial paths found vector < SingleAgentSolver* > search_engines; // used to find (single) agents' paths and mdd @@ -159,6 +156,7 @@ class CBS // print and save void printResults() const; static void printConflicts(const HLNode &curr) ; + virtual void printPaths() const; bool validateSolution() const; inline int getAgentLocation(int agent_id, size_t timestep) const; @@ -171,6 +169,8 @@ class CBS private: // CBS only, cannot be used by ECBS CBSNode* goal_node = nullptr; + vector<Path> paths_found_initially; // contain initial paths found + pairing_heap< CBSNode*, compare<CBSNode::compare_node_by_f> > cleanup_list; // it is called open list in ECBS pairing_heap< CBSNode*, compare<CBSNode::compare_node_by_inadmissible_f> > open_list; // this is used for EES pairing_heap< CBSNode*, compare<CBSNode::compare_node_by_d> > focal_list; // this is ued for both ECBS and EES @@ -185,6 +185,4 @@ class CBS bool generateRoot(); bool findPathForSingleAgent(CBSNode* node, int ag, int lower_bound = 0); void classifyConflicts(CBSNode &parent); - - void printPaths() const; }; diff --git a/inc/CBS/ECBS.h b/inc/CBS/ECBS.h index 58d624a..728d34d 100644 --- a/inc/CBS/ECBS.h +++ b/inc/CBS/ECBS.h @@ -18,6 +18,7 @@ class ECBS : public CBS ECBSNode* getGoalNode() { return goal_node; } void updatePaths(ECBSNode* curr); void clear(); + void printPaths() const; private: //ECBSNode* dummy_start = nullptr; ECBSNode* goal_node = nullptr; @@ -43,7 +44,4 @@ class ECBS : public CBS bool findPathForSingleAgent(ECBSNode* node, int ag); void classifyConflicts(ECBSNode &node); void computeConflictPriority(shared_ptr<Conflict>& con, ECBSNode& node); - - //update information - void printPaths() const; }; \ No newline at end of file