question

Pert P avatar image
0 Likes"
Pert P asked Felix Möhlmann answered

Can I export distance metric from node to node to excel file?

In case of the model created network node and I want to export distance in form of From to Chart ( Distance between Node to Node) , I am not sure that Flexim can do it or not?

FlexSim 22.0.1
network nodesroutingexport data
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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

You can use the "getnetworkdistance" command to write the distances between the nodes to a global table. Then you export the global table through the excel import/export interface.

1646294913216.png

In the attached model I added all network nodes to a group in order to know how many there are and to have an easy ways of referencing them. The following code is written in the reset trigger of the "NodeDistances" global table and fills in the data into the table on each reset.

/**Custom Code*/
Table current = param(1); //Table node

current.setSize(Group("NetworkNodes").length, Group("NetworkNodes").length);
for(int i = 1; i <= Group("NetworkNodes").length; i++)
{
   current.setRowHeader(i, Group("NetworkNodes")[i].name);
   current.setColHeader(i, Group("NetworkNodes")[i].name);
   for(int j = 1; j <= Group("NetworkNodes").length; j++)
   {
      current[i][j] = getnetworkdistance(rankfromnetnode(Group("NetworkNodes")[i]), rankfrom      netnode(Group("NetworkNodes")[j]));
   }
}

NetworkDistances_fm.fsm


5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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