0

I am trying to model a warehouse domain in PDDL and I am facing some difficulties in defining the problem file. The domain consists of trucks that can move between several locations, with packages and crates located in each location. A truck can perform the following actions:

Drive: A truck can drive to any location as long as it is secured. A truck is secured if it is either empty or carrying a crate inside it. Lift: The truck has one crane that can lift either one package or one crate. The truck and the item being lifted must be at the same location. The truck must be secured before it can lift anything. The truck stops being secured when lifting an item. FillCrate: The truck can put a package inside a crate as long as the truck, the crate, and the package are at the same location, and the package is currently lifted by the truck. The truck becomes secured as well. DropCrate: The truck can drop a crate at a location as long as the crate is secured into the truck, and the truck is at that location. Secure: A truck can secure a crate into itself if it is currently lifting it. Then, the crate stops being lifted by the truck’s crane, and the truck becomes secured.

Please help me out with this and also find the attached image for reference. Figure for the above problem

(define (problem warehouse-1)
  (:domain warehouse)
  (:objects
    truck1 - truck
    package1 - package
    package2 - package
    crate1 - crate
    crate2 - crate
    loc1 - location
    loc2 - location
    loc3 - location
  )
  (:init
    (at truck1 loc1)
    (at package1 loc1)
    (at package2 loc2)
    (at crate1 loc2)
    (at crate2 loc3)
    (empty truck1)
  )
  (:goal
    (and 
      (at package1 loc2)
      (at package2 loc3)
      (at crate1 loc1)
      (empty truck1)
    )
  )
)

I have been facing problems with the declaration in the domain file and also with designing the problem file, could you please help me out on this?

Naive
  • 1
  • 2
  • you might find this [tutorial](http://pddl4j.imag.fr/pddl_tutorial.html) useful to write your domain. – Bilal Apr 08 '23 at 19:24

0 Answers0