question

Richard G avatar image
0 Likes"
Richard G asked Richard G commented

Multiprocessor Individual Process Names

Is there a getname() equivalent to grab individual multiprocessor names? If not, does someone have code that would let me reference these names? Thanks in advance!

FlexSim 16.1.2
multiprocessormultiple flow items
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

jing.c avatar image
2 Likes"
jing.c answered Richard G commented

Hi @Richard G

You can try to use getname(rank(getvarnode(node("MultiProcessor1", model()), "optable"), X)); which X is the index of Individual Process.


1.png (40.3 KiB)
· 3
5 |100000

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

Richard G avatar image Richard G commented ·

Thank you for your reply @jing.chen . Your code works to an extent, however, the process names under variables>optable do not update if the user sets a name within a multiprocessor properties box. For example:

However, the process names do update within the tree under stats>state_profiles>profile, but 'getvarnode' does not work for fetching these names. Would it be possible to modify your code to work with nodes under the stats section of an object's tree? How would that work? I've tried 'getstat' but that won't return a valid path to the state_profiles node. Example demonstrating where I'm talking about in the tree:

0 Likes 0 ·
capture1.jpg (46.9 KiB)
capture2.jpg (66.0 KiB)
jing.c avatar image jing.c Richard G commented ·

Hi @Richard G

The data in this node is bundle datatype, you can just use getbundlevalue() to obtain it as pic below

1 Like 1 ·
1.png (64.4 KiB)
Richard G avatar image Richard G jing.c commented ·

'getbundlevalue' does the trick! Thank you @jing.chen

0 Likes 0 ·