forked from melahi/pddl-instances
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain.hddl
132 lines (105 loc) · 4.9 KB
/
domain.hddl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
(define (domain Depot)
(:requirements :negative-preconditions
:hierarchy
:typing
:method-preconditions
)
(:types place locatable - object depot distributor - place truck hoist surface - locatable pallet crate - surface)
(:predicates (at ?x - locatable ?y - place) (on ?x - crate ?y - surface) (in ?x - crate ?y - truck) (lifting ?x - hoist ?y - crate) (available ?x - hoist) (clear ?x - surface))
(:task do_put_on
:parameters (?c - crate ?s2 - surface) )
(:task do_clear
:parameters (?s1 - surface ?p1 - place) )
(:task do_get_truck
:parameters (?t - truck ?p1 - place) )
(:task do_lift_crate
:parameters (?c - crate ?p - place ?h - hoist) )
(:task do_load_truck
:parameters (?c - crate ?s - surface ?p - place ?t - truck) )
(:task do_unload_truck
:parameters (?c - crate ?s - surface ?p - place ?t - truck) )
(:method m0_do_put_on
:parameters ( ?c - crate ?s2 - surface )
:task (do_put_on ?c ?s2)
:precondition(and (on ?c ?s2))
:ordered-subtasks(and (t1 (nop))) )
(:method m1_do_put_on
:parameters ( ?c - crate ?s2 - surface ?p - place ?h - hoist )
:task (do_put_on ?c ?s2)
:precondition(and (at ?c ?p))
:ordered-subtasks(and (t1 (do_clear ?c ?p)) (t2 (do_clear ?s2 ?p)) (t3 (do_lift_crate ?c ?p ?h)) (t4 (Drop ?h ?c ?s2 ?p))) )
(:method m2_do_put_on
:parameters ( ?c - crate ?s2 - surface ?p - place ?t - truck ?h - hoist )
:task (do_put_on ?c ?s2)
:precondition(and (in ?c ?t))
:ordered-subtasks(and (t1 (do_get_truck ?t ?p)) (t2 (do_clear ?s2 ?p)) (t3 (Unload ?h ?c ?t ?p)) (t4 (Drop ?h ?c ?s2 ?p))) )
(:method m3_do_put_on
:parameters ( ?c - crate ?s2 - surface ?s1 - surface ?p1 - place ?t - truck ?p2 - place )
:task (do_put_on ?c ?s2)
:precondition()
:ordered-subtasks(and (t1 (do_load_truck ?c ?s1 ?p1 ?t)) (t2 (Drive ?t ?p1 ?p2)) (t3 (do_unload_truck ?c ?s2 ?p2 ?t))) )
(:method m4_do_clear
:parameters ( ?s1 - surface ?p1 - place )
:task (do_clear ?s1 ?p1)
:precondition(and (clear ?s1) (at ?s1 ?p1))
:ordered-subtasks(and (t1 (nop))) )
(:method m5_do_clear
:parameters ( ?s1 - surface ?p1 - place ?c - crate ?t - truck ?h1 - hoist )
:task (do_clear ?s1 ?p1)
:precondition(and (not (clear ?s1)) (on ?c ?s1) (at ?s1 ?p1) (at ?h1 ?p1))
:ordered-subtasks(and (t1 (do_clear ?c ?p1)) (t2 (Lift ?h1 ?c ?s1 ?p1)) (t3 (do_get_truck ?t ?p1)) (t4 (Load ?h1 ?c ?t ?p1))) )
(:method m6_do_get_truck
:parameters ( ?t - truck ?p1 - place )
:task (do_get_truck ?t ?p1)
:precondition(and (at ?t ?p1))
:ordered-subtasks(and (t1 (nop))) )
(:method m7_do_get_truck
:parameters ( ?t - truck ?p1 - place ?p2 - place )
:task (do_get_truck ?t ?p1)
:precondition(and (not (at ?t ?p1)))
:ordered-subtasks(and (t1 (Drive ?t ?p2 ?p1))) )
(:method m8_do_lift_crate
:parameters ( ?c - crate ?p - place ?h - hoist ?t - truck )
:task (do_lift_crate ?c ?p ?h)
:precondition(and (in ?c ?t) (at ?h ?p))
:ordered-subtasks(and (t1 (do_get_truck ?t ?p)) (t2 (Unload ?h ?c ?t ?p))) )
(:method m9_do_lift_crate
:parameters ( ?c - crate ?p - place ?h - hoist ?s - surface )
:task (do_lift_crate ?c ?p ?h)
:precondition(and (on ?c ?s) (at ?c ?p) (at ?s ?p) (at ?h ?p))
:ordered-subtasks(and (t1 (Lift ?h ?c ?s ?p))) )
(:method m10_do_load_truck
:parameters ( ?c - crate ?s - surface ?p - place ?t - truck ?h - hoist )
:task (do_load_truck ?c ?s ?p ?t)
:precondition(and (at ?c ?p) (at ?s ?p) (on ?c ?s) (at ?h ?p))
:ordered-subtasks(and (t1 (do_get_truck ?t ?p)) (t2 (do_clear ?c ?p)) (t3 (Lift ?h ?c ?s ?p)) (t4 (Load ?h ?c ?t ?p))) )
(:method m11_do_unload_truck
:parameters ( ?c - crate ?s - surface ?p - place ?t - truck ?h - hoist )
:task (do_unload_truck ?c ?s ?p ?t)
:precondition(and (in ?c ?t) (at ?t ?p) (at ?h ?p) (at ?s ?p))
:ordered-subtasks(and (t1 (do_clear ?s ?p)) (t2 (Unload ?h ?c ?t ?p)) (t3 (Drop ?h ?c ?s ?p))) )
(:action Drive
:parameters (?x - truck ?y - place ?z - place)
:precondition (and (at ?x ?y))
:effect (and (not (at ?x ?y)) (at ?x ?z)))
(:action Lift
:parameters (?x - hoist ?y - crate ?z - surface ?p - place)
:precondition (and (at ?x ?p) (available ?x) (at ?y ?p) (on ?y ?z) (clear ?y))
:effect (and (not (at ?y ?p)) (lifting ?x ?y) (not (clear ?y)) (not (available ?x)) (clear ?z) (not (on ?y ?z))))
(:action Drop
:parameters (?x - hoist ?y - crate ?z - surface ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (clear ?z) (lifting ?x ?y))
:effect (and (available ?x) (not (lifting ?x ?y)) (at ?y ?p) (not (clear ?z)) (clear ?y) (on ?y ?z)))
(:action Load
:parameters (?x - hoist ?y - crate ?z - truck ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (lifting ?x ?y))
:effect (and (not (lifting ?x ?y)) (in ?y ?z) (available ?x)))
(:action Unload
:parameters (?x - hoist ?y - crate ?z - truck ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (available ?x) (in ?y ?z))
:effect (and (not (in ?y ?z)) (not (available ?x)) (lifting ?x ?y)))
(:action nop
:parameters ()
:precondition ()
:effect ())
)