8 #include <unordered_map>
46 explicit MPProblem(
const std::string& _filename);
106 const std::vector<std::unique_ptr<
Robot>>&
GetRobots() const noexcept;
202 virtual
void Print(std::ostream& _os) const;
218 std::
string GetPath(const std::
string& _filename = "");
222 void SetPath(const std::
string& _filename);
Definition: Decomposition.h:9
Definition: DynamicObstacle.h:22
Definition: Environment.h:137
Definition: GroupTask.h:44
Definition: MPProblem.h:34
Environment * GetEnvironment()
Get the environment object.
Definition: MPProblem.cpp:198
std::unordered_map< std::string, MPTask * > m_taskLabelMap
Map task labels to tasks.
Definition: MPProblem.h:276
void ProcessXML(XMLNode mpNode, XMLNode input)
Definition: MPProblem.cpp:123
MPTask * GetTask(std::string _label)
Definition: MPProblem.cpp:318
void AddDecomposition(Robot *_coordinator, std::unique_ptr< Decomposition > &&_decomp)
Definition: MPProblem.cpp:388
size_t NumRobotGroups() const noexcept
Definition: MPProblem.cpp:266
std::vector< std::unique_ptr< InteractionInformation > > m_interactionInformations
All handoff templates for a problem.
Definition: MPProblem.h:267
void ParseChild(XMLNode &_node)
Definition: MPProblem.cpp:481
void MakePointRobot()
Create a pseudo-point robot.
Definition: MPProblem.cpp:528
std::unique_ptr< Robot > m_pointRobot
A pseudo point-robot.
Definition: MPProblem.h:256
void SetPath(const std::string &_filename)
Definition: MPProblem.cpp:465
std::vector< std::unique_ptr< InteractionInformation > > & GetInteractionInformations()
Definition: MPProblem.cpp:473
MPProblem & operator=(MPProblem &&_other)=delete
std::unordered_map< std::string, std::vector< Robot * > > m_robotCapabilityMap
Map of robot type to set of robots.
Definition: MPProblem.h:259
const std::string & GetBaseFilename() const
Get the base filename for output files.
Definition: MPProblem.cpp:441
std::vector< std::unique_ptr< RobotGroup > > m_robotGroups
Robot groups.
Definition: MPProblem.h:255
MPProblem & operator=(const MPProblem &_other)
Copy.
Definition: MPProblem.cpp:57
MPProblem(MPProblem &&_other)=delete
void AddTask(std::unique_ptr< MPTask > &&_task)
Definition: MPProblem.cpp:356
std::string GetPath(const std::string &_filename="")
Definition: MPProblem.cpp:455
std::vector< std::shared_ptr< MPTask > > GetTasks(Robot *const _robot) const noexcept
Definition: MPProblem.cpp:324
virtual void Print(std::ostream &_os) const
Definition: MPProblem.cpp:430
Cfg GetInitialCfg(Robot *_r)
Definition: MPProblem.cpp:302
std::vector< std::unique_ptr< Robot > > m_robots
The robots in our problem.
Definition: MPProblem.h:254
const std::vector< DynamicObstacle > & GetDynamicObstacles() const noexcept
Get all of the dynamic obstacles in this problem.
Definition: MPProblem.cpp:408
std::unique_ptr< Environment > m_environment
The planning environment.
Definition: MPProblem.h:252
void ReassignTask(MPTask *const _task, Robot *const _newOwner)
Definition: MPProblem.cpp:364
std::unordered_map< Robot *, std::vector< std::unique_ptr< Decomposition > > > m_taskDecompositions
Map robots to task decompositions.
Definition: MPProblem.h:278
std::unordered_map< Robot *, std::list< std::shared_ptr< MPTask > > > m_taskMap
Map the tasks assigned to each robot.
Definition: MPProblem.h:270
std::string m_xmlFilename
The XML file name.
Definition: MPProblem.h:284
void ReadXMLFile(const std::string &_filename)
Definition: MPProblem.cpp:181
std::string m_filePath
The relative path for the problem XML.
Definition: MPProblem.h:286
Robot * GetRobot(const size_t _index) const noexcept
Definition: MPProblem.cpp:228
std::unordered_map< Robot *, Cfg > m_initialCfgs
Map of robot initial locations.
Definition: MPProblem.h:261
const std::vector< std::unique_ptr< RobotGroup > > & GetRobotGroups() const noexcept
Definition: MPProblem.cpp:296
void SetEnvironment(std::unique_ptr< Environment > &&_e)
Definition: MPProblem.cpp:205
MPProblem()
Instantiate an empty MPProblem.
const std::unordered_map< Robot *, std::vector< std::unique_ptr< Decomposition > > > & GetDecompositions()
Get map of robots to decompositions.
Definition: MPProblem.cpp:400
std::unordered_map< RobotGroup *, std::list< std::shared_ptr< GroupTask > > > m_groupTaskMap
Map the group tasks assigned to each robot group.
Definition: MPProblem.h:273
const std::vector< std::unique_ptr< Robot > > & GetRobots() const noexcept
Get all robots in this problem.
Definition: MPProblem.cpp:254
void AddDynamicObstacle(DynamicObstacle &&_obstacle)
Definition: MPProblem.cpp:415
const std::vector< Robot * > GetRobotsOfType(std::string _type) const noexcept
Definition: MPProblem.cpp:260
size_t NumRobots() const noexcept
Get the number of robots in our problem.
Definition: MPProblem.cpp:221
const std::string & GetXMLFilename() const
Get the XML filename from which this object was parsed.
Definition: MPProblem.cpp:116
std::vector< DynamicObstacle > m_dynamicObstacles
The dynamic obstacles in our problem.
Definition: MPProblem.h:264
RobotGroup * GetRobotGroup(const size_t _index) const noexcept
Definition: MPProblem.cpp:273
void SetBaseFilename(const std::string &_s)
Definition: MPProblem.cpp:448
std::string m_baseFilename
The base name for output files.
Definition: MPProblem.h:285
void ClearDynamicObstacles()
Remove all of the dynamic obstacles in this problem.
Definition: MPProblem.cpp:422
void SetInitialCfg(Robot *_r, Cfg _cfg)
Definition: MPProblem.cpp:308
Definition: MultiBody.h:65
A group of one or more robots.
Definition: RobotGroup.h:17