(:action RECHARGE :parameters(?where - location) :precondition(and (robot-at ?where) (registered) (rechargeable-place ?where) ) :effect(and (assign (battery-level) (max-battery-capacity)) (increase (currenttime) 3600) ) ) |
(define (problem generated-problem) (:domain ScientificConference) (:objects [...] ) (:init [...] (= (battery-level) 133.0) ; current battery level [...] ) (:goal (and (presentation-done pressession0 StandRoom_1) (>= (battery-level) 400) )) ) |
../Metric-FF/ff -o ScientificConf.pddl -f test_battery1.fct -E 0: GOTO STARTPLACE REGISTRATION 1: REGISTER REGISTRATION 2: GOTO REGISTRATION FRONTROOM_1 3: GOTO FRONTROOM_1 FRONTROOM_2 4: GOTO FRONTROOM_2 FRONTROOM_3 5: GOTO FRONTROOM_3 FRONTCOFFEEROOM 6: GOTO FRONTCOFFEEROOM COFFEEROOM 7: GOTO COFFEEROOM COFFEEROOM_CHARGER 8: RECHARGE COFFEEROOM_CHARGER 9: GOTO COFFEEROOM_CHARGER COFFEEROOM_COFFEE 10: GOTO COFFEEROOM_COFFEE P23 11: GOTO P23 P21 12: GOTO P21 FRONTROOM_2 13: GOTO FRONTROOM_2 FRONTROOM_1 14: GOTO FRONTROOM_1 STANDROOM_1 15: WAIT-PRES-SESSION PRESSESSION0 16: MAKE-PRESENTATION STANDROOM_1 PRESSESSION0 Time to plan : 20.32s |
../Metric-FF/ff -o ScientificConf.pddl -f test_battery1_nav.fct -E 0: GOTO STARTPLACE REGISTRATION 1: REGISTER REGISTRATION 2: GOTO REGISTRATION COFFEEROOM_CHARGER 3: RECHARGE COFFEEROOM_CHARGER 4: GOTO COFFEEROOM_CHARGER STANDROOM_1 5: WAIT-PRES-SESSION PRESSESSION0 6: MAKE-PRESENTATION STANDROOM_1 PRESSESSION0 Time to plan : 5.40s |
First version (ScientificConf_exRecharge.pddl) |
Final Version (ScientificConf.pddl) |
(:action RECHARGE :parameters(?where - location) :precondition(and (robot-at ?where) (registered) (rechargeable-place ?where) ) :effect(and (increase (battery-level) (- (max-battery-capacity) (battery-level))) (increase (currenttime) 3600) ) ) |
(:action RECHARGE :parameters(?where - location) :precondition(and (robot-at ?where) (registered) (rechargeable-place ?where) ) :effect(and (assign (battery-level) (max-battery-capacity)) (increase (currenttime) 3600) ) ) |
Here, we increase battery-level by the difference needed to reach maximum capacity |
Here we assign the battery-level to his maximum capacity |
[eric@localhost projet]$ ../Metric-FF/ff -o ScientificConf_exRecharge.pddl -f test_battery1_nav.fct -E checking for cyclic := effects --- OK. ff: search configuration is best-first on 1*g(s) + 5*h(s) where metric is plan length advancing to distance: 60 all increasers applied yet goal not fulfilled. |