question

Vallaban G avatar image
0 Likes"
Vallaban G asked Jason Lightfoot edited

How to get the network nodes connected to a network node ?

to-get-nnodes-connected-to-nnode.png

FlexSim 23.1.2
network nodes
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
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Use outObjects[n] as you would for other FlexSim objects. So you can discover how many are connected using:

myNN.outObjects.length

Keep in mind that they do not correspond to inObjects of network nodes and so a connection between two nodes is actually two output connections - one from each node.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

I assume you want to get evaluated the coupling nodes marked in your picture and get their ownerobjects of the attribute value that is connected to NN2. The result is a pointer to a Network Node object inside the model tree structure.

https://answers.flexsim.com/answers/88980/view.html

This answer is dealing with a different coupling structure, but I think you get an idea how to implement it to your case.

A coupling node value is a pointer to a node in an attribute sub tree of an object. You want to get the topmost node of this object attribute tree, which is the object itself. Therefore you call the command ownerobject of this attribute pointer.

5 |100000

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