## 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 other actions are defined similarly. ```
1(process_step_todo?item-item?step-step)
2(process_step_done?item-item?step-step)
3(process_step_connect?item-item?step-step?thingpose-\(\leftrightarrow\)thingpose)
4(process_step_fetch_item?item-item?step-step?agent-agent\(\leftrightarrow\)?agentpose-agentpose)
5(process_step_manipulate?item-item?step-step?thing-thing\(\leftrightarrow\)?agent-agent?agentpose-agentpose)
6(process_step_collaboration?item-item?step-step?agent1-agent?agent2-agent?agentpose1-agentpose?agentpose2-agentpose?thing1-thing?thing2-thing)
7(process_step_precedence_type1?item1-item?step1-step?item2\(\leftrightarrow\)-item?step2-step)...
```  
Listing 4 contains the PDDL definition of the _navigate_ action, while Figure 4 is a visual representation of the same action. This action describes what conditions should hold and how the states of the world should change when an _agent_ navigates between two _agentposes_. These conditions and states of the world are described with predicates that require parameters. The parameters are firstly introduced (line 2). As well as the parameters, a duration of 10 time units is defined, and the conditions are presented. The _navigate_ action can be activated when all conditions hold in the actual state of the world. The _agent_ must be at the _from agentpose_ and not be executing any other action (lines 5-6). To navigate to the _to_ pose, this _agentpose_ must be _free_ (line 7), and a navigate action should be allowed (line 8). If all these conditions hold, the action is planned with a duration of 10 time units. In this model, the duration is constant over all possible _navigate_ actions, but this can be changed to be a function of the travelled distance. Immediately after the action starts, the _at start_ effects are applied. As anticipated, the agent is no longer at the _agentpose_ from which it started (line 10). The pose to which the agent is heading is already marked as not free (line 11), while the pose from which it started is now _free_ (line 12). The agent is _not_ (_not_acting_), thus it is executing an action, and this status will change as an effect at the end of the action (lines 13 and 15). At the end of the action, the state predicate _at_ sets the pose of the agent to the _to agentpose_ (line 14), and the negated _navigate_allowed_ predicate prevents the immediate execution of another _navigate_ action (line 16). ```
1(:durative-actionavigate
2:parameters(?agent-agent?from?to-agentpose)
3:duration(=?duration10)
4:condition(and
5(atstart(at?agent?from))
6(atstart(not_acting?agent))
7(atstart(free?to))
8(atstart(navigate_allowed?agent)))
9:effect(and
10(atstart(not(at?agent?from)))
11(atstart(not(free?to)))
12(atstart(free?from))
13(atstart(not(not_acting?agent)))
14(atend(at?agent?to))
15(atend(not_acting?agent))
16(atstart(not(navigate_allowed?agent))))
```  
Listing 4: Excerpt from the PDDL domain file for the GPP with the definition of the _navigate_ action. The _grasp_ action is an example of an action from the GPP that does not require any special restrictions (see its PDDL formulation in Listing 5). It can be executed by any _agent_ and at any _thingrose_ or _agentpose_, as long as it makes logical sense. A _grasp_ action is allowed only when the agent is not executing any other action (line 12), has _nothing_ at its _thingrose_ (lines 8-9), and is at a location where the _thing_ to be collected is located (lines 5-7). The _thing_ must also have two properties: it is not fixed and it can be manipulated by the agent (lines 10-11). If all conditions hold, the _grasp_ action can be planned for the agent. The specific effects of the action describe the switch between the _thing_ and the _nothing_ at the two _thingposes_ (lines 15, 16, 18, 19). In addition, _not_acting_ and _navigate_allowed_ effects change the state of the world, as described above for the _navigate_ action (lines 14, 17, 20).