forked from davidpujol/IA-Planification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain4.pddl
45 lines (34 loc) · 1.55 KB
/
domain4.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
(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)
(numTasks ?p - programmer)
(totalHours)
(workingProgrammers)
)
(:predicates
;; Static predicates:
;; Non-static predicates:
(taskAssigned ?t)
(taskReviewAssigned ?t)
(programmerDoesTask ?p ?t)
(programmerWorking ?p)
(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) (ability ?p)) (when (< (ability ?p) (complexity ?t)) (increase (duration ?t) 2))
(increase (totalHours) (duration ?t)) (increase (numTasks ?p) 1) (when (not (programmerWorking ?p)) (and (programmerWorking ?p) (increase (workingProgrammers) 1))) )
)
(: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)) (increase (numTasks ?p) 1)
(when (not (programmerWorking ?p)) (and (programmerWorking ?p) (increase (workingProgrammers) 1)))))
)