-
Notifications
You must be signed in to change notification settings - Fork 0
/
psex2.d.pddl
71 lines (64 loc) · 2.3 KB
/
psex2.d.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
(define
(domain PSEX2)
(:timing
(units 0000-00-00_01:00:00)
)
(:requirements :timed-initial-literals :negative-preconditions
:equality :typing :fluents :durative-actions
:derived-predicates)
(:types
unilang-entry person - object
)
(:predicates
(completed ?e - unilang-entry)
(depends ?e1 ?e2 - unilang-entry)
(provides ?e1 ?e2 - unilang-entry)
(eases ?e1 ?e2 - unilang-entry)
(possible ?e - unilang-entry)
(has-time-constraints ?e - unilang-entry)
)
(:functions
(costs ?e - unilang-entry)
(earns ?e - unilang-entry)
(budget ?p - person)
(duration ?e - unilang-entry)
)
(:durative-action Complete
:parameters (?e1 - unilang-entry ?p - person)
:duration (= ?duration (duration ?e1))
:condition (and
;; ensure we have enough money
(over all
(or
(not (has-time-constraints ?e1))
(possible ?e1)))
(at start
(>= (budget ?p) (costs ?e1))
)
;; make sure there are no unsatisfied preconditions
(at start
(not
(exists (?e2 - unilang-entry)
(and
(depends ?e1 ?e2)
(not (completed ?e2))
))))
;; make sure if a provides exists one is used
(at start
(or
(not
(exists (?e3 - unilang-entry)
(provides ?e3 ?e1)))
(exists (?e4 - unilang-entry)
(and
(provides ?e4 ?e1)
(completed ?e4)))))
(at start (not (completed ?e1)))
)
:effect (and
(at end (completed ?e1))
(at start (decrease (budget ?p) (costs ?e1)))
(at end (increase (budget ?p) (earns ?e1)))
)
)
)