question

Lars Jacobsen avatar image
0 Likes"
Lars Jacobsen asked Jeanette F commented

How to make AStar cache paths?

When I run a model using Astar, the Paths Cached are zero. Are there any particular requirements to make AStar cache paths?

The issue is that according to the performance profiler AStar search new paths uses approx. 99.99% of the model computing time.


1657180464785.png

FlexSim 22.1.2
astar navigator
1657180464785.png (27.3 KiB)
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

Just in case: Have you clicked on Apply and/or OK after checking that option?

Does it work in other models (such as the one below)?

PathCachingTest.fsm

0 Likes 0 ·
pathcachingtest.fsm (78.0 KiB)
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Lars Christian J2, was one of anthony.johnson's or Lars Christian J2's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 ·
anthony.johnson avatar image
0 Likes"
anthony.johnson answered

Are you using dynamic barriers? A* cannot cache paths if you have any code that adds dynamic barriers. The path caching mechanism must be able to create a tuple key that is based on the set of active conditional rules. It cannot create such a key if there are dynamic barriers, so it must recalculate every single time. If the set of possible dynamic barriers is sufficiently small, you should use conditional rules instead of dynamic barriers. If the number of possible dynamic barriers is too large to use conditional rules, then path caching would be useless anyway because it would almost never be able to reuse the same cached path because every possible configuration of dynamic barriers would require its own key, and that could overload your memory.

5 |100000

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

Lars Jacobsen avatar image
0 Likes"
Lars Jacobsen answered Ralf Gruber commented

I have clicked Apply after checking the option. Caching works fine in your model, but not in my model. Unfortunately I cannot share my model as it is confidential. Thus I was hoping that someone knows if there is any special requirements which needs to be meet for the caching to work.

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
Not that I know.

Any idea what might be the issue here @anthony.johnson?

0 Likes 0 ·
Ralf Gruber avatar image Ralf Gruber ♦ Felix Möhlmann commented ·
Lars,

The GUI shows zero Paths Cashed, but also zero Paths Requests...are you sure the TEs using A-Star have done any transports? Or was the screenshot taken after reset?

0 Likes 0 ·