Go to the documentation of this file.00001 #ifndef actasp_FilteringReasoner_h__guard
00002 #define actasp_FilteringReasoner_h__guard
00003
00004 #include <actasp/FilteringKR.h>
00005 #include <actasp/reasoners/Reasoner.h>
00006
00007 namespace actasp {
00008
00009 class FilteringQueryGenerator;
00010
00011 struct FilteringReasoner : public FilteringKR, public Reasoner {
00012
00013 FilteringReasoner(FilteringQueryGenerator *actualReasoner,unsigned int max_n,const ActionSet& allActions);
00014
00015
00016 AnswerSet computePlan(const std::vector<actasp::AspRule>& goal) const throw (std::logic_error) {
00017 return this->Reasoner::computePlan(goal);
00018 }
00019
00020 std::vector< AnswerSet > computeAllPlans(const std::vector<actasp::AspRule>& goal, double suboptimality) const throw (std::logic_error) {
00021 return this->Reasoner::computeAllPlans(goal,suboptimality);
00022 }
00023
00024 ActionSet availableActions() const throw() {
00025 return this->Reasoner::availableActions();
00026 }
00027
00028 AnswerSet currentStateQuery(const std::vector<actasp::AspRule>& query) const throw() {
00029 return this->Reasoner::currentStateQuery(query);
00030 }
00031
00032 bool updateFluents(const std::vector<actasp::AspFluent> &observations) throw() {
00033 return this->Reasoner::updateFluents(observations);
00034 }
00035
00036 bool isPlanValid(const AnswerSet& plan, const std::vector<actasp::AspRule>& goal) const throw() {
00037 return this->Reasoner::isPlanValid(plan,goal);
00038 }
00039
00040 void resetCurrentState() throw() {
00041 this->Reasoner::resetCurrentState();
00042 }
00043
00044 std::list< std::list<AspAtom> > query(const std::string &queryString, unsigned int timestep) const throw() {
00045 return this->Reasoner::query(queryString,timestep);
00046 }
00047
00048 GraphPolicy* computePolicy(const std::vector<actasp::AspRule>& goal, double suboptimality) const throw (std::logic_error);
00049
00050 AnswerSet filterState(const std::vector<actasp::AnswerSet>& plans, const std::vector<actasp::AspRule>& goals);
00051
00052 private:
00053 FilteringQueryGenerator *clingo;
00054 };
00055
00056
00057
00058 }
00059
00060
00061 #endif