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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2010
Thirapan Kangwansura Thirapan Kangwansura is offline
Flexsim User
 
Join Date: Jan 2010
Location: Thailand
Posts: 5
Downloads: 12
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 0
Thirapan Kangwansura is on a distinguished road
Default 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;
Click image for larger version

Name:	Traffic_sim.jpg
Views:	297
Size:	157.4 KB
ID:	973

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
Reply With Quote
  #2  
Old 05-17-2010
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 679
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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.
Reply With Quote
The Following User Says Thank You to Steven Hamoen For This Useful Post:
Thirapan Kangwansura (05-17-2010)
  #3  
Old 05-17-2010
Thirapan Kangwansura Thirapan Kangwansura is offline
Flexsim User
 
Join Date: Jan 2010
Location: Thailand
Posts: 5
Downloads: 12
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 0
Thirapan Kangwansura is on a distinguished road
Default

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;
Click image for larger version

Name:	traffic.jpg
Views:	185
Size:	110.4 KB
ID:	974

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.
Reply With Quote
  #4  
Old 05-17-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 515
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

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."
Reply With Quote
The Following 4 Users Say Thank You to Tom David For This Useful Post:
Ilivid zheng (12-25-2010), Sebastian Hemmann (05-18-2010), Steven Hamoen (05-18-2010), Thirapan Kangwansura (05-18-2010)
  #5  
Old 05-17-2010
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: 314
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

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
Reply With Quote
The Following 4 Users Say Thank You to Sebastian Hemmann For This Useful Post:
David Chan (05-17-2010), Steven Hamoen (05-18-2010), Thirapan Kangwansura (05-18-2010), Tom David (05-18-2010)
  #6  
Old 05-18-2010
Thirapan Kangwansura Thirapan Kangwansura is offline
Flexsim User
 
Join Date: Jan 2010
Location: Thailand
Posts: 5
Downloads: 12
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 0
Thirapan Kangwansura is on a distinguished road
Default

I think I can model as I want.
Thank so much for your guidance.

I've faced with another issue about using Recorder to show standard data on conveyor.

I configured it but it does nothing.
Can I use Recorder to show conveyor statistics?
Click image for larger version

Name:	recorder.jpg
Views:	180
Size:	101.0 KB
ID:	981

Any help is appreciated.
Reply With Quote
  #7  
Old 05-18-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 515
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default 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."
Reply With Quote
The Following 2 Users Say Thank You to Tom David For This Useful Post:
Phil BoBo (05-19-2010), Thirapan Kangwansura (05-19-2010)
Reply

Tags
conveyor, traffic

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 11:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.