这个问题建立在前面关于 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
提前感谢您的帮助。