-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New test and example plus changed test in yaml file to use right vers…
…ion of up-enhsp for testing purposes
- Loading branch information
Enrico Scala
committed
Oct 10, 2024
1 parent
fc12ae3
commit 168c1b5
Showing
4 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
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
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
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,73 @@ | ||
;; Enrico Scala ([email protected]) and Miquel Ramirez ([email protected]) | ||
(define | ||
(domain car_nonlinear_mt_sc) | ||
|
||
(:predicates | ||
(engine_running) | ||
(engine_stopped) | ||
) | ||
|
||
(:functions | ||
(d) | ||
(v) | ||
(a) | ||
(drag_coefficient) | ||
(max_acceleration) | ||
(min_acceleration) | ||
) | ||
|
||
(:action accelerate | ||
:parameters () | ||
:precondition (and (< (a) (max_acceleration)) (engine_running) ) | ||
:effect (increase (a) 1.0) ;; | ||
) | ||
|
||
(:action stop_car | ||
:parameters () | ||
:precondition (and (> (v) -0.1) (< (v) 0.1) (= (a) 0.0) (engine_running)) | ||
:effect (and | ||
(assign (v) 0.0) | ||
(engine_stopped) | ||
(not (engine_running)) | ||
) | ||
|
||
) | ||
|
||
(:action start_car | ||
:parameters () | ||
:precondition (engine_stopped) | ||
:effect (and | ||
(engine_running) | ||
(not (engine_stopped)) | ||
) | ||
) | ||
|
||
|
||
(:action decelerate | ||
:parameters () | ||
:precondition (and (> (a) (min_acceleration)) (engine_running)) | ||
:effect (decrease (a) 1.0) ;; | ||
) | ||
|
||
(:process displacement | ||
:parameters () | ||
:precondition (and (engine_running) (> (v) 0)) | ||
:effect (increase (d) (* #t (v))) | ||
) | ||
|
||
(:process moving_acceleration | ||
:parameters () | ||
:precondition (engine_running) | ||
:effect (and | ||
(increase (v) (* #t (a)) ) ;; velocity changes because of the acceleration | ||
) | ||
) | ||
(:process drag_ahead | ||
:parameters () | ||
:precondition (and (engine_running) (> (v) 0)) | ||
:effect (and | ||
(decrease (v) (* #t (* (* (v) (v)) (drag_coefficient) ) ) ) ;; velocity changes because of the acceleration | ||
) | ||
) | ||
|
||
) |
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,24 @@ | ||
;; Enrico Scala ([email protected]) and Miquel Ramirez ([email protected]) | ||
|
||
(define (problem instance_1_300_01_100) | ||
(:domain car_nonlinear_mt_sc) | ||
|
||
(:init | ||
(= (d) 0.0) | ||
(= (v) 0.0) | ||
(engine_stopped) | ||
(= (a) 0.0) | ||
(= (max_acceleration) 1) | ||
(= (min_acceleration) -1) | ||
(= (drag_coefficient) 0.1) | ||
(= (max_speed) 10.0) | ||
) | ||
|
||
(:goal | ||
(and | ||
(>= (d) 29.5 ) | ||
(<= (d) 30.5 ) | ||
(engine_stopped) | ||
) | ||
) | ||
) |