Fawkes API Fawkes Development Version
|
A Simple Temporal Network. More...
#include "stn.h"
Public Member Functions | |
Stn (fawkes::Logger *logger) | |
Constructor. More... | |
Stn (fawkes::Logger *logger, const std::string &classic_dom_path) | |
Constructor. More... | |
virtual | ~Stn () |
Destructor. More... | |
void | add_plan_action (const std::string &name, const std::string ¶ms) |
Add a (grounded action). More... | |
void | set_initial_state (const StnAction &action) |
Set the initial state. More... | |
void | read_initial_state (const std::string &pddl_problem_string) |
Read the initial state from the given PDDL problem. More... | |
void | set_pddl_domain (const std::string &pddl_domain_string) |
Set the domain of the STN to the given PDDL domain. More... | |
void | generate () |
Regenerate the STN. More... | |
void | drawGraph () |
Render a graph representation of the STN. More... | |
std::vector< bsoncxx::document::value > | get_bson () |
Get a BSON representation of the STN. More... | |
fawkes::stn::Stn::Stn | ( | fawkes::Logger * | logger | ) |
fawkes::stn::Stn::Stn | ( | fawkes::Logger * | logger, |
const std::string & | classic_dom_path | ||
) |
void fawkes::stn::Stn::add_plan_action | ( | const std::string & | name, |
const std::string & | params | ||
) |
Add a (grounded action).
name | The name of the action/operator. |
params | The parameters of the action. |
Definition at line 74 of file stn.cpp.
Referenced by StnGeneratorThread::loop().
void fawkes::stn::Stn::drawGraph | ( | ) |
Render a graph representation of the STN.
This writes the graph representation to the file stn.png.
Definition at line 306 of file stn.cpp.
Referenced by StnGeneratorThread::loop().
void fawkes::stn::Stn::generate | ( | ) |
Regenerate the STN.
Definition at line 212 of file stn.cpp.
References fawkes::stn::DomainAction::generateStnAction().
Referenced by StnGeneratorThread::loop().
std::vector< bsoncxx::document::value > fawkes::stn::Stn::get_bson | ( | ) |
Get a BSON representation of the STN.
Definition at line 364 of file stn.cpp.
Referenced by StnGeneratorThread::loop().
void fawkes::stn::Stn::read_initial_state | ( | const std::string & | pddl_problem_string | ) |
Read the initial state from the given PDDL problem.
pddl_problem_string | the PDDL rpboelm as (unparsed) string. |
Definition at line 94 of file stn.cpp.
References pddl_parser::Expression::expression, pddl_parser::Problem::init, pddl_parser::Problem::name, pddl_parser::PddlParser::parseProblem(), and set_initial_state().
Referenced by StnGeneratorThread::loop().
void fawkes::stn::Stn::set_initial_state | ( | const StnAction & | action | ) |
Set the initial state.
The resulting initial state is the state after applying the effects of the given action.
action | The action whose effects define the initial state. |
Definition at line 85 of file stn.cpp.
Referenced by read_initial_state().
void fawkes::stn::Stn::set_pddl_domain | ( | const std::string & | pddl_domain_string | ) |
Set the domain of the STN to the given PDDL domain.
This parses the given domain and processes all actions in the domain. It also adds all temporal and conditional breakups defined in the domain to the STN.
pddl_domain_string | the PDDL domain as (unparsed) string. |
Definition at line 130 of file stn.cpp.
References pddl_parser::Domain::actions, and pddl_parser::PddlParser::parseDomain().
Referenced by StnGeneratorThread::init().