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

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

pert_p
Not applicable
12 Views
1 Reply
Message 1 of 2

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

pert_p
Not applicable

[ FlexSim 22.0.1 ]

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?

0 Likes
Accepted solutions (1)
13 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Observer
Observer
Accepted solution

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").name);
   current.setColHeader(i, Group("NetworkNodes").name);
   for(int j = 1; j <= Group("NetworkNodes").length; j++)
   {
      current = getnetworkdistance(rankfromnetnode(Group("NetworkNodes")), rankfrom      netnode(Group("NetworkNodes")));
   }
}

NetworkDistances_fm.fsm

0 Likes