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

◆ ~PDDLPlannerInterface()

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

Member Function Documentation

◆ cleanup()

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

◆ generateCandidates()

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

◆ getCmd()

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.

◆ getName()

virtual std::string pddl_planner::PDDLPlannerInterface::getName ( ) const
inlinevirtual

◆ getVersion()

virtual int pddl_planner::PDDLPlannerInterface::getVersion ( ) const
inlinevirtual

◆ isAvailable()

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

◆ plan()

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.

◆ prepare()

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

◆ readPlan()

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

◆ mDomainFilename

std::string pddl_planner::PDDLPlannerInterface::mDomainFilename
protected

◆ mPlan

Plan pddl_planner::PDDLPlannerInterface::mPlan
protected

◆ mProblemFilename

std::string pddl_planner::PDDLPlannerInterface::mProblemFilename
protected

◆ mResultFilename

std::string pddl_planner::PDDLPlannerInterface::mResultFilename
protected

◆ msDomainFileBasename

const std::string pddl_planner::PDDLPlannerInterface::msDomainFileBasename = "domain.pddl"
staticprotected

◆ msProblemFileBasename

const std::string pddl_planner::PDDLPlannerInterface::msProblemFileBasename = "problem.pddl"
staticprotected

◆ msResultFileBasename

std::string pddl_planner::PDDLPlannerInterface::msResultFileBasename
protected

◆ msTempDirBasename

const std::string pddl_planner::PDDLPlannerInterface::msTempDirBasename = "/tmp"
staticprotected

◆ mTempDir

std::string pddl_planner::PDDLPlannerInterface::mTempDir
protected

◆ mTimeout

double pddl_planner::PDDLPlannerInterface::mTimeout
protected

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