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 12-23-2010
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 get the objects on the edge between to networknode

For example, I have two networknodes, and these two networknodes are connected by an edge. There will be some transporters move along the edge. The problem is, how can I get the objects moving on the edge? Is there some function like getObjectsOnEdge(node num, node num)?

Thank you very much for your help!
  #2  
Old 12-23-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

you can get it from onarrive trigger
treenode traveler = parnode(1);

so you can setlabelnum(current,"traveler ",tonum(traveler ));
and then you get it.


perhaps jason can provide more easy way.

Last edited by LINWEIXU; 12-23-2010 at 06:22 PM.
The Following User Says Thank You to For This Useful Post:
Hao Zhou (12-23-2010)
  #3  
Old 12-23-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

First you need to find the 'active travelers' node for an edge which is :
treenode activetravelers= gettablecell(connectionsout(<netnode>),<edgenum>,PORT_ACTIVE));

So then content(activetravelers) tells you how many are travelling along the edge.

If you then choose <traveler number> to be a valid number up to the content, the traveler can be found with:
ownerobject(tonode(get(up(tonode(get(rank(rank(activetravelers,<traveler number>),2)))))))

Not less complex, but can be used anywhere with less setting up.
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
Ilivid zheng (02-20-2011)


Thread Thread Starter Forum Replies Last Post
Two Questions:about networknode and dispatcher actualliu Q&A 3 10-28-2010 01:43 PM
change the objects in self modeled objects Manuel Kraenzle Q&A 7 10-27-2008 02:29 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.