NTNUJAVA Virtual Physics Laboratory (Java Simulations in Physics)
November 23, 2008, 02:54:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This site host hundreds of physics related java simulations under create common license. All registered user will be able to get files for offline use when user login and view the simulation. Switch to this new system on 2007/02/14. (previous system2001-2007, 1996-2001) ,Check out Chinese forum to find more simulations and resources in Chinese.
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 5
  Print  
Author Topic: Traffic Light System  (Read 277437 times)
0 Members and 3 Guests are viewing this topic.
Fu-Kwun Hwang
Administrator
Hero Member
*****
Posts: 1162



WWW
« on: January 29, 2004, 09:48:02 AM »

Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME
There are 13 translations,
or


Due to so many requests from the users, source code for this applet is distributed with the ZIP files you will receive if you click get file for offline use button. Please do not ask me to send you the source code again!
Would you like to engineer the traffic light system for a one-way street that consists of several lanes along which rush-hour traffic flows?
How would you time the onset of green lights at the various intersection?
How to promote the traffic flow? This java applet let you play with it.




You are welcomed to check out Ejs version of traffic control simulation,too.


How to play it:

  1. The traffic lights at interactions are for cars moving from left to right. The traffic on the perpendicular streets can only move when light is RED.

  2. You can change the period of each light

    1. clicking the traffic light at the top-left cornor
    2. the number near each color is the period for that particular light (second)
    3. left/right mouse click will decrease/increase one second
    4. ( for MAC user, click between light and number to the right to increase the length of time)

  3. parameter controls
    each click to the arrow at left/right of the number will decrease/increase
    the parameter by 1 unit.

    1. delay time
      control near the traffic light controls the delay of the onset of green light at the interaction relative to that at prevous ntersection.
    2. max Velocity control represents the speed limit¡]Vmin=5, Vmax= 50¡^
    3. acceleration control represents the acceleration for the car when it speeds up.¡]Amin=1 , Amax=20¡^

  4. TextField values

    1. T¡Gtime in second after pressing the start button
    2. N1/N2/flow rate¡G total number of cars passes intersection (N1:left-right/N2:up-down)
      flow rate=(N1+N2/3.)/T
    3. n1/n2/flow rate¡G number of cars passes intersection during last minute.
      flow rate=(n1+n2/3.)/60


  5. Color code for car
    1. yellow: accelerating (A>0.)
    2. green: moving with constant speed (include stopped) A=0.
    3. red: stopping (A<0.)


  6. Velocity of each car is represented by a blue dot.

  7. A new function has been added to help you determine the delay time between traffic lights.
    Click the right mouse button to suspend (the animation).
    The time intervals (for the first car ) during which the signals are green/yellow/red
    1. are represented by thin (colored)lines at one side of the road.

    A blue curve represent x-t (displacement verse time) for the first car is shown.
    Use that curve with those color intervals to adjust the delay time between
    traffic lights. Click the right mouse button again to resume.

Observation:

  1. Suppose a platoon is stopped at interaction. When the green light comes on, there is a "start-up wave" travels from the leader along the length of the platoon at a speed vs.
  2. How to adjust parameters to increase the traffic flow?
    1. adjust timing of each light
    2. adjust delay time control
    3. adjust Vmax
    4. adjust A(acceleration)

Think of it! Play with it! I hope you do learn some physics from this applet.

If you click the right mouse button in the simulation, you will see a curve similar to the following figure (Hints to adjust the traffic flow)

I have created another version of traffic light control applet with EJS and you can view how it was implemented with EJS(You can find the code).


Registed user can get files related to this applet for offline access.
If java program did not show up, please download and install latest Java RUN TIME
There are 13 translations,
or
« Last Edit: June 08, 2008, 10:46:52 AM by Fu-Kwun Hwang » Logged
Guest
« Reply #1 on: July 07, 2004, 08:09:16 PM »

[size=24][size=18]
      [size=24]Hello all,

      I am on here wondering if anyone reading this know where I can find a website that will teach me how to read a caliper. I need to learn this for a job I am applying for.

      Sincerely

      Robert[/[/b
      [/color][/size][/size]]
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #2 on: April 17, 2005, 01:18:06 PM »

      If you want to know how to read a cliper.
      Please check out the following URL
      http://www.phy.ntnu.edu.tw/ntnujava/viewtopic.php?t=69
      Logged
      xingweiping
      Newbie
      *
      Posts: 1


      « Reply #3 on: May 04, 2005, 12:30:35 PM »

      Thanks so much for sharing the source code with us. actually we currently have a group project which is very similar to this, but we just totaly have no idea about it. until I found your site via google. what a day! your applet is very inspirational and we are so enlighted! Cheesy :idea:
      Logged
      karthik_kotee
      Newbie
      *
      Posts: 1


      « Reply #4 on: September 15, 2005, 11:58:01 PM »

      sir could i get the source code(.java file) for the traffic system
      Logged
      vipin_ajmera
      Newbie
      *
      Posts: 1


      « Reply #5 on: September 20, 2005, 04:54:53 PM »

      plz can u give me source code of traffic light system
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #6 on: September 21, 2005, 07:19:27 AM »

      Both of you you have received the source code in your email account.
      Logged
      lopa
      Newbie
      *
      Posts: 5


      « Reply #7 on: September 25, 2005, 06:45:00 PM »

      Sir/mam,
      plz give me the source code of this applet,using this topics,traffic light system.
      ok, thanks,
      Logged
      primanox
      Newbie
      *
      Posts: 1


      WWW
      « Reply #8 on: September 27, 2005, 09:47:17 AM »

      I love this simulation. You did an excellent job! Could you please send me the source code? I would really like to see how you accomplished this. Thank you!
      Logged
      hadi_telkom
      Newbie
      *
      Posts: 1

      science


      « Reply #9 on: September 30, 2005, 10:58:46 AM »

      your traffic simulatioin is very good
      may I get it, please.............
      Logged

      saya seorang mahasiswa teknik telekomunikasi POliteknik Negeri Bandung ( POLBAN ). Butuh informasi seputar elektronika dan telekomunikasi.
      wurakeem
      Newbie
      *
      Posts: 1


      « Reply #10 on: October 01, 2005, 06:34:22 AM »

      I like your simulation.
      is it possible to have the source code?

      thanks.
      Logged
      joe
      Newbie
      *
      Posts: 1


      « Reply #11 on: October 08, 2005, 12:07:08 AM »

      This is a very good simulation.
      I like it very much.
      May I take the source code please?
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #12 on: October 18, 2005, 08:58:13 AM »

      Source code has been sent.
      Logged
      lifeline
      Newbie
      *
      Posts: 1


      « Reply #13 on: October 20, 2005, 05:42:08 AM »

      hi,
      it was gud to see ur traffic simulator . I would like to learn how u did it . Could u plz mail me the code .

      Thanks.
      Logged
      avir
      Newbie
      *
      Posts: 1


      « Reply #14 on: October 21, 2005, 06:04:19 AM »

      I also would like to get a copy of the source.
      Logged
      eniss
      last year bachelor
      Newbie
      *
      Posts: 1

      IT, internet, books


      « Reply #15 on: November 02, 2005, 11:44:55 PM »

      Dear Sir,

      we are a group of 3 studens, having a project at university, similar to this one. could you please send us source code for learing purposes. if possible. if no, thanks anyway for a great site
      Logged
      Mohamed shahab PK
      Newbie
      *
      Posts: 2


      « Reply #16 on: November 03, 2005, 07:30:03 AM »

      Hello I also need a source code of this applet
      Logged
      jmiyasato
      klj
      Newbie
      *
      Posts: 1

      klj


      « Reply #17 on: November 08, 2005, 08:28:06 AM »

      could i have the code for the traffic simulation plz===?Huh? javiermiy@gmail.com thx!!!!!!
      Logged

      kl
      v_lotay
      Newbie
      *
      Posts: 3


      « Reply #18 on: November 11, 2005, 06:17:14 AM »

      Your simulation is great, I was wondering if it would be possible to get the source code,

      v_lotay@hotmail.com
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #19 on: November 11, 2005, 10:19:05 AM »

      You should have received source code in your email account.
      Logged
      v_lotay
      Newbie
      *
      Posts: 3


      « Reply #20 on: November 12, 2005, 01:16:49 AM »

      I'm sorry I haven't received the source code, could you please send it to me again. My e-mail address again is v_lotay@hotmail.com, infact try sending it to vaneet.lotay@gmail.com as well just in case the first one doesn't work.

      Thank you, I appreciate it, sorry for the inconvenience.
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #21 on: November 12, 2005, 10:27:28 AM »

      I sent the files to the above two email accounts again.
      Logged
      v_lotay
      Newbie
      *
      Posts: 3


      « Reply #22 on: November 13, 2005, 05:16:40 AM »

      Thanks I received files in both e-mail accounts.
      Logged
      brixchin21
      Newbie
      *
      Posts: 1


      « Reply #23 on: November 13, 2005, 02:12:57 PM »

      please send me also the source code. plz! thanks anyway!

      cloysterspam@yahoo.com
      Logged
      beachlinum
      Newbie
      *
      Posts: 1


      « Reply #24 on: November 14, 2005, 01:13:12 AM »

      hey thats acool work, i love it, can i have the source code? and i was wondering if u can help me in doing somtin smillar to this work, by doing high way with cars genarating by poisson distrubution to make the cars genaration more relaistic> can u help me on that please???
      my email is musiclinum@hotmail.com plus the one regitered in my profile
      Logged
      Fu-Kwun Hwang
      Administrator
      Hero Member
      *****
      Posts: 1162



      WWW
      « Reply #25 on: November 14, 2005, 09:46:58 AM »

      You can d it by yourself with the source code I sent you!
      Logged
      suszyh
      Newbie
      *
      Posts: 1


      « Reply #26 on: November 14, 2005, 03:58:36 PM »

      It is nice simulation demo. May i know what kind of message passin machenism u use in this simulation? Do u have conceptual model for it?


      I will appreciate your help if u could send the code and conceptual model to me. suszyh@hotmail.com since i I haven't received the source code.

      thanks
      Logged
      ajay arora
      student
      Newbie
      *
      Posts: 1


      « Reply #27 on: November 14, 2005, 09:22:14 PM »

      Hi ...plz include me also for sending the source code asap !! plzz
      thanx
      Logged
      Kwanda
      Newbie
      *
      Posts: 1


      « Reply #28 on: November 14, 2005, 11:30:35 PM »

      I love this simulation.excellent job! Could you please send me the source code? I would really like to see how you accomplished this. Thank you! rui.jesus@gapi.co.mz
      Logged
      gigispeed1332
      Newbie
      *
      Posts: 1


      « Reply #29 on: November 15, 2005, 09:04:55 PM »

      I really liked this program u made is their anyway i can get the source code, we are working on a project in class similar to this simulating the movement of a line in a bank. I was wondering if I could see how you accomplished this. Thanx a bunch.

      email = gigispeed1332@yahoo.ca/handyk13@hotmail.com
      Logged
      Pages: [1] 2 3 ... 5
        Print  
       
      Jump to:  

      Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!