Inequalities

99 views
Skip to first unread message

Jesús Vázquez

unread,
Jul 2, 2015, 4:45:45 PM7/2/15
to fast-d...@googlegroups.com
Hello 

Im new in planning, and I am trying to generate a domain with some inequalities in a precondition. But  the module does not recognize the inequality symbols "<>". Does Fast Downward support those kind of operations?

Thanks

Malte Helmert

unread,
Jul 2, 2015, 6:05:25 PM7/2/15
to fast-d...@googlegroups.com
Dear Jesús,

the PDDL syntax to express that ?x and ?y should be unequal is:

(not (= ?x ?y))

Cheers,
Malte

Jesús Vázquez

unread,
Jul 3, 2015, 7:15:47 AM7/3/15
to fast-d...@googlegroups.com
Thank you for your answer I mean I'm trying to use this 

( <  (arrival ?arr) (departure ?dep)  ) 

and I have the definition of those function as

(departure ?flight)
(arrival ?flight)

However I got the following from the parser

Undeclared predicate: <

Thank you!

Malte Helmert

unread,
Jul 3, 2015, 7:57:49 AM7/3/15
to fast-d...@googlegroups.com
On 03.07.2015 01:00, Jesús Vázquez wrote:
> Thank you for your answer I mean I'm trying to use this
>
> ( < (arrival ?arr) (departure ?dep) )
>
> and I have the definition of those function as
>
> (departure ?flight)
> (arrival ?flight)
>
> However I got the following from the parser
>
> Undeclared predicate: <
>
> Thank you!

Ah, I see. No, Fast Downward does not support these; in general, it
doesn't support any kind of numerical conditions. Numbers may only be
used to define action costs. (The precise language fragment supported is
called "PDDL level 1 with action costs".)

There are other planners that support features like these, such as
Temporal Fast Downward, Metric-FF and LPG. My knowledge of these is a
bit out of date, so maybe someone else reading here can make a better
recommendation. If it's possible to post a complete PDDL example from
the domain you want to model, this could help too, as all planners have
different limitations regarding language support.

Cheers,
Malte

Jesús Vázquez

unread,
Jul 7, 2015, 3:24:06 PM7/7/15
to fast-d...@googlegroups.com
Thank you for your answer I am posting the PDDL and also try those planners you had mentioned. Thank you for your help!

The domain is as follows:

(define (domain travelplanner)

    (:requirements :typing :action-costs :fluents)

    (:types location flight)

    (:predicates

        (connection ?origin - location ?destination - location ?fly - flight)

        (at ?loc - location)

        (ft ?f - flight))

    (:functions


        (cost ?origin - location ?destination - location ?fly - flight )

        (time ?origin - location ?destination - location ?fly - flight )

        (comfort ?origin - location ?destination - location ?fly - flight )

        (arrival ?f - flight)

        (departure ?f - flight )


        (total-cost) )


    (:action go

        :parameters (?o ?d - location ?fd ?fa - flight)

        :precondition (and (at ?o)

        (ft ?fd)

        (< ( arrival ?fa ) (departure ?fd) )

        (connection ?o ?d ?fa)

    )


    :effect ( and (at ?d)

    (ft ?fa)

    (not (at ?o))

    (not (ft ?fd))

    (increase (total-cost) (cost ?o ?d ?fa) )

    (increase (total-cost) (time ?o ?d ?fa) )

    (increase (total-cost) (comfort?o ?d ?fa) )

)

)

)

William Cushing

unread,
Jul 13, 2015, 12:28:37 PM7/13/15
to fast-d...@googlegroups.com
How this problem has historically been "solved" --- I suppose  I should say worked around --- is to manually/automatically generate the necessary predicate.

That is, you can output (in each problem file) quadratically many facts of the form:

(before flight1 flight2) ;; if (arrival flight1) < (departure flight2)

Not sure if FD supports explicitly stating that things start false; if so, it might be convenient to also explicitly output the other half of the predicate:

(not (before flight2 flight1))

You might prefer some variation on a name like "can_transfer".

-Will


--
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.
For more options, visit https://groups.google.com/d/optout.

Mike Joung

unread,
Mar 7, 2020, 10:42:52 AM3/7/20
to Fast Downward
Hi,
I was searching for a solution to a similar problem for the implementation of a planning problem in pddl to run in fast-downward:
The problem is the stacking container problem, similar to the blocks world problem, but with some important differences, in particular, the height of blocks stacks cannot be higher than a number n (in my case, n = 4).
Thus I at first defined a function (height ?r) , where ?r stands for the tower, the stack of blocks, and check for the predicate ( < (height ?r) 4 ) getting the error: 'undefined predicate: <', since fast-downward does not support fluents, except for cost-function evaluation.
I tried to apply the method you suggested in the previous answer to this post, but I am getting some errors, I think caused by an uncorrect implementation of your method.
Could you help me to understand what should be the right way to apply it in order to solve my problem?

If it could be helpful, I report the link to online pddl editor with the implementation of the pddl files I am working on: http://editor.planning.domains/#read_session=GKD1FNtUQ7

Thank you in advance.
Best regards
To unsubscribe from this group and stop receiving emails from it, send an email to fast-d...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages