forked from davidpujol/IA-Planification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain1.pddl
40 lines (29 loc) · 1.12 KB
/
domain1.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
(define (domain tasking)
(:requirements :adl :fluents :equality :typing)
(:types programmer task)
(:functions
(ability ?p - programmer)
(quality ?p - programmer)
(complexity ?t - task)
(duration ?t - task)
(reviewDuration ?t - task)
)
(:predicates
;; Static predicates:
;; Non-static predicates:
(taskAssigned ?t)
(taskReviewAssigned ?t)
(programmerDoesTask ?p ?t)
(programmerReviewsTask ?p ?t)
)
(:action assignTask
:parameters (?p - programmer ?t - task)
:precondition (and (not (taskAssigned ?t)) (>= (ability ?p) (- (complexity ?t) 1)) )
:effect (and (taskAssigned ?t) (programmerDoesTask ?p ?t) (assign (reviewDuration ?t) (quality ?p)) (when (< (ability ?p) (complexity ?t)) (increase (duration ?t) 2)) )
)
(:action assignReviewTask
:parameters (?p - programmer ?t - task ?pAnterior - programmer)
:precondition(and (not (taskReviewAssigned ?t)) (programmerDoesTask ?pAnterior ?t) (taskAssigned ?t) (not (= ?p ?pAnterior)) (>= (ability ?p) (- (complexity ?t) 1)) )
:effect (and (taskReviewAssigned ?t) (programmerReviewsTask ?p ?t))
)
)