AGV does not arrive at destination after redirecting

AGV does not arrive at destination after redirecting

patrick_zweekhorst
Collaborator Collaborator
354 Views
5 Replies
Message 1 of 6

AGV does not arrive at destination after redirecting

patrick_zweekhorst
Collaborator
Collaborator

[ FlexSim 22.0.1 ]

Hi,

I have created an example model in which the AGV does not arrive at its final destination (all the way on the right). While traveling to this location the AGV is redirected twice. The problem does seem to be related to this redirecting. Is there any good solution or work around for this?

Thank you for any tips.

Patrick

Redirect_1.fsm

0 Likes
Accepted solutions (1)
355 Views
5 Replies
Replies (5)
Message 2 of 6

ryan_c10
Not applicable
Hi @Patrick Zweekhorst,

I'm not sure why the redirects are causing issues, but when I removed the second redirect (redirecting to Control Point 5), it worked properly. I assume that the issue is arising because of the relative timing of the redirect command and the travel task causing them to conflict/overwrite each other.

0 Likes
Message 3 of 6

patrick_zweekhorst
Collaborator
Collaborator
It definitely has to do with the second redirect, but I don't think it is just an unlucky timing. I had the same problem in my actual model and had no problems in recreating it here. It would be highly appreciated if someone from the development team could take at this.
0 Likes
Message 4 of 6

ryan_c10
Not applicable
@Jordan Johnson @anthony.johnson @Phil BoBo @Matthew Gillespie Would someone on the dev team be able to take a look at this question? Thanks!
0 Likes
Message 5 of 6

philboboADSK
Autodesk
Autodesk
Accepted solution

You give the AGV a task to travel to CP2. Then you give the AGV a task to travel to CP3. Then, shortly after the AGV starts that travel task, you redirect it to CP4 with a CONTINUE_ON_PRE_ARRIVAL.

Then, in the middle of that PreArrival event that is being processed (before it has even finished), you fire code without a breathe that redirects him again to CP5, which will start him traveling towards CP5 once he traverses past the next point.

At this point, he now tries to finish his code that was trying to travel to CP4 as part of the first redirection, and his internal state is all kinds of messed up because you (1) never let him arrive and (2) redirected him before he even finished his first redirection.

Thus, he thinks he's done redirecting because he is trying to finish his first redirection, as the call stack unwinds. And thus, he never gets back to traveling to CP3 because his internal state is in total disarray from getting his functions called all out of order.

Suggestion for a workaround? Before the second redirect, breathe for the duration of time that the AGV requires between his current PreArrival event and his next traversal event so that the AGV can finish processing the first redirection and get back to traveling to CP3 before you redirect him again.

redirect_2.fsm (In this particular model, the amount of time needed to breathe is 1.0 seconds, but if you change the AGV's speed/acceleration/deceleration settings, then that value is going to be different because that will change when the PreArrival event fires relative to the next traversal event.)

Suggestion for a solution? Stop all this crazy preempting and redirection and give him tasks to go where you want him to go when you want him to go, using the end speed of the travel task to determine whether he continues traveling at full speed or whether he slows to a stop between travel tasks.



Phil BoBo
Sr. Manager, Software Development
Message 6 of 6

patrick_zweekhorst
Collaborator
Collaborator
Hi @Phil BoBo ,

Thank you for your clear and extensive explanation. I will take a better look at this after my business trip.

0 Likes