question

Daniel C avatar image
0 Likes"
Daniel C asked Rohan V3 commented

Heat map gradient

Quick question,

If I'm using Heat Maps, you can see the color differences.

How do I translate those colors to numbers?

Is there a table I can look up or am I missing something?

Thanks

FlexSim 18.1.1
forkliftheat map
5 |100000

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

1 Answer

Joshua S avatar image
1 Like"
Joshua S answered Rohan V3 commented

All the data found for the heatmap is found in the tree under the "extraData" node


pic1.png (81.5 KiB)
· 5
5 |100000

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

Zahra Z avatar image Zahra Z commented ·

@Joshua S Is this also applicable for FleXSim healthcare? Also, I sue version 21-2 and do not see this information.

1632174753058.png

0 Likes 0 ·
1632174753058.png (24.9 KiB)
Joshua S avatar image Joshua S Zahra Z commented ·
Yes, you have to dig deeper into the tree structure, click the right pointing arrow button to the left of the AStarNavigator node
0 Likes 0 ·
Rohan V3 avatar image Rohan V3 commented ·
@Joshua S

I am trying to look at the total traversals per grid. How do I get the extradata into a table? I am not able to access the total traversals per grid.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Rohan V3 commented ·

The nodes are of the "Simple Data Type". You can use the command "getsdtvalue()" to read data from them. Although be aware that the developers do not guarantee compatability for future versions as the data format inside the node might change.

https://docs.flexsim.com/en/21.1/Reference/CodingInFlexSim/CommandReference/Commands.html

Here's an example code that sums up the traversals per grid and writes them to "GlobalTable1".

treenode extraData = Model.find("AStarNavigator>stats/extraData");
Table tab = Table("GlobalTable1");

// Reset Table
tab.setSize(1, 1);
tab[1][1] = 0;

// Count traversals per grid
for(int index = 1; index <= extraData.subnodes.length; index++)
{
   int grid = getsdtvalue(extraData.subnodes[index], "Grid");
   double traversals = getsdtvalue(extraData.subnodes[index], "totalTraversals");

   while(tab.numRows < grid)
   {
      tab.addRow();
      tab[tab.numRows][1] = 0;
   }

   tab[grid][1] += traversals;
}
0 Likes 0 ·
Rohan V3 avatar image Rohan V3 Felix Möhlmann commented ·
@Felix Möhlmann Thanks this worked!
0 Likes 0 ·