Closed GiugAles closed 4 months ago
Figured it out in the meantime. It is actually quite easy:
passenger = UserType("passenger")
stop = InstantaneousAction("stop", f=floor)
p = Variable("p", passenger) # create a "loop" variable
stop.add_effect(
# fluent omitted
# value omitted
forall=(p,), # make the variable a tuple
condition=And(
And(boarded(p), destin(p)),
And(Not(boarded(p), serverd(p))
)
)
Second forall
can be added with an additional add_effect
Closing
Hey everyone,
First of all a big thank you! This project has helped me a lot on getting started on the topic.
Secondly, I am not sure if this is the correct place to ask the question, but I have found no other address. Sorry if this is not the place to ask.
I dug through the documentation, the examples and the code, but I was not able to find out how to use
forall
withadd_effect
as done in this PDDL example:Obtained from here
The PDDL reader of this project seems to able to transform it correctly into the model.
Any pointer or examples are much appreciated
Cheers, Alessandro