Mandatory actions #466
-
Hi, I have a question regarding the library, I am trying to solve a problem where I need a mandatory intermediate step. I have an object that can go from point A to point B and from point A to point C, the object when it goes to point C when it is not full and if it is full it should go to point B and wait. The planner understands that going to point B is inefficient and waits at point A. Is there any way to force it to go through point B before going to point C? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @antoniojbm ! one common way of "forcing" a specific behavior is to add a Boolean fluent (or multiple fluents) recording the interesting parts of the plan (in your example, visit B) and force it in the goal (e.g. goal = "be in C" and "if you are empty, you visited B"). If you post your model I can be more concrete. |
Beta Was this translation helpful? Give feedback.
-
I have been working on the problem and I think I have a way but I need to know if you can use "if" in the effects of an action. |
Beta Was this translation helpful? Give feedback.
Hi @antoniojbm
A possible solution that comes to my mind is to model the concept of "you want to free
pos0
as soon as possible". Maybe @hstairs or @mikand can propose other/better solutions.So, here is the code I did, slightly modified, that implements this solution.
This is done by:
pos0
is empty (decreasing it every time a vessel leavespos0
).pos0
is not empty.I also removed all the part that were not necessary for the planning an…