forked from potassco/pddl-instances
-
Notifications
You must be signed in to change notification settings - Fork 1
/
domain.pddl
72 lines (65 loc) · 1.58 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
;; Transport sequential
;;
(define (domain transport)
(:requirements :typing :action-costs)
(:types
location target locatable - object
vehicle package - locatable
capacity-number - object
)
(:predicates
(road ?l1 ?l2 - location)
(at ?x - locatable ?v - location)
(in ?x - package ?v - vehicle)
(capacity ?v - vehicle ?s1 - capacity-number)
(capacity-predecessor ?s1 ?s2 - capacity-number)
)
(:functions
(road-length ?l1 ?l2 - location) - number
(total-cost) - number
)
(:action drive
:parameters (?v - vehicle ?l1 ?l2 - location)
:precondition (and
(at ?v ?l1)
(road ?l1 ?l2)
)
:effect (and
(not (at ?v ?l1))
(at ?v ?l2)
(increase (total-cost) (road-length ?l1 ?l2))
)
)
(:action pick-up
:parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number)
:precondition (and
(at ?v ?l)
(at ?p ?l)
(capacity-predecessor ?s1 ?s2)
(capacity ?v ?s2)
)
:effect (and
(not (at ?p ?l))
(in ?p ?v)
(capacity ?v ?s1)
(not (capacity ?v ?s2))
(increase (total-cost) 1)
)
)
(:action drop
:parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number)
:precondition (and
(at ?v ?l)
(in ?p ?v)
(capacity-predecessor ?s1 ?s2)
(capacity ?v ?s1)
)
:effect (and
(not (in ?p ?v))
(at ?p ?l)
(capacity ?v ?s2)
(not (capacity ?v ?s1))
(increase (total-cost) 1)
)
)
)