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
|
|||
|
|||
Accessing TrafficControl object from travelers
Hello,
Is there a way to know (from the traveler point of view) which is the trafficControl object that is controlling the area the traveler is in? I would like to change the "Max. Number in Area" of the controlled area (increasing by one) when a traveler goes into breakdown status. I am using the MTTR/MTBF tool to generate random breakdowns events and sometimes the breakdown happens within a contolled area, preventing other travelers to get into the area, and continue traveling. Increasing the capacity of the area by one during the breakdown event should solve the temporary blocking. Thanks in advance Cheers Cristian FYI. Travelers are rear dump trucks moving material between two locations. |
#2
|
||||
|
||||
Hi, I would create a numberlabel on every TE and write a pointer to the actual active Trafficcontrol in it. So everytime your truck changes the area you only have to update the pointer in this label. And your Breakdown code can reference to this label too.
__________________
Hemmi |
The Following User Says Thank You to Sebastian Hemmann For This Useful Post: | ||
Cristian Ramirez (06-12-2013) |
#3
|
|||
|
|||
Assuming that you have no overlapping areas...
Code:
if(content(stored(traveler))) { treenode trafficctrl = ownerobject(tonode(get(first(stored(traveler))))); inc(getvarnode(trafficctrl,"maxactive"),1); } |
The Following 2 Users Say Thank You to Kris Geisberger For This Useful Post: | ||
Sebastian Hemmann (06-13-2013) |
Thread | Thread Starter | Forum | Replies | Last Post |
How to close ports of an object when a condition is true on another object? | Abdul Mirza | Q&A | 2 | 04-17-2013 09:42 PM |
TrafficControl | Fernando Igor | Q&A | 3 | 09-25-2009 03:09 PM |
Questions of TrafficControl ? | Li Chin | Q&A | 0 | 01-15-2009 07:32 AM |
Accessing Data of a Recorder and Referencing Nodes in the Tree | Jan Brandau | Q&A | 5 | 04-22-2008 07:05 AM |
How to control path of travelers on network route? | qin tian | Q&A | 4 | 02-20-2008 04:01 AM |