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 06-11-2013
Cristian Ramirez Cristian Ramirez is offline
Flexsim User
 
Join Date: Dec 2012
Location: Vancouver, BC
Posts: 6
Downloads: 9
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 0
Cristian Ramirez is on a distinguished road
Default 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  
Old 06-12-2013
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

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  
Old 06-12-2013
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

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


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.