question

martin.j avatar image
0 Likes"
martin.j asked Logan Gold commented

Resetting the Heat Map during model run

We have been using the heatmap to monitor trafic to and from a production, but that traffic changes significantly based on the production batches, and so it would be cool to see the difference between different batches by resetting the Heatmap completely on batch changeover.

I tried resetting the extraData node and heatMapTotalTraversals values in the A* Stats, but that just causes a crash.

1723021858560.png
Is there a trick or applicationcommand to reset the heatmap without resetting the model?

FlexSim 24.1.0
astarresetheat map
1723021858560.png (21.1 KiB)
· 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.

Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @martin.j, was Jason Lightfoot's answer helpful? If so, please click the "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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Felix Möhlmann edited

There's no supported api for this. You could try this script:

Object nav=Model.find("AStarNavigator");
Array nodes=stats(nav).subnodes["extraData"].subnodes.toArray();
while (nodes.length){
    setsdtvalue(nodes.pop(),"totalTraversals",0);
}
stats(nav).subnodes["heatMapTotalTraversals"].value=0;
· 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.

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

You could also have a look at Jason's Heat Map Anything object. Since you have full access to all code there, it should be easier to customize.

1 Like 1 ·