## 3 Materials and Methods
### The Generic Planning Problem (GPP) for the GIS and Its Instances in PDDL
#### 3.2.1. PDDL Domain for the Generic Planning Problem (GPP)  
The PDDL domain for the GPP contains the definition of the types, predicates, and durative actions specific to the GIS. Using the carrier-position-goods relationship, the PDDL types and the predicate _at_ are introduced. The four types _agent_, _thing_, _location_, and _step_ are all specializations of the PDDL standard super-type _object_. The _agent_ type is further specialized to the two types of mobile manipulators: _robot_ and _human_; a _tool_, an _item_, and _no_thing_ are specializations of a _thing_; and an _agentpose_ and a _thingpose_ are specializations of a _location_ (see Listing 1). To model the spatial relation between all the types and sub-types, only one predicate is required. This predicate is the _at_ predicate, and it has two input variables of type _object_. In this context, if one _thingpose_ is not occupied, a _nothing_ object is assigned to it. The unoccupied state of an _agentpose_ is modelled with another predicate called _free_. To describe further characteristics of the elements from the GIS, as well as other relations between these elements, further PDDL predicates must be defined. These predicates have as parameters the agents, the things, and the configuration of the process steps. ```
1(:types
2 agentthinglocationstep-object
3 robothuman-agent
4 toolitemno_thing-thing
5 agentposethingpose-location)
6(:predicates
7(at?object-object?object-object)
8(free?location-location)
```  
Listing 2 starts with two predicates for the agents that encode ordering rules for the actions that can be assigned to them. The predicate _not_acting_ is used to serialize the actions of one actor, while the predicate _navigate_allowed_ is used to enforce at least one other type of action between two navigation actions in the plan of an agent. The following three predicates describe properties of things relevant for the GIS. A thing can be moved between different _thingposes_, may not be placeable at all _thingposes_, or may not be grasped by a specific agent. ```
1(not_acting?agent-agent)
2(navigate_allowed?agent-agent)
3(thing_moveable?thing-thing)
4(thing_placeable?thing-thing?agentpose-agentpose)
5(thing_for_agent?thing-thing?agent-agent)
```  
**Listing 3** Experiments on the PDDL domain file for the GPP file with the predicates related to the agents and the things. Further on, Listing 3 presents all PDDL predicates required to describe the process steps. The predicates from lines 1 and 2 are used to model the status of the process steps, while those from lines 3-6 describe the configuration of these process steps. The latter are connected to a subset of all actions from those presented in Section 3.1.1. These are the actions for which specific configurations are required. A _grasp/place_ action can be executed by any actor and at any _agentpose_ or _thingpose_. On the other hand, _connect_, _manipulate_, or _collaboration_ actions can have execution restrictions. These restrictions are modelled with the predicates introduced in lines 3-6. Lastly, the predicate _process_step_precedence_type_ models the activation rules between the process steps on different items, as described in Section 3.1.3. The states, relations, and constraints, of and between the elements from the environment and the process steps can be modelled with the introduced predicates. These predicates are the building blocks with which the actions of the PDDL domain for the GPP are formulated. The actions are PDDL artefacts that describe how the states of the system evolve. The actions for PDDL2.1 are durative actions with conditions, effects, and durations. The GPP has 11 durative actions. The first 8 correspond to those defined for the actors in Section 3.1.3. They are: _navigate_, _grasp_, _release_, _fetch_, _discard_, _connect_, _manipulate_, _collaborate_. A further three actions are defined to model the activation rules for the process steps. The _navigate_, _load_, and _manipulate_ actions, and one action for the activation rules are presented in the following.