I’m now creating the domain file and the problem file for an assembly planning problem using pddl. Now I find out that the solver popf doesn’t accept a subtype being taken as its supertype in an action’s parameter. But with solver optic it works. Does anyone know the reason? is it just the fearture of the solver?
for example, a simple domain file and a simple problem file:
(define (domain test1_domain)
(:requirements :strips :typing :fluents :durative-actions)
(:types
veg fruit - object
apple - fruit
tomato - veg
)
(:predicates
(isapple ?a - apple)
(isfruit ?f - fruit)
(testpredicate)
)
(:durative-action check
:parameters (?e - fruit)
:duration (= ?duration 1)
:condition (and
(at start (isfruit ?e))
)
:effect (and
(at end (testpredicate))
)
)
)
(define (problem test1_problem)
(:domain test1_domain)
(:objects
apple1 - apple
)
(:init
(isapple apple1 )
(isfruit apple1 )
)
(:goal (and
(testpredicate)
)
)
)
run this in ros2 popf
ros2 run popf popf domain.pddl problem.pddl
with popf in ros2 (also in planutils) is the problem deemed unsolvable. But with optic it works. Further more, if I change the parameter ?e - fruit
of action check
into ?e - apple
then popf can also solve the problem.
In theory the subtype should be able to be taken as its supertype in an action’s parameter as long as it won’t be applied to any predicate that asks for the subtype. Am I right?