ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 02-15-2012
Hao Zhou's Avatar
Hao Zhou Hao Zhou is offline
Flexsim User
 
Join Date: Sep 2010
Location: Long Beach
Posts: 66
Downloads: 56
Uploads: 0
Thanks: 78
Thanked 43 Times in 25 Posts
Rep Power: 146
Hao Zhou will become famous soon enoughHao Zhou will become famous soon enough
Default 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  
Old 02-15-2012
Danny Pavan Danny Pavan is offline
Flexsim User
 
Join Date: Aug 2007
Location: Work: Hamilton, Ontario, Canada
Posts: 34
Downloads: 30
Uploads: 0
Thanks: 70
Thanked 38 Times in 17 Posts
Rep Power: 179
Danny Pavan will become famous soon enoughDanny Pavan will become famous soon enough
Default

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)
  #3  
Old 02-15-2012
Hao Zhou's Avatar
Hao Zhou Hao Zhou is offline
Flexsim User
 
Join Date: Sep 2010
Location: Long Beach
Posts: 66
Downloads: 56
Uploads: 0
Thanks: 78
Thanked 43 Times in 25 Posts
Rep Power: 146
Hao Zhou will become famous soon enoughHao Zhou will become famous soon enough
Default

Hi Danny,

Thanks for your reply. Actually, I just want to understand data reference mechanism between DefaultNetworkNavigator and Network Node.

Click image for larger version
Name:	2-15-2012 2-21-37 PM.png
Views:	85
Size:	11.0 KB
ID:	1680
Image above show NN2 has two inactive TEs. The numbers I marked with red circle shows the rank of the TE in DefaultNetworkNavigator's traveler member list which is marked in the image below.
Click image for larger version
Name:	2-15-2012 2-23-37 PM.png
Views:	84
Size:	11.1 KB
ID:	1681

The problem is I do not know how to refer to the inactive TE by the information in NN.

Thanks!
  #4  
Old 02-16-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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()))));
Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Hao Zhou (02-16-2012)
  #5  
Old 02-16-2012
Hao Zhou's Avatar
Hao Zhou Hao Zhou is offline
Flexsim User
 
Join Date: Sep 2010
Location: Long Beach
Posts: 66
Downloads: 56
Uploads: 0
Thanks: 78
Thanked 43 Times in 25 Posts
Rep Power: 146
Hao Zhou will become famous soon enoughHao Zhou will become famous soon enough
Default

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  
Old 02-17-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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()))))
Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Hao Zhou (02-17-2012)
  #7  
Old 02-17-2012
Hao Zhou's Avatar
Hao Zhou Hao Zhou is offline
Flexsim User
 
Join Date: Sep 2010
Location: Long Beach
Posts: 66
Downloads: 56
Uploads: 0
Thanks: 78
Thanked 43 Times in 25 Posts
Rep Power: 146
Hao Zhou will become famous soon enoughHao Zhou will become famous soon enough
Default

Hi Joerg,

Thank you very much! Problem solved!


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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.