forked from davidpujol/IA-Planification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain2.pddl
42 lines (31 loc) · 1.23 KB
/
domain2.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
(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)
(totalHours)
)
(: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))
(increase (totalHours) (duration ?t)) )
)
(: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) (increase (totalHours) (reviewDuration ?t)))
)
)