Closed cdondrup closed 8 years ago
This problem should also be solved now. Thanks for spotting it.
The plan is now correctly created. Given:
goto_forward; say_hello
and
*if* failed *during* goto *do* restart_action
*if* robot_dist_far *during* say *do* restart_plan
I get:
Thank you!
To circumvent the issue in #10 and test the execution rules, I tried to remove the durations from my linear plan. This now simply looks like this:
with the execution rule
Looking at the generated plan
you can see that the interrupt is incorretly added to the
say
action instead of thegoto
. Changing the rule toProduces the following error:
The line numbers might not be the same as in the current version of the file because I made some minor changes but I believe that the error lies here: https://github.com/iocchi/PetriNetPlans/blob/master/PNPgen/src/pnpgenerator.cpp#L331 by calling
next
twice I guess that you compensate for the fact that there are additional connecting places and transitions due to the concurrent wait action and the required fork operator. If there is no wait action, these places are missing and, therefore, the rule is applied two places to the right of the place it should be applied to. If there are no additional places to the right, this results in above segfault. Hence, when trying to interrupt thegoto
action it applies it to thesay
action and when interrupting thesay
action it runs into undefined memory because the plan ends before it finds a place.