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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
How to use conveyor to build traffic flow simulation model
I modeled the traffic flows using Conveyor object.
I would like to know how to set the flowitems to start and stop running at the junction. (as a traffic signal) I show you a model I built as follows; This is flexsim file I built http://www.4shared.com/file/jmAkt_SW/SUT_Traffic.html My purpose for this simulation is to find the ways to reduce Staytime at the junction by implementing the traffic signal and see how effect when vary the time of the signal. Thanks for your support |
#2
|
||||
|
||||
Hi,
Have you done some searching? Because there are some other posts and there is a model in the download section. Anyway, you can use the traffic control object or use commands like closeoutput or even stopobject. |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Thirapan Kangwansura (05-17-2010) |
#3
|
|||
|
|||
I did some seaching and tried to use openoutput and closeoutput commands.
I added another source and connect to centerport with conveyor to repeatedly run (as a signal time) and command it at OnExit. The result shows as follows; What's wrong with my model. Would you mind reviewing my model as attached. SUT_Traffic.zip Any help is appreciated. Thanks so much in advance. |
#4
|
||||
|
||||
Thirapan,
I had a look into your model and in general I guess I understand what you are trying to do. But in detail it is difficult to understand, because it is not really organized. First of all, I would give all objects names to identify what objects they are. Like Source_LL_LaneMain, Conveyor_LL_LaneMain, Sink_LL_LaneMain. I also would organize the tree. This would be the first steps to make it for other people easier to understand your model. The next step I would do is using Global Variables as Pointer to the Conveyor Objects. Conveyor_LL_LaneMain would become the Global Variable Name LL_Lane_Main. The idea behind it is that the code is getting clearer. I do not know what centerobject(current,1) is, but I know which object is LL_Lane_Main. In a way I like your idea to use a Source to make the control of the conveyors, but I guess here is the origin that your model is not working as you want it to work. I did not test it, but you use an Arrival Schedule which repeats. First product arrives at time 0, second at time 50. You did not define a third Arrival when the Repeat of the Schedule should happen, so it happens directly after the second one. I am pretty sure this is not what you intend to do. Like Steven said, I would also use a UserCommand (called by a UserEvent) or just a UserEvent to have all code for the traffic control at one place. Sometimes I use a VisualTool to have the code for the control in an object and use mainly the OnMessageTrigger and send delayed messages to control the objects. Anyway, the main idea using a UserEvent is that this UserEvent gets repeated. Let’s say we have three situations. I would use a Global Variable to define the Situation. My situations are not logic now, because I just like to explain the main idea. Situation 1: LL is green. RL is red. RC is green Situation2: LL is red. RL is green. RC is red. Situation3: LL is green. RL is green. RC is green. So in the UserEvent you change the Global Variable for the Situation. Let’s say we start with Situation1, so next time you set it to Situation2 and next time to 3 and then start with 1 again. Depending on the situation you open and close the conveyor. If Situation 1 than open LL, close RL and open RC If Situation 2 than close LL, open RL and close RC etc. The repeat time of the UserEvent is when your Situation is changing. If there are different times, you need more UserEvents. I hope you get the main idea. Good success with it.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
The Following 4 Users Say Thank You to Tom David For This Useful Post: | ||
Thirapan Kangwansura (05-18-2010) |
#5
|
||||
|
||||
Tom,
the idea to use Situations for realizing a model of traffic controll is really the easiest way. Because even the traffic lights normaly work with allways reapeted Situations Greetings
__________________
Hemmi |
The Following 4 Users Say Thank You to Sebastian Hemmann For This Useful Post: | ||
Tom David (05-18-2010) |
#7
|
||||
|
||||
Recorder shows no graph data
I guess what is missing in your case is that you need to switch the Object Graph Data on.
Select the objects you want to collect additional data (STRG + MouseClick = red box). Go in the menu to Statistics / Object Graph Data / Selected Objects On. If you take the tick away at Hide Green Indicator Boxes, your objects should have a green box now (if not hidden by the red box), which indicates, that for this object additional data are collected. I checked the help file Recorder and Output Tab Pages and there is no hint on this page. I also checked the Recorder help page in the help file and can’t find it either. I think it would be a good idea if there is a hint on these pages that the Object Graph Data need to be switched on.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
The Following 2 Users Say Thank You to Tom David For This Useful Post: | ||
Thirapan Kangwansura (05-19-2010) |
Tags |
conveyor, traffic |
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with Build All Flexscript | Bill Lank | Q&A | 4 | 11-11-2009 01:38 PM |
Road traffic | mallik | Q&A | 3 | 09-25-2009 12:55 PM |
Newbie in need of help for school project on school bus simulation model | Jason Lim | Q&A | 3 | 09-18-2009 06:16 AM |
What is the difference between a Conveyor and Basic Conveyor | shivrash | Q&A | 2 | 07-21-2009 04:09 AM |
Modeling Traffic Flow | DavidStun | Pre-sales Questions | 2 | 03-11-2009 11:35 AM |