1

我既使用持续动作,又试图能够清除某种类型的所有元素的谓词。见下文。这可能吗?如果是这样,有人知道正确的语法吗?谢谢!

    (:durative-action init
      :parameters (?r - robot)
      :duration ( = ?duration 1)
      :condition (and
             (at start (robot_uninitialized ?r))
             (at start (robot_free ?r))
                 )
      :effect (and
          (at start(not(robot_free ?r)))
          (at end (assign (robot_on_fastener_number_in_sequence) 1))
          (at end (not(robot_uninitialized ?r)))
          (at end (robot_free ?r))
          (at end (forall (?f - fastener) (not(fastener_selected ?f))))
          )
    )

我正在运行 popf 规划器,提供的错误是:Syntax error in timed effect.

4

1 回答 1

1

VAL 解析器确实显示了Syntax error in timed effect错误。我试图颠倒 and 的顺序,at endforall停止了抱怨。由于 popf 使用相同的解析器,它也应该对这种语法感到满意。

  :effect (and
      (forall (?f - fastener) 
          (at end (not (fastener_selected ?f)))
      )
  )

但在条件中,VAL 以相反的顺序接受语法:

    :condition (and
        (at end (forall (?f - fastener) 
            (fastener_selected ?f))
        )
    )

完整示例:http ://editor.planning.domains/#read_session=BCBDpV4YQE

于 2020-07-16T15:55:06.167 回答