Arithmetic expression in action preconditions

28 views
Skip to first unread message

Luca Faraoni

unread,
Jun 21, 2021, 2:56:21 AM6/21/21
to Fast Downward

Hi all and nice to meet you.
Someone knows if it is possible to write arithmetic expression inside actions preconditions?
Something like this:

(:action load
    :parameters (?f - freight ?v - vehicle ?l - location)
    :precondition (and
        (at1 ?f ?l)
        (at2 ?v ?l)
        (>= (maxLoad) (+ (load ?v) (weight ?f)))
    )
    :effect (and
        (in ?f ?v)
        (increase (load ?v) (weight ?f))
    )
)

For now i got this error: b'Undeclared predicate: >=\n'
Thanks for help!!
Cheers,
Luca

Florian Pommerening

unread,
Jun 21, 2021, 11:48:52 AM6/21/21
to fast-d...@googlegroups.com
Dear Luca,

Fast Downward is a classical planner and does not cover numerical
variables. There are two options to deal with this:

1) If your numerical variables only allow a small finite number of
distinct values, you can model each value as an object. For example, see
how the height of a tower is implemented in the domain TERMES:
https://github.com/aibasel/downward-benchmarks/blob/master/termes-opt18-strips/domain.pddl

2) If option 1 is not practical, you can try a numerical planner. I
suggest asking on the planning slack channel for good suggestions:
https://theplanningcommunity.slack.com/

Cheers
Florian
> --
> You received this message because you are subscribed to the Google
> Groups "Fast Downward" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to fast-downwar...@googlegroups.com
> <mailto:fast-downwar...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fast-downward/d9a7d160-f1d9-43a8-a5b2-e8d51743b47dn%40googlegroups.com
> <https://groups.google.com/d/msgid/fast-downward/d9a7d160-f1d9-43a8-a5b2-e8d51743b47dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages