Fawkes API
Fawkes Development Version
|
22 #ifndef PLUGINS_STN_ACTION_H_
23 #define PLUGINS_STN_ACTION_H_
25 #include "predicate.h"
38 enum EdgeType { CONDITIONAL, TEMPORAL };
44 const std::vector<Predicate> & preconds,
45 const std::vector<Predicate> &
effects,
46 const std::string &
opts,
48 const std::vector<std::string> &cond_breakups = {},
49 const std::vector<std::string> &temp_breakups = {});
63 const std::vector<Predicate> &
effects()
const;
64 std::string
name()
const;
66 std::string
opts()
const;
69 friend std::ostream &
operator<<(std::ostream &,
const StnAction &);
72 std::vector<Predicate> preconds_;
73 std::vector<Predicate> effects_;
76 std::vector<std::string> cond_breakups_;
77 std::vector<std::string> temp_breakups_;
78 std::map<size_t, std::pair<std::string, std::vector<Predicate>>> cond_actions_;
std::string genTemporalEdgeLabel() const
Generate a temporal edge for the graph representation.
std::string opts() const
Get the action parameters.
size_t duration() const
Get the duration of the StnAction.
bool operator!=(const StnAction &o)
Compare two StnActions.
bool operator==(const StnAction &o)
Compare two StnActions.
StnAction(const std::string &name, const std::vector< Predicate > &preconds, const std::vector< Predicate > &effects, const std::string &opts, size_t duration=0, const std::vector< std::string > &cond_breakups={}, const std::vector< std::string > &temp_breakups={})
Constructor.
bool checkForBreakup(EdgeType t, const Predicate &p) const
Check if the given predicate is a breakup.
void genConditionalActions(std::vector< StnAction > candidate_actions)
Generate the conditional actions of this StnAction.
std::vector< size_t > condActionIds() const
Get all IDs of this StnAction's conditional actions.
friend std::ostream & operator<<(std::ostream &, const StnAction &)
Print relevant information about the StnAction.
std::string genConditionEdgeLabel(size_t cond_action) const
Generate an edge label for the graph representation.
std::string genGraphNodeName() const
Get a string representation of the StnAction for the graph representation.
const std::vector< Predicate > & effects() const
Get the effects of the StnAction.
std::string name() const
Get the name of the StnAction.
size_t id() const
Get the ID of the action.