Skip to content

Commit

Permalink
updates for Clingo 4.5.4 in Xenial (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-oquin committed Dec 15, 2017
1 parent f0254f5 commit 42bbd42
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bwi_kr_execution/actasp/src/reasoners/Clingo4_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static actasp::AnswerSet readOptimalAnswerSet(const std::string& filePath, const

string Clingo4_2::generatePlanQuery(std::vector<actasp::AspRule> goalRules) const throw() {
stringstream goal;
goal << "#program volatile(" << incrementalVar << ")." << endl;
goal << "#program check(" << incrementalVar << ")." << endl;
goal << "#external query(" << incrementalVar << ")." << endl;
//I don't like this -1 too much, but it makes up for the incremental variable starting at 1

Expand Down Expand Up @@ -484,7 +484,7 @@ std::list<actasp::AnswerSet> Clingo4_2::genericQuery(const std::vector<actasp::A

string cumulative_part = cumulativeString(cumulative,incrementalVar);

thequery << endl << "#program cumulative(" << incrementalVar << ")." << endl;
thequery << endl << "#program step(" << incrementalVar << ")." << endl;
thequery << cumulative_part << endl;

return genericQuery(thequery.str(),timeStep,timeStep,fileName,answerSetsNumber,true);
Expand All @@ -497,7 +497,7 @@ std::string Clingo4_2::generateMonitorQuery(const std::vector<actasp::AspRule>&

stringstream monitorQuery(planQuery, ios_base::app | ios_base::out);

monitorQuery << "#program cumulative(" << incrementalVar << ")." << endl;
monitorQuery << "#program step(" << incrementalVar << ")." << endl;


const AnswerSet::FluentSet &actionSet = plan.getFluents();
Expand Down
2 changes: 1 addition & 1 deletion bwi_kr_execution/domain/all_actions.asp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#program cumulative(n).
#program step(n).

1{
approach(D1,I) : door(D1);
Expand Down
2 changes: 1 addition & 1 deletion bwi_kr_execution/domain/elevators.asp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#program cumulative(n).
#program step(n).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
4 changes: 2 additions & 2 deletions bwi_kr_execution/domain/hri.asp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#program cumulative(n).
#program step(n).

%action searchroom(P,R,I) ask if person P is in room R
inroom(P,R,I) :- searchroom(P,R,I), person(P), room(R), I>0, I=n-1.
Expand All @@ -22,7 +22,7 @@ inroom(P,R,I) :- searchroom(P,R,I), person(P), room(R), I>0, I=n-1.
%:- searchroom(P,R,I), not findPersonTask(n), person(P), room(R), I>0, I=n-1.
%:- askperson(P1,P2,I), not findPersonTask(n), person(P1), person(P2), I>0, I=n-1.

#program cumulative(n).
#program step(n).

%inroom is inertial
inroom(P,R,I) :- inroom(P,R,I-1), not -inroom(P,R,I), I>0, I=n-1.
Expand Down
4 changes: 2 additions & 2 deletions bwi_kr_execution/domain/navigation.asp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <iclingo>.
#program cumulative(n).
#include <incmode>.
#program step(n).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
Expand Down

0 comments on commit 42bbd42

Please sign in to comment.