pddl_planner
Public Member Functions | Public Attributes | List of all members
pddl_planner::representation::Problem Struct Reference

#include <Problem.hpp>

Public Member Functions

 Problem (const std::string &name, const Domain &domain)
 
void addObject (const TypedItem &type, bool overwrite=false)
 
void addInitialStatus (const Expression &e)
 
void setGoal (const Expression &e)
 
void addSubGoal (const Expression &e)
 
bool undefined () const
 
void validate () const
 
std::string toLISP () const
 

Public Attributes

std::string name
 
Domain domain
 
ConstantList objects
 
ExpressionList status
 
Expression goal
 

Constructor & Destructor Documentation

◆ Problem()

pddl_planner::representation::Problem::Problem ( const std::string &  name,
const Domain domain 
)

Member Function Documentation

◆ addInitialStatus()

void pddl_planner::representation::Problem::addInitialStatus ( const Expression e)

Add an expression defining the initial status

Parameters
eExpression describing the initial status
Exceptions
std::invalid_argumentWhen validation fails for expression in the given context

◆ addObject()

void pddl_planner::representation::Problem::addObject ( const TypedItem type,
bool  overwrite = false 
)

Add additional constants – these will be added to the domain definition which is associated with this problem

◆ addSubGoal()

void pddl_planner::representation::Problem::addSubGoal ( const Expression e)

Add a sub goal expression to the existing top level one

◆ setGoal()

void pddl_planner::representation::Problem::setGoal ( const Expression e)

Set the goal expression

◆ toLISP()

std::string pddl_planner::representation::Problem::toLISP ( ) const

Generate the problem in a LISP representation

Returns
problem definition in LISP

◆ undefined()

bool pddl_planner::representation::Problem::undefined ( ) const
inline

Test if problem has been fully defined, i.e. that goals and a domain are set

Returns
true if goals and a domain are provided, false otherwise

◆ validate()

void pddl_planner::representation::Problem::validate ( ) const

Perform simple syntax check

Exceptions
std::runtime_errorif syntax has errors

Member Data Documentation

◆ domain

Domain pddl_planner::representation::Problem::domain

◆ goal

Expression pddl_planner::representation::Problem::goal

◆ name

std::string pddl_planner::representation::Problem::name

◆ objects

ConstantList pddl_planner::representation::Problem::objects

◆ status

ExpressionList pddl_planner::representation::Problem::status

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