-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test problem_expert.exist_precidate
- Loading branch information
Showing
2 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
plansys2_problem_expert/test/pddl/domain_simple_derived.pddl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
(define (domain simple) | ||
(:requirements :strips :typing :adl :fluents :durative-actions :derived-predicates) | ||
|
||
;; Types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(:types | ||
person - object | ||
message - object | ||
robot - object | ||
room - object | ||
room_with_teleporter - room | ||
);; end Types ;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Predicates ;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(:predicates | ||
|
||
(robot_talk ?r - robot ?m - message ?p - person) | ||
(robot_near_person ?r - robot ?p - person) | ||
(robot_at ?r - robot ?ro - room) | ||
(person_at ?p - person ?ro - room) | ||
(is_teleporter_enabled ?r - room_with_teleporter) | ||
(is_teleporter_destination ?r - room) | ||
(inferred-robot_at ?r - robot ?ro - room) | ||
(inferred-person_at ?p - person ?ro - room) | ||
);; end Predicates ;;;;;;;;;;;;;;;;;;;; | ||
;; Functions ;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(:functions | ||
(room_distance ?r1 - room ?r2 - room) | ||
);; end Functions ;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Derived predicates ;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(:derived (inferred-robot_at ?r - robot ?ro - room) | ||
(and | ||
(robot_at ?r ?ro) | ||
) | ||
) | ||
(:derived (inferred-person_at ?p - person ?ro - room) | ||
(and | ||
(person_at ?p ?ro) | ||
) | ||
) | ||
|
||
;; Actions ;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(:durative-action move | ||
:parameters (?r - robot ?r1 ?r2 - room) | ||
:duration ( = ?duration (* (room_distance ?r1 ?r2) 0.5)) | ||
:condition (and | ||
(at start(robot_at ?r ?r1))) | ||
:effect (and | ||
(at start(not(robot_at ?r ?r1))) | ||
(at end(robot_at ?r ?r2)) | ||
) | ||
) | ||
|
||
(:action teleport | ||
:parameters (?r - robot ?r1 - room_with_teleporter ?r2 - room) | ||
:precondition (and | ||
(robot_at ?r ?r1) | ||
(is_teleporter_enabled ?r1) | ||
(is_teleporter_destination ?r2) | ||
) | ||
:effect (and | ||
(not(robot_at ?r ?r1)) | ||
(robot_at ?r ?r2) | ||
) | ||
) | ||
|
||
(:durative-action talk | ||
:parameters (?r - robot ?from ?p - person ?m - message) | ||
:duration ( = ?duration 5) | ||
:condition (and | ||
(over all(robot_near_person ?r ?p)) | ||
) | ||
:effect (and | ||
(at end(robot_talk ?r ?m ?p)) | ||
) | ||
) | ||
|
||
(:durative-action approach | ||
:parameters (?r - robot ?ro - room ?p - person) | ||
:duration ( = ?duration 5) | ||
:condition (and | ||
(over all(robot_at ?r ?ro)) | ||
(over all(person_at ?p ?ro)) | ||
(at end(person_at ?p ?ro)) | ||
) | ||
:effect (and | ||
(at end(robot_near_person ?r ?p)) | ||
) | ||
) | ||
|
||
);; end Domain ;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters