-
Notifications
You must be signed in to change notification settings - Fork 57
/
domain-adl.pddl
91 lines (75 loc) · 2.52 KB
/
domain-adl.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
(define (domain satellite)
(:requirements :conditional-effects :negative-preconditions
:typing :fluents :equality)
(:types satellite direction instrument mode)
(:predicates
(on_board ?i - instrument ?s - satellite)
(supports ?i - instrument ?m - mode)
(pointing ?s - satellite ?d - direction)
(power_avail ?s - satellite)
(power_on ?i - instrument)
(calibrated ?i - instrument)
(have_image ?d - direction ?m - mode)
(calibration_target ?i - instrument ?d - direction))
(:functions (data_capacity ?s - satellite)
(data ?d - direction ?m - mode)
(slew_time ?a ?b - direction)
(data-stored)
(fuel ?s - satellite)
(fuel-used)
)
(:action turn_to
:parameters (?s - satellite ?d_new - direction ?d_prev - direction)
:precondition (and (pointing ?s ?d_prev)
(not (= ?d_new ?d_prev))
(>= (fuel ?s) (slew_time ?d_new ?d_prev))
)
:effect (and (pointing ?s ?d_new)
(not (pointing ?s ?d_prev))
(decrease (fuel ?s) (slew_time ?d_new ?d_prev))
(increase (fuel-used) (slew_time ?d_new ?d_prev))
)
)
(:action switch_on
:parameters (?i - instrument ?s - satellite)
:precondition (and (on_board ?i ?s)
(power_avail ?s)
)
:effect (and (power_on ?i)
(when (calibrated ?i) (not (calibrated ?i)))
(not (power_avail ?s))
)
)
(:action switch_off
:parameters (?i - instrument ?s - satellite)
:precondition (and (on_board ?i ?s)
(power_on ?i)
)
:effect (and (not (power_on ?i))
(power_avail ?s)
)
)
(:action calibrate
:parameters (?s - satellite ?i - instrument ?d - direction)
:precondition (and (on_board ?i ?s)
(calibration_target ?i ?d)
(pointing ?s ?d)
(power_on ?i)
)
:effect (calibrated ?i)
)
(:action take_image
:parameters (?s - satellite ?d - direction ?i - instrument ?m - mode)
:precondition (and (calibrated ?i)
(on_board ?i ?s)
(supports ?i ?m)
(power_on ?i)
(pointing ?s ?d)
(power_on ?i)
(>= (data_capacity ?s) (data ?d ?m))
)
:effect (when (not (have_image ?d ?m)) (and (decrease (data_capacity ?s) (data ?d ?m))
(have_image ?d ?m)
(increase (data-stored) (data ?d ?m))))
)
)