forallpddl

PDDL forall effect with durative actions


I am both using durative actions and trying to be able to clear a predicate over all elements of a certain type. See below. Is this possible? If so, does anyone know the correct syntax? Thanks!

    (: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))))
          )
    )

I am running the popf planner and the error provided is: Syntax error in timed effect.


Solution

  • The VAL parser indeed shows the Syntax error in timed effect error. I tried to invert the order of at end and forall and it stopped complaining. As popf is using the same parser, it should be happy with that syntax too.

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

    But in the condition, VAL accepts the syntax in the opposite order:

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

    Full example: http://editor.planning.domains/#read_session=BCBDpV4YQE