Skip to content

Zildj1an/Graphic-Traffic-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic-Simulator : A Graphical Traffic Simulator GPL Licence

Language: Español | English

👨‍🔧 How does it work?

It uses the MVC design pattern for a Swing GUI, and Java Threads for making the GUI responsive. you can find a screenshot and collaborators at the end of the file.

Main idea

This object-oriented Traffic Simulator works with several models of vehicles, roads and junctions. You can test different junction policies in three different styles: "batch", "gui", "race" The simulator maintains a collection of simulated objects (vehicles on roads connected by junctions); and a discrete time counter that is incremented in a loop while performing the following operations:

  • Process pre-scheduled events that can add or alter simulated objects. Many example report files can be found at resources folder .Event example:

          [vehicle_report]
          id = v1
          time = 5
          speed = 20
          kilometrage = 60
          faulty = 0
          location = (r1,30)
    
  • Advance the state of currently simulated objects, according to their behaviors. For example, vehicles will advance if the road ahead is clear, but will have to stop and wait for red traffic lights.

  • Report on the current state of the simulated objects using the GUI

Screenshot

alt text

Collaborators

License

This project is licensed under the GNU-GPL License - see the LICENSE.md file for details

About

Object-oriented Traffic Simulator with a complete GUI developed using the MVC pattern, threads and Swing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages