NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 19, 2017, 05:36:17 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Like what you dislike of those things are imortant. ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: 1 ... 4 5 [6] 7   Go Down
  Print  
Author Topic: Traffic Light System  (Read 583550 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #150 on: March 16, 2010, 11:24:55 pm » posted from:Taipei,T\'ai-pei,Taiwan

1. Car will accelerate (a=gu) until it reach maximum speed under the following condition:
  there is no car in front and it can pass the next street light before light turn red.
2. Car will de-accelerate(a=-gu) until it reach zero velocity if it is too close to the car just in front of it.
  The minimum distance is related to reaction time, dmin= V * treaction.
3. Car will keep at the same speed if it reach maximum speed.
  
  
Logged
mchetou82007
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #151 on: April 22, 2010, 11:51:11 pm » posted from:Bhopal,Madhya Pradesh,India

send me sourrce code
thanx
Logged
nitang
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #152 on: April 29, 2010, 11:43:29 pm » posted from:Bangalore,Karnataka,India

Sir,
I really liked your simulation.Even i am trying to simulate a traffic signal.But i am facing a problem in generating the random cars from all sides towards the junction and the repaint is confusing me a lot.Can you please help me out in my problem??
Logged
kidashley25
Newbie
*
Offline Offline

Posts: 4

«
Embed this message
Reply #153 on: June 08, 2010, 09:56:11 am » posted from:Quezon City,Quezon City,Philippines

hello does anybody here, know about -*-Turn Signal Switch? I really need some help.
Logged
wafiy
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #154 on: October 13, 2010, 01:59:53 am » posted from:,,Satellite Provider

can you please send me the code to my email address,-*-
i really2 do need that program for my project now,thanks Wink
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #155 on: October 13, 2010, 08:29:49 am » posted from:Taipei,T'ai-pei,Taiwan

The source code is available as attachment. You can download it by yourself if you really need it.
Please read the first message under this topic carefully and you will find out how to download it.
Logged
hanukaran
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #156 on: January 27, 2011, 12:08:46 am » posted from:Kuching,Sarawak,Malaysia

thank you for the idea sir.i have the file now.but the problem is im begginer.How to open this .php file.Which hav to use to open this file
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #157 on: January 27, 2011, 01:06:13 am » posted from:Uberaba,Minas Gerais,Brazil

To you access the applet you need to unzip the file that you download before, will find a web page name is trafficControl.html hit click using mouse,
You will be able to watch applet in your PC.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #158 on: January 27, 2011, 09:18:35 am » posted from:Taipei,T'ai-pei,Taiwan

If you just need to view it offline. Click get file for offline use and you should get .zip file.
Unzip it and open html file with your browser. (the instruction is available as email message  if you decided to received it via email.)

You can download the java source code,too!
The file you have download should be trafficControl.java instead of php file.
The file can be open with any text editor, it can be compiled into java class code.
Logged
ibpro
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #159 on: February 17, 2011, 12:31:35 am » posted from:Abuja,Federal Capital Territory,Nigeria

Thanks for the Traffic Control System.  It's beautiful.  I need to adjust the code to accommodate emergency vehicles.  I need your help on this.  Thanks
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #160 on: February 17, 2011, 10:22:18 am » posted from:Taipei,T\'ai-pei,Taiwan

Please describe in detail what kind of help you need. You are welcomed to check out High way traffic simulation. Car can change lane when it is blocked.
Logged
dev_cool21
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #161 on: March 02, 2011, 06:11:34 am » posted from:Little Rock,Arkansas,United States

hey can any one help me in modifying the code , my professor has asked me to change some of the options in traffic light. i.e each trafiic light timings for red ,green and yellow should be customisable.. can some one help me out in couple of days?..
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #162 on: March 02, 2011, 07:05:31 am » posted from:Taipei,T\'ai-pei,Taiwan

1. The code at this topic was created more than 10 years ago with JDK1.0.2
You might want to check out Ejs version of traffic control simulation and working with EJS.

2. Please write down what you have done (or what you know about java or programming)?
The timing for red,green,blue light are the same for those three traffic lights (and it can be changed with mouse click--left click to decrease or right click to increase).
You need to define a new GUI to change one of the traffic light, and modify the value for them it the code.
It seems to be an exercise for you. I will try to help but I should not do the job for you.
Logged
Leutz
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #163 on: April 11, 2011, 07:10:36 pm » posted from:Craigieburn,Victoria,Australia

Hi.

I just registered on the forum, being interested in the traffic applications. I found this topic and tried to see how the application work, but I was unable to access it.
When I access the first page of the topic the browser crashes. It works on the other pages of the topic though. I tried with several browsers, and also with different internet providers (home, school ... etc.). It's the same - the first page is somehow broken.
Same thing happens with the link you provided about the newer EJS version.

So in the end, I was unable to see the application running, or at least get the files and make it work by myself somehow. Could you help me with this?

Thank you.

Best wishes,
Leutz
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #164 on: April 11, 2011, 09:54:54 pm » posted from:Taipei,T'ai-pei,Taiwan

I just viewed it with my firefox without any problem.  Huh I do not why you can not view it. sorry!

You might want to check out another version:  Ejs version of traffic control simulation
Logged
yurci
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #165 on: May 06, 2011, 05:50:02 am » posted from:Izmir,Izmir,Turkey

Hello; i am new to java. How am i gonna compile the source code? i am useing net beans and it is saying main class notexisit. And if i run the trafficcontrol.java applet appers but say not initilized? what should i do?

THANKS
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #166 on: May 06, 2011, 01:14:48 pm » posted from:Taipei,T'ai-pei,Taiwan

main class is for java application. The code is for creating java applet.
I am not familiar with NET BEANS , however, I think you need to change your selection from application to applet.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #167 on: May 06, 2011, 05:05:01 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Try use DJ Java Decompiler is more simple than net beans and i believe you will not meet any probelm to compile the source code Just need to already install  java sdk.
good luck!
Logged
fari
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #168 on: June 21, 2011, 03:53:19 pm » posted from:Islamabad,Islamabad,Pakistan

sir! the code that u e-mail me showing no output n have these errors................
java.lang.NoSuchMethodError: main
Exception in thread "main"
Process completed.



so plzzz relpy me faaaaaaaaaaast plzzzzzzzzzzzzzzzzzzzzzzzzzz..................
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #169 on: June 22, 2011, 04:20:35 pm » posted from:Taipei,T'ai-pei,Taiwan

It was written as an applet (more than 10 years ago) instead of an application (so there is no main in the code).

You can use appletviewer to view it. (need an html page with applet tag)

Please check out sun's web site and find out more information.


You can check out traffic light control applet with EJS. You can download jar file version which can be run as an application. (just double click the downloaded ajr file).
And you can modify it with EJS and create new version,too!
Logged
wendels
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #170 on: August 18, 2011, 01:33:01 pm » posted from:Makati,Manila,Philippines

I just viewed it with my firefox without any problem.  Huh I do not why you can not view it. sorry!

You might want to check out another version:  Ejs version of traffic control simulation

sir pls! send me the source code of traffic light intersection,,thnx!
 
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #171 on: August 18, 2011, 05:13:01 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

You can download the source code by yourself, down the applet choose download File and later click Get files for offline use and source code will be already in your PC as attachment file unzip and enjoy.
Logged
jonnyryan
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #172 on: September 08, 2011, 10:44:27 pm » posted from:LONDON,ENGLAND,UNITED KINGDOM

Hi there, I'm having difficulty locating the source code. Where exactly is it located? Thanks.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #173 on: September 09, 2011, 02:32:59 am » posted from:-,-,BRAZIL

Your post at page 6 you should first back to page number1 and you will find download source code as attachment zip file, take a look to image that i attach.


* image.jpg (207.87 KB, 1680x1026 - viewed 298 times.)
Logged
mwinganiza
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #174 on: March 01, 2012, 01:03:08 pm »


Hi,Is it possible to run the code as an application but not an applet?
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #175 on: March 01, 2012, 08:37:09 pm » posted from:LONDON,ENGLAND,UNITED KINGDOM

You are welcomed to check out EJS version of traffic light control.
Download the jar file and run it as an apllication with many options(screen shot/save as animated gif/...).
Logged
civosco
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #176 on: March 06, 2012, 02:21:15 am » posted from:Gaborone,South-East,Botswana

please send me the source code at civosco@gmail.com
thanks in advance
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #177 on: March 06, 2012, 12:03:28 pm » posted from:Taipei,T'ai-pei,Taiwan

The source code is available as attached file (under the first posted message).
Please download it by yourself if you really need it! :-)
Logged
mikemuri_05
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #178 on: April 19, 2012, 08:35:37 pm » posted from:Dubai,Dubai,United Arab Emirates

Hi Sir, Can I have a source code (java file) for the traffic light system. Thanks appreciate your help!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #179 on: April 20, 2012, 07:46:14 am » posted from:Taipei,T'ai-pei,Taiwan

The source code is available as attached file at the same post(first post of this topic) where you found simulation.
Please download it by yourself if you really need it.
Logged
Pages: 1 ... 4 5 [6] 7   Go Up
  Print  
Like what you dislike of those things are imortant. ...Wisdom
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Traffic Light Simulation (Java)
Request for physics Simulations
null404 9 34995 Last post April 22, 2008, 08:59:13 am
by Fu-Kwun Hwang
Time duration for the yellow traffic light
Kinematics
Fu-Kwun Hwang 4 39082 Last post August 16, 2009, 07:38:51 am
by Fu-Kwun Hwang
traffic light whole system by using matlab
Request for physics Simulations
bennycyg 11 21902 Last post September 30, 2016, 12:46:41 pm
by Charli05
Mesoscopic traffic light simulation
Simulations from other web sites
Ifeanyi 2 13433 Last post December 09, 2011, 07:14:35 am
by Ifeanyi
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.077 seconds with 23 queries.since 2011/06/15