我目前正在从事一个 pddl 项目,但我在语法上遇到了一些困难。现在,我正试图用 forall 将一个楼层的所有工人填满电梯。我不确定这是否是正确的实现,但这是我的代码。先感谢您!
(define (domain company)
(:requirements
:strips
:negative-preconditions
:equality
)
(:predicates
(worker ?x)
(floor ?x)
(elevator ?x)
(controller ?x)
(goes ?x )
(at ?x ?y)
(in ?x ?y)
(free ?x)
(call ?x ?y)
)
****
(:action insert_elevator
:parameters (?w ?el ?f)
:precondition (and (worker ?w) (floor ?f) (elevator ?el) (at ?w ?f) (at ?el ?f) (free ?el))
:effect (and(not (free ?el))(forall (?w)(in ?w ?el)))
)
****
)
(define (problem pb)
(:domain company)
(:objects floorg floor1 floor2
elevator1
elevator2
worker1 worker2
controller1)
(:init
(floor floorg)
(floor floor1)
(floor floor2)
(worker worker1)
(worker worker2)
(elevator elevator1)
(elevator elevator2)
(controller controller1)
(at elevator1 floor1)
(at elevator2 floor2)
(at worker1 floorg)
(at worker2 floorg)
(free elevator1)
(free elevator2)
)
(:goal
(and(at worker1 floor1)
(at worker2 floor2))
)
)