pddl_planner
Public Member Functions | Public Attributes | List of all members
pddl_planner::Planning Class Reference

Planning provides the main infrastructure to perform planning with different planner implementations. More...

#include <Planning.hpp>

Public Member Functions

 Planning ()
 Default constructor for planning It will instanciate all associated planners at construction time. More...
 
 ~Planning ()
 
PlannerMap getPlanners () const
 
std::set< std::string > getAvailablePlanners () const
 
void registerPlanner (PDDLPlannerInterface *planner)
 
PlannerList getRegisteredPlanners () const
 
bool isRegistered (const std::string &name) const
 
PDDLPlannerInterfacegetPlanner (const std::string &name) const
 
void setActionDescription (const std::string &action, const std::string &description)
 
void setDomainDescription (const std::string &domain, const std::string &description)
 
std::string getDomainDescriptions () const
 
std::string getActionDescriptions () const
 
PlanResultList plan (const std::string &problem, const std::set< std::string > &planners, bool sequential=false, double timeout=TIMEOUT)
 
PlanCandidates plan (const std::string &problem, const std::string &plannerName="LAMA", double timeout=TIMEOUT)
 
PlanResultList plan (const representation::Problem &problem, const std::set< std::string > &planners, bool sequential=false, double timeout=TIMEOUT)
 
PlanResultList plan (const representation::Domain &domain, const representation::Problem &problem, const std::set< std::string > &planners, bool sequential=false, double timeout=TIMEOUT)
 
PlanCandidates plan (const representation::Problem &problem, const std::string &plannerName="LAMA", double timeout=TIMEOUT)
 
PlanCandidates plan (const representation::Domain &domain, const representation::Problem &problem, const std::string &plannerName="LAMA", double timeout=TIMEOUT)
 

Public Attributes

PlanResultList mPlanResultList
 
boost::mutex mResultMutex
 
boost::mutex mPlannerMutex
 

Detailed Description

Planning provides the main infrastructure to perform planning with different planner implementations.

Constructor & Destructor Documentation

pddl_planner::Planning::Planning ( )

Default constructor for planning It will instanciate all associated planners at construction time.

pddl_planner::Planning::~Planning ( )

Deconstructor deleting all internal instances of associated planners

Member Function Documentation

std::string pddl_planner::Planning::getActionDescriptions ( ) const

Retrieve the action description for all available actions

Returns
Action descriptions
std::set< std::string > pddl_planner::Planning::getAvailablePlanners ( ) const

Retrieves available planners

Returns
list of available planners names
std::string pddl_planner::Planning::getDomainDescriptions ( ) const

Generate the domain description for all available domain

Returns
Domain descriptions
PDDLPlannerInterface * pddl_planner::Planning::getPlanner ( const std::string &  name) const

Retrieve planner by name

Exceptions
std::runtime_errorif planner interface does not exist
PlannerMap pddl_planner::Planning::getPlanners ( ) const
inline

Retrieve the map of all registered planners

Returns
map of registered planners
PlannerList pddl_planner::Planning::getRegisteredPlanners ( ) const

Retrieve all registered planners

Returns
list of registered planners
bool pddl_planner::Planning::isRegistered ( const std::string &  name) const
inline

Check if there is a planner of the given name

PlanResultList pddl_planner::Planning::plan ( const std::string &  problem,
const std::set< std::string > &  planners,
bool  sequential = false,
double  timeout = TIMEOUT 
)

Plan towards a given goal

Returns
List of solutions, i.e. plans
Exceptions
PlanGenerationExceptionon failure
PlanCandidates pddl_planner::Planning::plan ( const std::string &  problem,
const std::string &  plannerName = "LAMA",
double  timeout = TIMEOUT 
)

Plan towards a given goal

Returns
List of solutions, i.e. plans
Exceptions
PlanGenerationExceptionon failure
PlanResultList pddl_planner::Planning::plan ( const representation::Problem problem,
const std::set< std::string > &  planners,
bool  sequential = false,
double  timeout = TIMEOUT 
)

Generate a plan for a given problem – the problem definition here already contains the domain description

Parameters
domainPlanning domain to be used
problemPlanning problem
plannersList of planners that will be used for planning
sequentialSet to true if planners should be called one after another, false will execute all planners in parallel
timeoutTimeout in seconds – will apply to each planner call individually when using with sequential
Exceptions
PlanGenerationExceptionon failure
PlanResultList pddl_planner::Planning::plan ( const representation::Domain domain,
const representation::Problem problem,
const std::set< std::string > &  planners,
bool  sequential = false,
double  timeout = TIMEOUT 
)

Generate a plan for a given domain and problem – the domain associated with the problem will be overriden

Parameters
domainPlanning domain to be used
problemPlanning problem
plannersList of planners that will be used for planning
sequentialSet to true if planners should be called one after another, false will execute all planners in parallel
timeoutTimeout in seconds – will apply to each planner call individually when using with sequential
Exceptions
PlanGenerationExceptionon failure
PlanCandidates pddl_planner::Planning::plan ( const representation::Problem problem,
const std::string &  plannerName = "LAMA",
double  timeout = TIMEOUT 
)

Generate a plan for a given problem – the problem definition here already contains the domain description

Exceptions
PlanGenerationExceptionon failure
PlanCandidates pddl_planner::Planning::plan ( const representation::Domain domain,
const representation::Problem problem,
const std::string &  plannerName = "LAMA",
double  timeout = TIMEOUT 
)

Generate a plan for a given domain and problem – the domain associated with the problem will be overriden

void pddl_planner::Planning::registerPlanner ( PDDLPlannerInterface planner)

Register an implementation of a pddl planner

void pddl_planner::Planning::setActionDescription ( const std::string &  action,
const std::string &  description 
)

Set the description for a specific action

void pddl_planner::Planning::setDomainDescription ( const std::string &  domain,
const std::string &  description 
)

Set the description for a specific domain

Member Data Documentation

boost::mutex pddl_planner::Planning::mPlannerMutex
PlanResultList pddl_planner::Planning::mPlanResultList
boost::mutex pddl_planner::Planning::mResultMutex

The documentation for this class was generated from the following files: