forked from potassco/pddl-instances
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain.pddl
executable file
·199 lines (179 loc) · 5.56 KB
/
domain.pddl
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
;; Schedule World
;;
(define (domain schedule)
(:requirements :adl)
(:constants cold hot cylindrical polisher roller lathe grinder punch drill-press
spray-painter immersion-painter polished rough smooth)
(:predicates (part ?obj)
(temperature ?obj ?temp)
(busy ?machine)
(scheduled ?obj)
(objscheduled)
(surface-condition ?obj ?surface-cond)
(shape ?obj ?shape)
(painted ?obj ?colour)
(has-hole ?obj ?width ?orientation)
(has-bit ?machine ?width)
(can-orient ?machine ?orientation)
(has-paint ?machine ?colour))
(:action do-polish
:parameters (?x)
:precondition (and (part ?x)
(not (busy polisher))
(not (scheduled ?x))
(temperature ?x cold))
:effect (and (busy polisher)
(scheduled ?x)
(surface-condition ?x polished)
(when (not (objscheduled))
(objscheduled))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))))
(:action do-roll
:parameters (?x)
:precondition (and (part ?x)
(not (busy roller))
(not (scheduled ?x)))
:effect (and
(busy roller)
(scheduled ?x)
(temperature ?x hot)
(shape ?x cylindrical)
(when (not (objscheduled))
(objscheduled))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))
(forall (?oldpaint)
(when (painted ?x ?oldpaint)
(not (painted ?x ?oldpaint))))
(forall (?oldwidth ?oldorient)
(when (has-hole ?x ?oldwidth ?oldorient)
(not (has-hole ?x ?oldwidth ?oldorient))))
(forall (?oldshape)
(when (shape ?x ?oldshape)
(not (shape ?x ?oldshape))))
(forall (?oldtemp)
(when (temperature ?x ?oldtemp)
(not (temperature ?x ?oldtemp))))))
(:action do-lathe
:parameters (?x)
:precondition (and (part ?x)
(not (busy lathe))
(not (scheduled ?x)))
:effect (and
(busy lathe)
(scheduled ?x)
(surface-condition ?x rough)
(shape ?x cylindrical)
(when (not (objscheduled))
(objscheduled))
(forall (?oldshape)
(when (shape ?x ?oldshape)
(not (shape ?x ?oldshape))))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))
(forall (?oldpaint)
(when (painted ?x ?oldpaint)
(not (painted ?x ?oldpaint))))))
(:action do-grind
:parameters (?x)
:precondition (and (part ?x)
(not (busy grinder))
(not (scheduled ?x)))
:effect (and
(busy GRINDER)
(scheduled ?x)
(surface-condition ?x smooth)
(when (not (objscheduled))
(objscheduled))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))
(forall (?oldpaint)
(when (painted ?x ?oldpaint)
(not (painted ?x ?oldpaint))))))
(:action do-punch
:parameters (?x ?width ?orient)
:precondition (and
(part ?x)
(has-bit punch ?width)
(can-orient punch ?orient)
(temperature ?x cold)
(not (busy punch))
(not (scheduled ?x))
(not (has-hole ?x ?width ?orient)))
:effect (and
(busy punch)
(scheduled ?x)
(has-hole ?x ?width ?orient)
(surface-condition ?x rough)
(when (not (objscheduled))
(objscheduled))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))))
(:action do-drill-press
:parameters (?x ?width ?orient)
:precondition (and
(part ?x)
(has-bit drill-press ?width)
(can-orient drill-press ?orient)
(temperature ?x cold)
(not (busy drill-press))
(not (scheduled ?x))
(not (has-hole ?x ?width ?orient)))
:effect (and
(busy drill-press)
(scheduled ?x)
(has-hole ?x ?width ?orient)
(when (not (objscheduled))
(objscheduled))))
(:action do-spray-paint
:parameters (?x ?newpaint)
:precondition (and
(part ?x)
(has-paint spray-painter ?newpaint)
(not (busy spray-painter))
(not (scheduled ?x))
(temperature ?x cold))
:effect (and
(busy spray-painter)
(scheduled ?x)
(painted ?x ?newpaint)
(when (not (objscheduled))
(objscheduled))
(forall (?oldsurface)
(when (surface-condition ?x ?oldsurface)
(not (surface-condition ?x ?oldsurface))))
(forall (?oldpaint)
(when (painted ?x ?oldpaint)
(not (painted ?x ?oldpaint))))))
(:action do-immersion-paint
:parameters (?x ?newpaint)
:precondition (and
(part ?x)
(has-paint immersion-painter ?newpaint)
(not (busy immersion-painter))
(not (scheduled ?x)))
:effect (and
(busy immersion-painter)
(scheduled ?x)
(painted ?x ?newpaint)
(when (not (objscheduled))
(objscheduled))
(forall (?oldpaint)
(when (painted ?x ?oldpaint)
(not (painted ?x ?oldpaint))))))
(:action do-time-step
:parameters ()
:precondition (objscheduled)
:effect (and
(forall (?x)
(when (scheduled ?x)
(not (scheduled ?x))))
(forall (?m)
(when (busy ?m)
(not (busy ?m)))))))