Changes have been pushed for the repository "fawkesrobotics/fawkes".

Clone:  https://github.com/fawkesrobotics/fawkes.git
Gitweb: https://github.com/fawkesrobotics/fawkes

The branch, dhabering/cx-unsatisfied-precondition-print has been created
        at  9300325a4eea62740fdd578d7160d3ba6ff51cca (commit)

https://github.com/fawkesrobotics/fawkes/tree/dhabering/cx-unsatisfied-precondition-print

- *Log* ---------------------------------------------------------------
commit 9300325a4eea62740fdd578d7160d3ba6ff51cca
Author:     Daniel Habering <daniel.haber...@rwth-aachen.de>
AuthorDate: Tue Jul 2 19:06:57 2019 +1000
Commit:     Daniel Habering <daniel.haber...@rwth-aachen.de>
CommitDate: Tue Jul 2 19:06:57 2019 +1000

    cx: printout warning on unsatisfied atomice preondition

https://github.com/fawkesrobotics/fawkes/commit/9300325a4

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------


- *Diffs* -------------------------------------------------------------

- *commit* 9300325a4eea62740fdd578d7160d3ba6ff51cca - - - - - - - - - -
Author:  Daniel Habering <daniel.haber...@rwth-aachen.de>
Date:    Tue Jul 2 19:06:57 2019 +1000
Subject: cx: printout warning on unsatisfied atomice preondition

 src/plugins/clips-executive/clips/domain.clp | 48 ++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/domain.clp 
b/src/plugins/clips-executive/clips/domain.clp
index 7acfa8c69..8317b2805 100644
--- a/src/plugins/clips-executive/clips/domain.clp
+++ b/src/plugins/clips-executive/clips/domain.clp
@@ -546,6 +546,54 @@
   (modify ?precond (is-satisfied TRUE))
 )
 
+(defrule domain-unsatisfied-positive-precondition-printout
+  (declare (salience -1000))
+  (plan-action (id ?id) (action-name ?an) 
+          (state PENDING)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id))
+  (domain-atomic-precondition (grounded TRUE)
+          (grounded-with ?id)
+          (operator ?an)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id)
+          (part-of ?parent)
+          (is-satisfied FALSE)
+          (predicate ?pred)
+          (param-values $?params))
+  (not (domain-precondition (name ?parent) (grounded TRUE)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id)
+          (operator ?an)
+          (type negation)))
+  =>
+  (printout warn "Precondition " ?pred ?params " of " ?an " is unsatisfied" 
crlf)
+)
+
+(defrule domain-unsatisfied-negative-precondition-printout
+  (declare (salience -1000))
+  (plan-action (id ?id) (action-name ?an) 
+          (state PENDING)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id))
+  (domain-atomic-precondition (grounded TRUE)
+          (grounded-with ?id)
+          (operator ?an)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id)
+          (part-of ?parent)
+          (is-satisfied FALSE)
+          (predicate ?pred)
+          (param-values $?params))
+  (domain-precondition (name ?parent) (grounded TRUE)
+          (goal-id ?goal-id)
+          (plan-id ?plan-id)
+          (operator ?an)
+          (type negation))
+  =>
+  (printout warn "Precondition (not " ?pred ?params ") of " ?an " is 
unsatisfied" crlf)
+)
+
 (defrule domain-retract-negative-precondition-if-child-is-satisfied
   "If a negative precondition's child is satisfied, the precondition is not
    satisfied anymore."



_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to