dollabs / pamela

Probabalistic Advanced Modeling and Execution Learning Architecture
Apache License 2.0
233 stars 13 forks source link

Missing constraints in activities #108

Closed pmdoll closed 7 years ago

pmdoll commented 7 years ago

Commit ff326131edcb79004386c6459308c7d303f9141e has relevant artifacts.

I expect tpn file as in this commit. @dcerys Please verify and update htn file. @tmarble Please verify both htn and tpn files.

dcerys commented 7 years ago

Bounds constraints can successfully be specified at the call to a primitive method. (This allows us to downgrade the priority from Critical). However, bounds constraints are ignored in some other cases (yet to be characterized)

dcerys commented 7 years ago

There are (at least) two cases where the :bounds constraint is ignored (i.e., not reflected in the TPN):

  1. The :bounds metadata declaration in a primitive method. This has already been identified as an issue in #98.
  2. A :bounds argument to a call to a non-primitive method.

Here is a simple test case:

(defpclass main []
  :methods [(defpmethod main1 []
              (sequence :bounds [2 20]
               (submethod :bounds [1 10]) ;;This :bounds is ignored
               (submethod)
               (submethod)))

            (defpmethod submethod []
              ;;This :bounds is used, but is commented to verify that [1 10] is ignored
              (sequence ;:bounds [1 9]
               (primitive-method :bounds [1 2])
               (primitive-method)
               (primitive-method-b :bounds [1 3])
               (primitive-method-b)))

            (defpmethod primitive-method [])

            (defpmethod primitive-method-b {:bounds [1 1]} []) ;;This :bounds is ignored

            ])