22 #ifndef PLUGINS_STN_H_
23 #define PLUGINS_STN_H_
25 #include "domain_action.h"
26 #include "stn_action.h"
28 #include <aspect/logging.h>
29 #include <graphviz/gvc.h>
30 #include <pddl_parser/pddl_ast.h>
33 #include <bsoncxx/document/value.hpp>
35 #include <mongocxx/client.hpp>
49 void add_plan_action(
const std::string &name,
const std::string ¶ms);
55 std::vector<bsoncxx::document::value>
get_bson();
65 bool gen_classic_dom_ =
false;
66 std::string classic_dom_path_;
69 std::vector<DomainAction> domain_actions_;
70 std::vector<plan_action> plan_actions_;
71 std::vector<StnAction> stn_actions_;
73 std::vector<std::pair<StnAction, StnAction>> cond_edges_;
74 std::vector<std::pair<StnAction, StnAction>> temp_edges_;
76 enum LogLevel { WARN, INFO, DEBUG };
77 void log_warn(
const std::string &s);
78 void log_info(
const std::string &s);
79 void log_debug(
const std::string &s);
80 void log(
const std::string &s, Stn::LogLevel log_leve);
85 void generate_classic_pddl_domain(
pddl_parser::Domain *dom,
const std::string &classic_dom_path);
A representation of an action used by the STN generator.
An action representation within an STN.
A Simple Temporal Network.
Stn(fawkes::Logger *logger)
Constructor.
void add_plan_action(const std::string &name, const std::string ¶ms)
Add a (grounded action).
virtual ~Stn()
Destructor.
void set_pddl_domain(const std::string &pddl_domain_string)
Set the domain of the STN to the given PDDL domain.
std::vector< bsoncxx::document::value > get_bson()
Get a BSON representation of the STN.
void read_initial_state(const std::string &pddl_problem_string)
Read the initial state from the given PDDL problem.
void generate()
Regenerate the STN.
void set_initial_state(const StnAction &action)
Set the initial state.
void drawGraph()
Render a graph representation of the STN.
Fawkes library namespace.
A structured representation of a PDDL domain.