【问题标题】:PDDL forall with when condition in durative-actionPDDL forall 与持续动作中的 when 条件
【发布时间】:2020-07-20 19:52:38
【问题描述】:

这个问题建立在previous question about forall 子句之上。我想用一个'when'语句来限制forall,如下所示:

(:durative-action finish
  :parameters (?r - robot ?p - part)
  :duration ( = ?duration 1)
  :condition (and
      (at start (robot_free ?r))
      (at start (forall (?f - fastener_loc)
                    when (part_fastener ?p ?f)
                     (loc_not_fastened ?f)
                )
      )
     )
  :effect (and
      (at start(not (robot_free ?r)))
      (at end (part_free ?p))
      (at end (robot_free ?r))
     )
)

这在没有'when'语句的情况下有效。当我包含“when”语句时,我收到了几个错误:

Error: Syntax error in durative-action declaration.
Error: Unreadable structure
Error: Syntax error in domain

提前感谢您的帮助。

【问题讨论】:

    标签: forall pddl


    【解决方案1】:

    我能够让它与一个暗示语句一起工作。

    (:durative-action finish
      :parameters (?r - robot ?p - part)
      :duration ( = ?duration 1)
      :condition (and
          (at start (robot_free ?r))
          (at start (forall (?f - fastener_loc)
                        (imply (part_fastener ?p ?f)(loc_not_fastened ?f))
                    )
          )
         )
      :effect (and
          (at start(not (robot_free ?r)))
          (at end (part_free ?p))
          (at end (robot_free ?r))
         )
    )
    

    不确定这是否也适用于when 语法。

    【讨论】:

      【解决方案2】:

      when 子句需要用(括号)包裹

      【讨论】:

      • when 子句以及when 和以下子句周围尝试了括号。同样的错误...
      • 啊,对。错过了这是在condition 块中,而不是effect 块中。前者只使用imply,后者只使用when
      猜你喜欢
      • 2020-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      • 2015-07-08
      • 1970-01-01
      相关资源
      最近更新 更多