Inter4ql
5.2
|
Implementation of ModuleAction for modules with reasoning. More...
#include <ModuleProblem.h>
Public Member Functions | |
ModuleProblem (std::string _name, std::vector< std::string > *_beliefs, std::vector< std::string > *_actions, Expression *_goal, int _max_depth, std::vector< std::string > *_heuristics) | |
constructor More... | |
~ModuleProblem () | |
destructor More... | |
std::string | get_name () const |
getter for a name of module More... | |
std::string | print () |
function that returns string with module information More... | |
module_type::type | get_module_type () const |
getter for module type More... | |
void | reason () |
performs reasoning More... | |
Result | ask_for_result (Fact *term) const |
provides valuations matching given Fact More... | |
std::vector< std::string > * | get_beliefs () |
getter for a beliefs in this Problem More... | |
std::vector< std::string > * | get_actions () |
getter for a actions in this Problem More... | |
Expression * | get_goal () |
getter for a goal in this Problem More... | |
int | get_max_depth () |
getter for a actions in this Problem More... | |
void | add_belief_module (ModuleGeneric *module) |
adds Belief's Module object to the Problem More... | |
std::vector< ModuleGeneric * > * | get_belief_modules () |
getter for a beliefs in this Problem More... | |
void | add_action_module (ModuleGeneric *module) |
adds Action's Module object to the Problem More... | |
std::vector< ModuleGeneric * > * | get_action_modules () |
getter for a actions in this Problem More... | |
void | replace_actions (std::vector< std::string > *actions) |
setter for whole action list in the Problem More... | |
bool | contains_action (std::string action_name) |
checks whether give actions is used in the Problem More... | |
![]() | |
ModuleGeneric () | |
default constructor | |
virtual | ~ModuleGeneric () |
default destructor | |
virtual Relation * | get_relation (std::string s) const |
getter for a relation More... | |
virtual std::vector< Relation * > * | get_relations () const |
getter for module relations More... | |
virtual void | reason_with_rules (std::vector< Rule *> *rules) |
performs reasing with additional Rules added More... | |
virtual Result | evaluate_expression (Expression *expr) const |
provides valuations matching given Expression More... | |
virtual Result | evaluate_expression_bf (Expression *expr) const |
provides bel-free valuations matching given Expression More... | |
virtual std::vector< std::string > | get_references (Fact *term) |
provides a list of Module references is term (useful when e.g. term is a shadowed Bel) More... | |
virtual void | set_modules (std::vector< ModuleGeneric *> *_modules) |
setter for modules needed in this module More... | |
virtual Constraints * | get_constraints () const |
getter for constraints More... | |
virtual std::vector< Domain * > * | get_domains () const |
getter for domains More... | |
virtual bool | contains_domain (Domain *d) const |
check if module contains domain More... | |
virtual bool | contains_relation (Relation *d) const |
check if module contains relation (ignoring module name) More... | |
virtual void | set_disable_constraints (bool value) const |
allows for disabling constraints check More... | |
virtual bool | check_constraints_local (bool check_rigid, bool check_flexible) const |
evaluates constraints locally, in current module More... | |
virtual database * | get_wsm_database () |
fetches a database of facts from well-supported model (for summing purposes) More... | |
virtual database * | get_add_database () |
fetches a database of facts which were added by actions to this module More... | |
virtual database * | get_remove_database () |
fetches a database of facts which were removed by actions from this module More... | |
virtual void | set_add_database (database *db) |
overrides a database of facts which were added by actions to this module More... | |
virtual void | set_remove_database (database *db) |
overrides a database of facts which were removed by actions from this module More... | |
virtual bool | constraints_violated () |
checks whether constraints are violated More... | |
Additional Inherited Members | |
![]() | |
Inter4ql::database * | database_to_add |
Inter4ql::database * | database_to_remove |
Implementation of ModuleAction for modules with reasoning.
Inter4ql::ModuleProblem::ModuleProblem | ( | std::string | _name, |
std::vector< std::string > * | _beliefs, | ||
std::vector< std::string > * | _actions, | ||
Expression * | _goal, | ||
int | _max_depth, | ||
std::vector< std::string > * | _heuristics | ||
) |
constructor
_name | name of a module |
_constraints | initial list of constraints |
_members | list of members |
Inter4ql::ModuleProblem::~ModuleProblem | ( | ) |
destructor
void Inter4ql::ModuleProblem::add_action_module | ( | ModuleGeneric * | module | ) |
adds Action's Module object to the Problem
module | object to be added |
void Inter4ql::ModuleProblem::add_belief_module | ( | ModuleGeneric * | module | ) |
adds Belief's Module object to the Problem
module | object to be added |
provides valuations matching given Fact
term | query to find in database |
Implements Inter4ql::ModuleGeneric.
bool Inter4ql::ModuleProblem::contains_action | ( | std::string | action_name | ) |
checks whether give actions is used in the Problem
std::vector< ModuleGeneric * > * Inter4ql::ModuleProblem::get_action_modules | ( | ) |
getter for a actions in this Problem
std::vector< std::string > * Inter4ql::ModuleProblem::get_actions | ( | ) |
getter for a actions in this Problem
std::vector< ModuleGeneric * > * Inter4ql::ModuleProblem::get_belief_modules | ( | ) |
getter for a beliefs in this Problem
std::vector< std::string > * Inter4ql::ModuleProblem::get_beliefs | ( | ) |
getter for a beliefs in this Problem
Expression * Inter4ql::ModuleProblem::get_goal | ( | ) |
getter for a goal in this Problem
int Inter4ql::ModuleProblem::get_max_depth | ( | ) |
getter for a actions in this Problem
|
virtual |
|
virtual |
|
virtual |
function that returns string with module information
Reimplemented from Inter4ql::ModuleGeneric.
|
virtual |
performs reasoning
Implements Inter4ql::ModuleGeneric.
void Inter4ql::ModuleProblem::replace_actions | ( | std::vector< std::string > * | actions | ) |
setter for whole action list in the Problem
actions | a new list of actions (list of strings) |