question

Arno Chan avatar image
3 Likes"
Arno Chan asked Felix Möhlmann commented

How to show the heat map by myself?

I know the heat map in the A* module, but it works with the AStarNavigator.When I use the AGV module, I can't draw the heat map in the model. How do I learn to do it? Please give me some suggestions ,thanks very much.

FlexSim 18.1.2
heat map
· 4
5 |100000

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

David Seo avatar image David Seo commented ·

@Arno Chan

Heat map feature is not supported in AGV module. It is only supported in A* navigator.

1 Like 1 ·
Arno Chan avatar image Arno Chan David Seo commented ·

I know it. My mean is that I want to find a method to do it, but I'm completely at a loss the know what to do. Thanks all the same, please forgive my poor English.

Thank you!

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Arno Chan commented ·

Hi @Arno Chan,

I searched FlexSim's command reference and FlexScript's API reference and it appears that there is no method that can directly access the heat map.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

Perhaps you start a search in the old community forum. It won’t be easy to use an old module for an actual version. But if you need it, you can try it. And there isn’t a guarantee that it will work with another module together. Otherwise you can install an older version of a FlexSim Version to collect additional data and combine it with data of a current model version.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
6 Likes"
Matthew Gillespie answered Felix Möhlmann commented

You could technically do this, but it's going to be a big project and possibly beyond your programming skills (depending on your comfort level with coding).

First, you'll want to learn how to draw the heat map visuals. FlexSim provides several different ways to draw things in the 3D view like the draw commands ( like drawrectangle() ) and the mesh commands.

Second, you need to get the data you want the heat map to display. That might be the number of times an object's used a particular path. You'll probably have to use triggers to store the data somewhere.

Finally, you need to determine what to draw based off what the data you gathered is. For example, draw a red line under the path when more than 50 objects cross the path.

If you're still interested in doing this feel free to ask separate questions about specific aspects of what you're trying to do, like "How do I draw a red square?".

· 18
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Attached is a model showing the principle when just tracking the centre locations of travelers.

To add it to your model:

  1. Drop the red cylinder (heat mapper) into your model (copy/paste)
  2. Add objects you want tracked to a Group called "HeatMapMembers"
  3. Run the model.

Some configuration is possible through label values:

1656850272772.png

  • heatInterval - the sample frequency in model units
  • resolution - the divisions of the base length unit. eg. 2 per metre, so 0.5m

It would still benefit from further refinement of the footprint and customisation of color map.

HeatMapAnything.fsm

Update: Version with ColorPalette below:

HeatMapAnything2.fsm

5 Likes 5 ·
Jon Abbott avatar image Jon Abbott Jason Lightfoot ♦♦ commented ·
Thanks for posting the "heat map anything" example, @Jason Lightfoot. This is exceedingly useful!
1 Like 1 ·
Leandro Hgds avatar image Leandro Hgds Jason Lightfoot ♦♦ commented ·

Is there a way to put a different path color for each operator present in the model?

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Leandro Hgds commented ·
This could probably be accomplished. The only thing is that this is not a heat map. You would want to look at the code that draws the path but not the part that has it change color over time.
0 Likes 0 ·
Show more comments
Iago MF avatar image Iago MF Jason Lightfoot ♦♦ commented ·

Hi @Jason Lightfoot

How can I adapt this to a model in milimeters? I've tried to use this, but tiles are so small that they are almost invisible. I've applied a factor in On Draw Trigger code, but it only change the visual size, but tiles kept really small.

Thanks in advance!

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Iago MF commented ·

I think my mistake is making the divperunit an integer in the updateMap code (label).

Change it to a double and set the resolution to 0.001 and it should work without draw code modifications:


1696251627749.png

HeatMapAnything2_millimetres.fsm

A resolution of 0.002 will give 4 tiles per square metre.

1 Like 1 ·
1696251627749.png (9.8 KiB)
Show more comments
Show more comments