test1.fct |
Simplest test where planner have to do full navigation (GOTO is possible only between 2 near visibile waypoints) |
test1_nav.fct |
Simplest test where planner do not have to do full navigation (GOTO is possible for every pairs of waypoints) |
test2.fct |
Test #2 (limited GOTO) |
test2_nav.fct |
Test #2 (unlimited GOTO) |
test3.fct |
Test #3 (limited GOTO) |
test3_nav.fct |
Test #3 (unlimited GOTO) |
test4.fct |
Test #3 (limited GOTO) |
test4_nav.fct |
Test #4 (unlimited GOTO) |
test5.fct |
Test #5 (limited GOTO) |
test5_nav.fct |
Test #5 (unlimited GOTO) |
test_battery1.fct |
Test that demonstrates recharge capability (limited GOTO) |
test_battery1_nav.fct |
Test that demonstrates recharge capability (unlimited GOTO) |
(define (domain ScientificConference) (:requirements :typing :fluents) (:types location - object pres-session - object post-session - object ) (:predicates (robot-at ?loc - location) (link ?x ?y - location) (rechargeable-place ?loc - location) (registration-place ?loc - location) (socializing-place ?loc - location) (presentation-done ?ses - pres-session ?loc - location) (assisted-to-pres ?ses - pres-session ?loc - location) (picture-taken-poster ?ses - POST-SESSION ?loc - location) (poster-fixed ?ses - post-session ?loc - location) (poster-done ?ses - post-session ?loc - location) (registered) ) (:functions (distance ?l1 ?l2 - location) (currenttime) (battery-level) (time-pres-begin ?ses - pres-session) (time-post-begin ?ses - post-session) (duration-pres) (min-poster-duration) (energyconsumed-per-meter) (energyconsumed-per-second) (max-speed) (max-battery-capacity) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; GOTO : Navigate between 2 Waypoints ;; ;; Goto consume time and energy proportionnal to distance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action GOTO :parameters(?from ?to - location) :precondition(and (robot-at ?from) (link ?from ?to) (>= (battery-level) (* (distance ?from ?to) (energyconsumed-per-meter))) ) :effect(and (not (robot-at ?from)) (robot-at ?to) (increase (currenttime) (/ (distance ?from ?to) (max-speed))) ;(increase (currenttime) 20) (decrease (battery-level) (* (distance ?from ?to) (energyconsumed-per-meter))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; REGISTER : Register the robot at the conference ;; ;; Consume 5 miniutes and energy for 5 mins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action REGISTER :parameters(?loc - location) :precondition(and (robot-at ?loc) (registration-place ?loc) (not (registered)) (>= (battery-level) (* 300 (energyconsumed-per-second))) ) :effect(and (registered) (increase (currenttime) 300) (decrease (battery-level) (* 300 (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; RECHAGE : Recharge the battery of the robot ;; ;; Takes 1 hour and full charge de battery ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action RECHARGE :parameters(?where - location) :precondition(and (robot-at ?where) (registered) (rechargeable-place ?where) ) :effect(and ;(increase (battery-level) 500) ;(increase (battery-level) (- (max-battery-capacity) (battery-level))) (assign (battery-level) (max-battery-capacity)) (increase (currenttime) 3600) ;(increase (currenttime) (* 3600.0 (/ (- (max-battery-capacity) (battery-level)) (max-battery-capacity)))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; MAKE-PRESENTATION : Robot make his technical presentation ;; ;; This action must begin exactly a time of presentation session ;; Takes 20mins and consume energy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action MAKE-PRESENTATION :parameters(?room - location ?ses - pres-session) :precondition(and (robot-at ?room) (registered) (= (currenttime) (time-pres-begin ?ses)) (>= (battery-level) (* (duration-pres) (energyconsumed-per-second))) ) :effect(and (increase (currenttime) (duration-pres)) (presentation-done ?ses ?room) (decrease (battery-level) (* (duration-pres) (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; WAIT-PRES-SESSION : Standby the robot ;; ;; This action is necessary for time synchronization. ;; Wait until a presentation session ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action WAIT-PRES-SESSION :parameters(?ses - pres-session) :precondition(and (< (currenttime) (time-pres-begin ?ses)) (>= (battery-level) (* (- (time-pres-begin ?ses) (currenttime)) (energyconsumed-per-second))) ) :effect(and (increase (currenttime) (- (time-pres-begin ?ses) (currenttime))) ;(increase (total-waited-time) (- (time-pres-begin ?ses) (currenttime))) (decrease (battery-level) (* (- (time-pres-begin ?ses) (currenttime)) (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; WAIT-POST-SESSION : Standby the robot ;; ;; This action is necessary for time synchronization. ;; Wait until a poster session ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action WAIT-POST-SESSION :parameters(?ses - post-session) :precondition(and (< (currenttime) (time-post-begin ?ses)) (>= (battery-level) (* (- (time-post-begin ?ses) (currenttime)) (energyconsumed-per-second))) ) :effect(and (increase (currenttime) (- (time-post-begin ?ses) (currenttime))) ;(increase (total-waited-time) (- (time-post-begin ?ses) (currenttime))) (decrease (battery-level) (* (- (time-post-begin ?ses) (currenttime)) (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ASSIST-PRESENTATION : Assit to a presentation ;; ;; ;; This action is similar to MAKE-PRESENTATION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action ASSIST-PRESENTATION :parameters(?room - location ?ses - pres-session) :precondition(and (robot-at ?room) (registered) (= (currenttime) (time-pres-begin ?ses)) (>= (battery-level) (* (duration-pres) (energyconsumed-per-second))) ) :effect(and (increase (currenttime) (duration-pres)) (assisted-to-pres ?ses ?room) (decrease (battery-level) (* (duration-pres) (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TAKE-PICTURE-POSTER : Takes a picture of a poster ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action TAKE-PICTURE-POSTER :parameters(?loc - location ?ses - post-session) :precondition(and (robot-at ?loc) (registered) (not (picture-taken-poster ?ses ?loc)) (>= (currenttime) (time-post-begin ?ses)) (<= (currenttime) (+ (min-poster-duration) (time-post-begin ?ses)))) :effect(and (picture-taken-poster ?ses ?loc) (increase (currenttime) 30)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; FIX-POSTER : Fix a poster ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action FIX-POSTER :parameters(?loc - location ?ses - post-session) :precondition(and (robot-at ?loc) (registered) (not (poster-fixed ?ses ?loc)) (>= (currenttime) (- (time-post-begin ?ses) 300)) ; we can fix poster 5 min before session (<= (currenttime) (+ (time-post-begin ?ses) 120)) ; we permit to be 2 min late... (>= (battery-level) (* 120 (energyconsumed-per-second))) ) :effect(and (poster-fixed ?ses ?loc) (increase (currenttime) 120) (decrease (battery-level) (* 120 (energyconsumed-per-second))) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; REMOVE-POSTER : Remove the poster that we previously fix ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (:action REMOVE-POSTER :parameters(?loc - location ?ses - post-session) :precondition(and (robot-at ?loc) (poster-fixed ?ses ?loc) (>= (currenttime) (+ (time-post-begin ?ses) (min-poster-duration))) ; poster has to be fixed for a minimum duration (<= (currenttime) (+ (time-post-begin ?ses) (+ (min-poster-duration) 3600))) ; poster can be fixed 1h more that min duration (>= (battery-level) (* 120 (energyconsumed-per-second))) ) :effect(and (not (poster-fixed ?ses ?loc)) (poster-done ?ses ?loc) (increase (currenttime) 120) (decrease (battery-level) (* 120 (energyconsumed-per-second))) ) ) ) |