How to make AStar cache paths?

How to make AStar cache paths?

lars_jacobsen_ScandiSim
Advocate Advocate
204 Views
6 Replies
Message 1 of 7

How to make AStar cache paths?

lars_jacobsen_ScandiSim
Advocate
Advocate

[ FlexSim 22.1.2 ]

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

0 Likes
Accepted solutions (1)
205 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Advocate
Advocate

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
Message 3 of 7

lars_jacobsen_ScandiSim
Advocate
Advocate

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.

0 Likes
Message 4 of 7

moehlmann_fe
Advocate
Advocate
Not that I know.

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

0 Likes
Message 5 of 7

ralf_gruber
Collaborator
Collaborator
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
Message 6 of 7

anthony_johnsonT83CM
Autodesk
Autodesk
Accepted solution

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.

0 Likes
Message 7 of 7

Jeanette_Fullmer
Community Manager
Community Manager

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