
Defining the Domain
Requirements
Let start by creating the domain file. For instance,rsc-domain.pddl
write the following PDDL to give a name to this domain and specify the
requirements of the domain.
Code
Code
rsc-domain.pddl
Types
Then, define the set of objects (types) that will be used in this domain. Quite obviously, we will have the types robot (mobile robots), conveyor, unit, piece, etc.Code
Code
rsc-domain.pddl
Constants
We also declare a dummy operation called stop as a constant of the domain which will be used in one action:Code
Code
rsc-domain.pddl
Predicates
Now it is time to think to a model for the domain. It is based on the following ideas: * Producer/consumer: the trays are resources consumed by the conveyors and produced by the units. A “one-to-many” relation is created between each unit and the conveyors. A tuple conveyors/unit is like a (Petri Net) “machine” that consumes and produces trays. The conveyors are the inputs and the unit is the output. Each input/output’s capacity is one, * Operation stacks: each tray is associated to a stack of operations that have to be performed on the pieces of the tray. The last operation of the stack is always _stop. Each time a machine consumes a tray, the associated stack is pulled, * Goal: to empty all the stacks by connecting the machines with robots transporting trays from units (outputs) to conveyors (inputs). The capacity of the robots is one. Here is the vocabulary (“predicates”) that will be used by the actions:Code
Code
rsc-domain.pddl
Code
Code
Code
Code
Operators
The new step is to define all the actions. For this domain, we will need 6 actions:Code
Code
rsc-domain.pddl
Code
Code
rsc-domain.pddl
Code
Code
rsc-domain.pddl
Code
Code
rsc-domain.pddl
Code
Code
rsc-domain.pddl
Code
Code
rsc-domain.pddl
Defining the problem
Let start by creating the problem file, e.g.,rsc_problem_easy.pddl.
The problem we wish to define is a simple problem with one type of
pieces, a single tray, robot and conveyor; two units, a stocker storing
this tray at the initial state and a processing unit. The goal is for
the unit to perform three operations (op10 > op20 > op30) on the
tray.
Objects
Hence, the types and objects are as follows:Code
Code
rsc_problem_easy.pddl
Initial State
This snippet of code is the initial state:Code
Code
rsc_problem_easy.pddl
Goal Description
The goal is simply the completion of tray1:Code
Code
rsc_problem_easy.pddl
Found an error on this page? Report an issue.

