question

ksugai avatar image
0 Likes"
ksugai asked Sam Stubbs commented

How to customize AGV module

I want to replace part of the logic of the AGV module with my own. For example, I want to change the way the routing table is calculated.

However, I can't see the contents of the AGV.dll file and I don't know how to do it. Could you please give me some advice? Thank you.image.png

FlexSim 24.0.0
agv module
image.png (12.3 KiB)
· 3
5 |100000

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

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

The AGV.dll is not accessible to users.

However, you can create an array of control points on a Process Flow token and use the AGV travel task activity to utilize those points. (Either looping through a single AGV travel in a subflow, or multiple sequentially in a block.)

Otherwise you can look at the documentation here for information on how to create a custom route:

https://docs.flexsim.com/en/24.1/Reference/Tools/AGVNetworkTool/AGVNetwork/AGVNetwork.html#customizationDelegate

0 Likes 0 ·
ksugai avatar image ksugai Sam Stubbs ♦ commented ·

I read the documentation for AGV Customization Delegate that you introduced.


I understand that if the algorithm can be expressed in the form of "minimizing the sum of costs along the route," then it is possible to customize the default logic by changing the definition of "cost."

On the other hand, it seems that it is not possible to change the algorithm to, for erxample, the following:

Determine the route by taking into account the time it takes for the AGV to turn.


Could you please provide the information required to override the route search method in AGV.dll?

In addition, could you please let me know what I should be careful of when overriding the default logic?

Thank you in advance.

0 Likes 0 ·
ksugai avatar image ksugai Sam Stubbs ♦ commented ·
I would appriciate if you could response to my comment.
0 Likes 0 ·

1 Answer

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

HI, I apologize for the turnaround time. Unfortunately, there isn't any way for users to directly modify / overwrite the AGV.dll, nor can we provide any information on how the AGV.dill works. It's just not accessible to users.


However, you should still be able to use the Route Cost method for your example situation:

"Determine the route by taking into account the time it takes for the AGV to turn."
If you use the Route Cost method in the General tab of the AGV Properties window, by checking the Divide By Speed box, the routing method will be determined taking into account curved path speeds and even AGV rotation speeds on non-curved paths.


AGVturnspeed.fsm



agvturnspeed.fsm (126.4 KiB)
· 3
5 |100000

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

ksugai avatar image ksugai commented ·

Thank you for your reply.

I understand that AGV.dll is just not accessible to users.


I have a question about the Divide By Speed box.

You mention that the routing method will be determined taking into account AGV rotation speeds on non-curved paths.

However, the correct route does not seem to be selected in the attached model.

agvRouting.fsm

image.png

➀When the AGV is given a task to travel to ControlPoint2, it selects the red paths and arrives at the destination in 25.72 seconds. If the position of a red path is slightly shifted and separated from the black path, the AGV reaches the destination in 26.03 seconds.

In this case, it can be confirmed that the fastest route is correctly selected.


➁When the AGV is given a task to travel to ControlPoint3, it selects the red paths and arrives at the destination in 31.99 seconds. If the position of a red path is separated from the black path, the AGV reaches the destination in 30.40 seconds.

In this case, even though the route that does not use the red paths is the fastest, the red paths are mistakenly used.


This is just my guess, but when the Divide By Speed box is checked, the route search method itself is not changed, and the definition of the cost in the getPathTravelWeight method is simply changed. In that case, a phenomenon like the attached model may occur.

When using a simple Dijkstra algorithm, if a route with a smaller total cost to a certain node is found, information about other routes to the node is lost.

To deal with cases like "The red route is the fastest to go to CP2, but when going to CP3, an additional rotation cost is incurred at CP2, so it is faster not to use the red route," it is necessary to store the cost to each node for each adjacent edge, so wouldn't it be necessary to change the route search method itself?

0 Likes 0 ·
image.png (103.2 KiB)
agvrouting.fsm (126.6 KiB)
Sam Stubbs avatar image Sam Stubbs ♦ commented ·
So I did some thorough testing on your sample model. After some further examination, it looks like the route cost IS taking into account rotation speed, however it seems like it is NOT taking into account acceleration speed. If you set your agv acceleration to very high (so as to eliminate it as a variable) the routing does seem to be accurately taking the correct paths divided by speed.


I'm not sure that this is a bug so much as a lack of clarity in the documentation on how the "divide by speed" is supposed to work. I've logged a ticket with the devs to into that.

Hopefully this helps.

0 Likes 0 ·
ksugai avatar image ksugai Sam Stubbs ♦ commented ·
Thank you for your reply.

I have confiremd that AGV chooses the fastest route when I set agv acceleration and agv deacceleration to very high in the model.

1 Like 1 ·