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 |
#1
|
|||
|
|||
Two Questions:about networknode and dispatcher
Question 1:
How can I get the object that a specific networknode is attached to with a blue line? Question 2: When I created a coordinatedtasksequence with several Dispatcher, how can i know the Operator or TaskExecuter that the current task is allocate to? And I do not acquaint myself with the relationship between executerkey and the executer. //Here is the script refered in the users manual at 'Coordinated Task Sequences' treenode ts = createcoordinatedtasksequence(operatorteam); int opkey = insertallocatetask(ts, operatorteam, 0, 0); int forkliftkey = insertallocatetask(ts, forkliftteam, 0,0); int traveltask = insertproxytask(ts, opkey, TASKTYPE_TRAVEL, forkliftkey, NULL); insertsynctask(ts, traveltask); insertproxytask(ts, forkliftkey, TASKTYPE_MOVEOBJECT, opkey, forkliftkey); insertproxytask(ts, forkliftkey, TASKTYPE_TRAVEL, loadstation, NULL); insertproxytask(ts, forkliftkey, TASKTYPE_LOAD, item, loadstation); insertproxytask(ts, forkliftkey, TASKTYPE_TRAVEL, unloadstation, NULL); insertproxytask(ts, forkliftkey, TASKTYPE_UNLOAD, item, unloadstation); insertproxytask(ts, forkliftkey, TASKTYPE_TRAVEL, forkliftteam, NULL); insertproxytask(ts, forkliftkey, TASKTYPE_MOVEOBJECT, opkey, model()); //For example, I want to get the operator moved to model. What can I do? insertdeallocatetask(ts, forkliftkey); insertdeallocatetaskyts, opkey); dispatchcoordinatedtasksequence(ts); Thanks for your attention. |
#2
|
|||
|
|||
1) Use:
ownerobject(tonode(getnodenum(rank(getvarnode(<netnode>,"stations"),<stationrank>)))); Be aware that the network node can be connected to a number of stations, and that it has an internal connection to itself as a station which is usually rank 1. 2) One way would be to give the operator TASKTYPE_NODEFUNCTION and pass in a flexscript node (eg. a label or variable) as involved1. Make sure involved2 is NULL and then in the Flexscript code on the node (label/variable) the operator will be found with parnode(1): moveobject(parnode(1),model())); Last edited by Jason Lightfoot; 10-28-2010 at 11:37 AM. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Hao Zhou (02-15-2012) |
#3
|
||||
|
||||
1) Also note that you can use the getnetnode() command to go the other way, to get the network node connected to the station:
getnetnode(Queue5,1) will return NN2. |
#4
|
|||
|
|||
Quote:
getallocatedfromkey(obj coordtasksequence, num key) in your flexscript code |
Tags |
dispatcher, networknode |
Thread | Thread Starter | Forum | Replies | Last Post |
Dispatcher: PassTo-option | Benjamin Diehl | Q&A | 4 | 03-03-2011 11:31 AM |
Time Table for Dispatcher/Transporter | shafizad | Q&A | 5 | 10-25-2010 10:42 AM |
How to recognize the transporter dispatched by a dispatcher? | Frans Zeng | Q&A | 1 | 05-15-2010 10:02 PM |
Working Logic of Dispatcher | AlanZhang | Q&A | 6 | 02-09-2009 10:38 AM |
Dispatcher and staytime problem | Lin Jincong | Q&A | 2 | 01-15-2009 08:35 PM |