pddl_planner
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
pddl_planner::PDDLPlannerInterface Class Reference

#include <PDDLPlannerInterface.hpp>

Inheritance diagram for pddl_planner::PDDLPlannerInterface:
pddl_planner::arvandherd::Planner pddl_planner::bfsf::Planner pddl_planner::cedalion::Planner pddl_planner::fast_downward::Planner pddl_planner::lama::Planner pddl_planner::randward::Planner pddl_planner::uniform::Planner

Public Member Functions

virtual ~PDDLPlannerInterface ()
 
virtual bool isAvailable () const
 
void cleanup (const std::string &dir, const std::list< std::string > &files)
 
PlanCandidates generateCandidates (const std::string &cmd, const std::string &tempDir, const std::string &resultFilename, const std::list< std::string > &patternList, double timeout, const std::string &planner="")
 
Plan readPlan (const std::string &plannerName, const std::string &filename)
 
virtual std::string getName () const
 
virtual std::string getCmd () const
 
virtual int getVersion () const
 
virtual PlanCandidates plan (const std::string &problem, const std::string &actions, const std::string &domain, double timeout)
 

Protected Member Functions

void prepare (const std::string &problem, const std::string &actionDescriptions, const std::string &domainDescriptions)
 

Protected Attributes

double mTimeout
 
std::string mTempDir
 
std::string mDomainFilename
 
std::string mProblemFilename
 
std::string mResultFilename
 
std::string msResultFileBasename
 
Plan mPlan
 

Static Protected Attributes

static const std::string msProblemFileBasename = "problem.pddl"
 
static const std::string msDomainFileBasename = "domain.pddl"
 
static const std::string msTempDirBasename = "/tmp"
 

Constructor & Destructor Documentation

virtual pddl_planner::PDDLPlannerInterface::~PDDLPlannerInterface ( )
inlinevirtual

Member Function Documentation

void pddl_planner::PDDLPlannerInterface::cleanup ( const std::string &  dir,
const std::list< std::string > &  files 
)

removes listed files and additionally completely removes the provided directory

Parameters
dirname of dir to be completely removed
filesthe list of file names to be removed
PlanCandidates pddl_planner::PDDLPlannerInterface::generateCandidates ( const std::string &  cmd,
const std::string &  tempDir,
const std::string &  resultFilename,
const std::list< std::string > &  patternList,
double  timeout,
const std::string &  planner = "" 
)

Generate the plan candidates for the given problem There is no priority in the order of candidates

Exceptions
PlanGenerationException
virtual std::string pddl_planner::PDDLPlannerInterface::getCmd ( ) const
inlinevirtual

Get name of this planner's execution script/runnable

Returns
Name of planner's main execution script/runnable
Exceptions
PlanGenerationExceptionif not implemented

Reimplemented in pddl_planner::arvandherd::Planner, pddl_planner::bfsf::Planner, pddl_planner::cedalion::Planner, pddl_planner::fast_downward::Planner, pddl_planner::lama::Planner, pddl_planner::randward::Planner, and pddl_planner::uniform::Planner.

virtual std::string pddl_planner::PDDLPlannerInterface::getName ( ) const
inlinevirtual
virtual int pddl_planner::PDDLPlannerInterface::getVersion ( ) const
inlinevirtual
bool pddl_planner::PDDLPlannerInterface::isAvailable ( ) const
virtual

Check if the given planner is available, i.e. standard implementation uses checks availability via the command returned by getCmd()

Returns
true if planner is callable, false otherwise
virtual PlanCandidates pddl_planner::PDDLPlannerInterface::plan ( const std::string &  problem,
const std::string &  actions,
const std::string &  domain,
double  timeout 
)
inlinevirtual

Planning method that forwards problem, actions and domain to the underlying planning instance

Returns
Solutions candidates
Exceptions
PlanGenerationExceptionif not implemented

Reimplemented in pddl_planner::fast_downward::Planner, pddl_planner::arvandherd::Planner, pddl_planner::bfsf::Planner, pddl_planner::cedalion::Planner, pddl_planner::lama::Planner, pddl_planner::randward::Planner, and pddl_planner::uniform::Planner.

void pddl_planner::PDDLPlannerInterface::prepare ( const std::string &  problem,
const std::string &  actionDescriptions,
const std::string &  domainDescriptions 
)
protected
Plan pddl_planner::PDDLPlannerInterface::readPlan ( const std::string &  plannerName,
const std::string &  filename 
)

Read a plani Note, that an empty plan is a valid plan

Exceptions
PlanGenerationException

Member Data Documentation

std::string pddl_planner::PDDLPlannerInterface::mDomainFilename
protected
Plan pddl_planner::PDDLPlannerInterface::mPlan
protected
std::string pddl_planner::PDDLPlannerInterface::mProblemFilename
protected
std::string pddl_planner::PDDLPlannerInterface::mResultFilename
protected
const std::string pddl_planner::PDDLPlannerInterface::msDomainFileBasename = "domain.pddl"
staticprotected
const std::string pddl_planner::PDDLPlannerInterface::msProblemFileBasename = "problem.pddl"
staticprotected
std::string pddl_planner::PDDLPlannerInterface::msResultFileBasename
protected
const std::string pddl_planner::PDDLPlannerInterface::msTempDirBasename = "/tmp"
staticprotected
std::string pddl_planner::PDDLPlannerInterface::mTempDir
protected
double pddl_planner::PDDLPlannerInterface::mTimeout
protected

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