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

Flexsim Student Forum Forum for discussion for Flexsim Students using the Flexsim Textbook.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default Question about Traffic Light with conveyor

I have a tram model in Yogyakarta, Indonesia with FlexSim 5 for my final thesis. Conveyor is used to be a rail in this model. My model is modified model from Roller-coaster example model. And, my question is \"how I input Traffic Light within conveyor?\".

I want to download Highway Traffic example model on download link in this forum but it cannot be accessed anyway. And, I attach my model, unfinished model.

Regards,


Adhyaksa Bagaskara
Undergraduate student from Universitas Gadjah Mada
Attached Files
File Type: fsm Skripsi-v2 kurang persentase.fsm (536.1 KB, 546 views)
Reply With Quote
  #2  
Old 01-06-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 148
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hi,

You can use the traffic control object for controlling the flow within the conveyors.You can also use other commands like closeoutput along with openoutput or stopobject and resumeobject in the conveyors depending upon the content of downstream conveyors.

Last edited by sagar bolisetti; 01-07-2015 at 09:29 AM.
Reply With Quote
The Following User Says Thank You to sagar bolisetti For This Useful Post:
Adhyaksa Bagaskara (01-13-2015)
  #3  
Old 01-08-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 640
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Adhyaksa,

the conveyor is based on the Basic Conveyor Object. It isn't a member of the taskexecuter class. Therefore you cannot use the traffic control object on items traveling on the conveyor. But you can create a traffic control method with the decision points and the command bcsetitemconveystate(...). If the target speed cannot be set to zero then you can set the target speed to very slow value. That is not accurate but in most cases it will work with a little deviation in the statistical results.
Jörg
Reply With Quote
The Following 3 Users Say Thank You to Jörg Vogel For This Useful Post:
Adhyaksa Bagaskara (01-13-2015), arunkrmahadeva (01-08-2015), sagar bolisetti (01-09-2015)
  #4  
Old 01-08-2015
arunkrmahadeva's Avatar
arunkrmahadeva arunkrmahadeva is offline
CCS, India
 
Join Date: Sep 2013
Location: India
Posts: 71
Downloads: 67
Uploads: 0
Thanks: 285
Thanked 101 Times in 51 Posts
Rep Power: 142
arunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rougharunkrmahadeva is a jewel in the rough
Default

Dear Adhyaksa,

Adding on to Mr Jorg Vogel's post.I am attaching the Highway Traffic Model with this post, by studying this model you will get better ideas for solving your problem.

Regards,

Arun KR
Attached Files
File Type: zip X_Highway Traffic.zip (707.4 KB, 609 views)
Reply With Quote
The Following 2 Users Say Thank You to arunkrmahadeva For This Useful Post:
Adhyaksa Bagaskara (01-13-2015), Jörg Vogel (01-08-2015)
  #5  
Old 01-13-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default

Thank you very much Mr. Sagar Bolisetti, Mr. Jorg Vogel, and Mr. Arunkrmahadeva for your answers.
I have same idea with Mr. Jörg Vogel to use decision point because the conveyor in my model is BasicConveyor. But, I have one question again. How to fit traffic light time in flexsim?
I know the concept using bcsetitemconveystate. Or maybe the answer is using C++?

Thank you everyone for your attention.
Regards,


Adhyaksa Bagaskara
Reply With Quote
  #6  
Old 01-13-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default Reply

Thank you very much Mr. Sagar Bolisetti, Mr. Jorg Vogel, and Mr. Arunkrmahadeva for your answers.
I have same idea with Mr. Jörg Vogel to use decision point because the conveyor in my model is BasicConveyor. But, I have one question again. How to fit traffic light time in flexsim?
I know the concept using bcsetitemconveystate. Or maybe the answer is using C++?

Thank you everyone for your attention.
Regards,


Adhyaksa Bagaskara
Reply With Quote
  #7  
Old 01-14-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 640
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

You just need another event when the traffic light changes its state. You can send a delayed message and in the receiving object's OnMessage trigger you change the bcsetitemconveystate. If you have a static frequence in your traffic light system, you can compare the lasting state with the current run time before you compute the delay time of the message. The change in the traffic light system can you set with repeated user events.

Jörg
Reply With Quote
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
Adhyaksa Bagaskara (01-14-2015), Carsten Seehafer (01-15-2015)
  #8  
Old 01-15-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default Some question again

Thank you Mr. Jörg Vogel for your answer again. I have an idea using command stopobject(). I implement that method to stop tram with decision point onCover.

And there is a question with my idea. How i can resumeobject my tram with delayed time.

I use

/**Custom Code*/
treenode current = ownerobject(c);
treenode item = parnode(1);
int decisionpoint = parval(2);
double position = parval(3);

stopobject(current, STATE_BLOCKED);



and then my tram is stopped. And I am confused to resumeobject my tram with 30 seconds (maybe) after I stopobject that.

I am sorry I have many questions because FlexSim is too fun to study it and I am curious about Flexsim.

Thank you very much.

Regards,

Adhyaksa Bagaskara
a
Reply With Quote
  #9  
Old 01-15-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 148
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hi Adhyaksa

You should not use commands stopobject() and resumeobject() for the basic conveyor.
If you want to stop a BasicConveyor, use bcsetitemconveystate() on all the items to stop them. If you want to restart a BasicConveyor, use bcsetitemconveystate() on all the items to restart them.The only difference is that you have to change the target speed value.Use a senddelayedmessage() for the 30 second delay between stopping and resuming.Replace 'item' with 'fromobject' when you send the message, and then in the on message trigger use 'msgsendingobject' where you want to refer to the item.
Attached Files
File Type: fsm bconveyor_stop.fsm (14.9 KB, 471 views)

Last edited by sagar bolisetti; 01-20-2015 at 11:19 AM. Reason: add sample model
Reply With Quote
The Following 2 Users Say Thank You to sagar bolisetti For This Useful Post:
Adhyaksa Bagaskara (01-19-2015), Jörg Vogel (01-15-2015)
  #10  
Old 02-22-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default

Good afternoon all. I am sorry that I have not replied your message.
I have a question for Sagar Bolisetti. I have applied the code from your Flexsim file. But, my model is not using output port. So, after the "tram" stay at decision point for 30 seconds, that "tram" is reset to start position.

If you have any solution for this problem, I will thank you very much.
I am still stuck at this point.
Reply With Quote
  #11  
Old 02-23-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 148
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Can you post the model.
Reply With Quote
  #12  
Old 02-23-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default My model

Thank you, sir.
Here is my model.
This is modification from Roller Coaster mod in FlexSim Website.
And the decision point to stop the tram is "MerahTugu". And it's always come back to start point.
Attached Files
File Type: fsm Skripsi-v2 kurang persentase.fsm (705.8 KB, 473 views)
Reply With Quote
  #13  
Old 02-23-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 640
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Adhyaksa,

to the command bcsetitemconveystate belongs several parameters. One describes the starting position of the item you want to set. Probably you have set this value to zero or more likely the function returns zero. As you have done it, it is a good practice that this value is set to the last position on the conveyor. You use a command to evalute this position in the OnMessage trigger. But you can send this location already in the message telegram as a parameter. If there is a situation, that you want to test. Use several debug points in your message trigger or write relevant values to the output console from within the code.

2nd: At the precise photo eye you send a delayed message. As I described above you indeeed evaluate the second message parameter as the location on the conveyor. But you aren't sending this value. It isn't set.
Jörg

Last edited by Jörg Vogel; 02-23-2015 at 02:48 AM. Reason: write additional alternatives 2nd: research the model
Reply With Quote
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
Adhyaksa Bagaskara (02-23-2015), sagar bolisetti (02-23-2015)
  #14  
Old 02-24-2015
Zulay Sarmiento's Avatar
Zulay Sarmiento Zulay Sarmiento is offline
Flexsim User
 
Join Date: Mar 2014
Location: Barranquilla, Colombia
Posts: 9
Downloads: 1
Uploads: 0
Thanks: 9
Thanked 3 Times in 2 Posts
Rep Power: 0
Zulay Sarmiento is on a distinguished road
Smile Traffic light "my way"

Hello,
One time ago, i did a model with flexsim that uses traffic ligth, i did an object in a custom library, that consist in a visual tool with a processor, a sink and a source this three objects inside of the visual tool,
the source is conected to the processor and the processor to the sink, then the source send two tipe of items to the processor, one red, and one green, and the processor have a process time for each one, simulating the time of the traffic ligth, and when the processor finish, it send the item to the sink. the source is programed by sequence for repeat the change, green-red.
then i made a reference connection from the processor to the street(in this case a conveyor like the X_high_Way model), an "S" connection, and in the "on entry trigger", i programed that when a type of itemtype go inside of it, it close and open the port of the street, by the case.
I attach the compleete model, you can see it.
Attached Thumbnails
Click image for larger version

Name:	ScreenShot1.png
Views:	632
Size:	178.6 KB
ID:	2769  
Attached Files
File Type: zip traffic light.zip (3.81 MB, 475 views)
Reply With Quote
The Following 2 Users Say Thank You to Zulay Sarmiento For This Useful Post:
Adhyaksa Bagaskara (02-24-2015), sagar bolisetti (02-24-2015)
Reply

Tags
conveyor, light, traffic, tram

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
Right of way in a traffic controlled area Cristian Ramirez Q&A 2 11-13-2013 06:47 PM
Traffic Controll Uri Schtalheim Q&A 1 12-07-2011 10:58 AM
How to use conveyor to build traffic flow simulation model Thirapan Kangwansura Q&A 6 05-18-2010 11:40 PM
Road traffic mallik Q&A 3 09-25-2009 12:55 PM
Modeling Traffic Flow DavidStun Pre-sales Questions 2 03-11-2009 11:35 AM


All times are GMT -6. The time now is 08:31 AM.


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