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 10-28-2010
actualliu actualliu is offline
Flexsim User
 
Join Date: Oct 2010
Posts: 1
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
actualliu is on a distinguished road
Smile 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.
Attached Thumbnails
Click image for larger version
Name:	Q1.jpg
Views:	615
Size:	38.6 KB
ID:	1172  
  #2  
Old 10-28-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

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  
Old 10-28-2010
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

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  
Old 10-28-2010
Normand Côté Normand Côté is offline
SNC-Lavalin GTS
 
Join Date: Aug 2007
Location: Montreal, Canada
Posts: 17
Downloads: 21
Uploads: 0
Thanks: 1
Thanked 24 Times in 13 Posts
Rep Power: 170
Normand Côté will become famous soon enough
Default

Quote:
Originally Posted by Jason Lightfoot View Post
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()));
You can also pass ts, opkey and forkliftkey as parameters in TASKTYPE_NODEFUNCTION and retreive allocated resources with
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


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.