question

Flavia P2 avatar image
0 Likes"
Flavia P2 asked Ben Wilson commented

Custom routing algorithm in python for AGVs simulation

Hello everyone,

I'm trying to understand if it's possible to have AGVs in a simulation navigate according to a custom routing algorithm developed in an external application (e.g. python or c++)? I know that Flexsim already has a library with A* navigation algorithm, but my idea is to apply a custom navigation algorithm to the AGVs. I tried to see if there was a similar question but with no luck.

If you could help me with an example or documentation it would be great.

Thank you

FlexSim 19.0.0
flexsim 19.0.0agvscustom navigation
· 1
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Flavia P2, was Phil BoBo's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered

You can connect to custom C++ code using the Module SDK or DLL Maker. See Bitbucket has stopped with Mercurial, where did the FlexSim SDK go? - FlexSim Community

If you want to make your own Navigator, you can subclass the Navigator using the Module SDK and implement its virtual functions yourself.

See Example Module Class (flexsim.com) for an example of sub-classing the Processor. You can do the same with a Navigator.

Alternatively, you could just call into your own routing function to get a list of destinations, and then give your travelers tasks to travel to each of those destinations while connected to one of the existing navigators (Default, Network, AGV, A*). Then you can use their existing mechanisms for handling travel tasks but use your own path finding algorithm instead of the shortest-path algorithm that each of the default navigators use.

5 |100000

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