Skip to content

maboelfotoh/FuzzyTrafficLightController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project demonstrates the use of fuzzy logic for controlling traffic lights. 
It's an old course project.

This project uses code found at the following locations:
trafficControl.java:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=139.0;attach=1569 [last accessed Apr 14, 2016].
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=139.185;wap2 [last accessed Apr 14, 2016].
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=139.0
http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=139.0;attach=906

MsgBox.java: http://www.rgagnon.com/javadetails/java-0242.html [last accessed Apr 14, 2016].
jFuzzyLogic_2.0.7.jar: https://sourceforge.net/projects/jfuzzylogic/ [last accessed Apr 14, 2016].

==========================================================================================

fuzzy.java uses fuzzy logic approach.
trafficControl.java implements fixed-cycle approach.

Fixed-cycle: uses a 30s green time.
Fuzzy logic: uses a minimum green time of 5s and a maximum of 30s.

Code also tested using Eclipse SDK Version 3.4.2.

jFuzzyLogic_2.0.7.jar library must be added to the build path.

If no "Fclurl" parameter is specified in the Java Applet Run configuration, 
then the applet will try "fcl/FTJSC.fcl" (please see init() in fuzzy.java).

Description of controller

The fuzzy rules are implemented based on the paper "A fuzzy logic controller for traffic
junction signals" by Chou et al. The traffic junctions are controlled in a 
synchronous manner, where all the traffic lights change signals simultaneously, 
and are adjusted with the same delays. This was the approach that excelled, as shown
by Chou et al. in the aforementioned paper. The fuzzy logic rules and membership 
functions can of course be modified in order to implement other sets of rules 
and membership functions proposed by other researchers in the field. This is simply a 
proof-of-concept.

The traffic generated by the trafficControl code resembles an oversaturated traffic
situation; a situation that has shown to be hard to deal with when using a fixed-cycle
controller, and where a fuzzy logic-based controller excels. Again, one can implement 
other traffic generation models with ease.


About

Java Applet demonstration of the use of fuzzy logic to control traffic lights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages