ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
||||
|
||||
How to refer to an inactive taskexecuter by the red-line connected network node
For example, several TEs are running on a network which is constructed by several NNs. At a certain time, for instants, I would like to know who is inactive at NN3. Is there a direct way to refer to the TE by its red-line connected NN? I do not want to use On Arrival and On Continue triggers in NN.
Thanks a lot! |
#2
|
|||
|
|||
One way would be to check the TEs to see which TEs are idle and determine which are red-line connected to NN3 using gettenetnode().
|
The Following User Says Thank You to Danny Pavan For This Useful Post: | ||
Hao Zhou (02-16-2012) |
#4
|
||||
|
||||
Hello Hao,
the node number can you get with the command getnodenum(node in the tree) - I have selected this node as "Designiate this node (so) from the context menu > edit" This number is a reference to the node described as the string ("/Operator4>variables/navigator/1") To Build a pointer use the command tonode(from a number) Now you have the reference to a node in the attribute tree of the operator4 To get the reference to the root object use the command ownerobject( node obj). To show that this works you can use Code:
getname(ownerobject(tonode(getnodenum(so())))); |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Hao Zhou (02-16-2012) |
#5
|
||||
|
||||
Hi Joerg,
Thanks for your reply. In my previous reply, I showed two images. In the first image, I make a red circle for the rank number. Is there a way to write some code in order to get the rank number? With this number, I can find the TE. Thanks, Hao Last edited by Hao Zhou; 02-16-2012 at 06:21 PM. |
#6
|
||||
|
||||
Hello Hao,
instead of "gename(ownerobject(....))" use "getrank(up(...))". I have designated one of your circled nodes as (so) and the following code row gives you the desired rank: Code:
getrank(up(tonode(getnodenum(so())))) |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Hao Zhou (02-17-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
problem of TaskExecuter queue in line | Wen Hsing Huang | Q&A | 9 | 06-27-2013 01:47 PM |
How to set dynamicaly closing node edge in a network node | Preethi Sivaramakrishnan | Tips and Tricks | 8 | 06-27-2013 01:35 PM |
How can I get the NetworkNode connected to the TaskExecuter with a "red" connection line? | Frans Zeng | Q&A | 1 | 08-30-2011 07:42 PM |
Network Node Error | Ryan Haferbecker | Q&A | 2 | 11-24-2010 12:05 PM |
Release from Network Node | Gavin Douglas | Q&A | 2 | 06-12-2008 12:39 PM |