question

Choi Hyun Woong avatar image
1 Like"
Choi Hyun Woong asked Choi Hyun Woong commented

How to recalculate the route after establishing a path for a deadlock in an AGV?

Hello, I have several questions about AGV.

TaskExcuter1(TE1) is going to CP4 from CP1.

TaskExcuter2(TE2) is going to CP1 from CP4.

CP8 and CP9 are both control points on the shortest path between TE1 and TE2.

TE1 and TE2 are deadlocked for TE2 to allocate to CP8 after TE2 arrives at CP9.

Set CP8 to the block state (AGV.RoutingConstraint.Blocked) and recalculate the path in TE2.

The calculated route is the path from CP4 to CP1 without going through CP8.

(The content has been revised.)

That path is not the shortest route.

I want the TE2 to go from CP7 past CP8 to CP1. (That's the route around deadlock I want.)

Question1) How to recalculate the route after establishing a path for a deadlock in an TE2?


1689578039203.png

1689580497817.png

1689581214623.png

In addition, I have a question about "Route Around Deadlock" codes.

Question2) Why is the 71th command not being executed?

await preemptAGV.te.event("OnAGVPreAllocate");

The above command was not executed, so I did it with the command below.

await Delay.seconds(0);


RouteAroundDeadlock1.fsm

FlexSim 23.1.2
agvrouting
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kavika F avatar image Kavika F ♦ commented ·
Hey @Choi Hyun Woong, I can't seem to open the model you attached. Could you please reupload it? I have some ideas about what could be happening but it would help to confirm with your model. Thank you!
0 Likes 0 ·
Choi Hyun Woong avatar image Choi Hyun Woong Kavika F ♦ commented ·

Thank you! I did reupload model.

0 Likes 0 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered Choi Hyun Woong commented

Hey @Choi Hyun Woong, for your first concern of the AGV not taking the shortest path, I believe it's because of the location of the Control Point 7 (CP). The paths were arranged in a way that the CP was on the curved path rather than the intersection between the 3 paths. If you adjust the paths and CP slightly, you can see the correct behavior.

correctedcp.gif

routearounddeadlock1_1.fsm

As for your second question, I am a little confused. The line you're talking about was commented out, so it would not execute. After uncommenting the line and commenting out the other await you added, it seemed to work fine. Is there something I'm missing? Thank you.


· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Choi Hyun Woong avatar image Choi Hyun Woong commented ·

Thank you for your reply.

The model you uploaded has the CP8 slightly moved to the CP9. Therefore, CP8 is no longer an intersection.

The crux of the problem is how to ensure that TE2 are allocated CP8 in the event of situation in which the deadlock is resolved. (TE1 are deallocated CP8)

My idea is to recalculate the route when TE2 arrives at another CP.

Upload a model with the logic I think.

1689821356901.png

If you have any other ideas, please suggest them.

RouteAroundDeadlock1-1.fsm

And Question2 is resolved.

The command below is also executed in my uploded model.

await preemptAGV.te.event("OnAGVPreAllocate");

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Choi Hyun Woong commented ·
This certainly is one way to ensure CP8 is allocated; however, I don't know how scalable this would be.
0 Likes 0 ·
Choi Hyun Woong avatar image Choi Hyun Woong Kavika F ♦ commented ·

You are correct.

The algorithm I thought might not work in certain situations.

So I'd like to know if anyone has a general algorithm that is scalable.

Thank you!

0 Likes 0 ·
Show more comments