Git Product home page Git Product logo

simple-traffic-simulation's Introduction

Simple Traffic Simulation of a Single Intersection

Showcase

Motivation

This simulation was made for a project at the University of Rostock, with the motivation of simulating an intersection close to our main building to see whether it is possible to improve the intersection.

As that is quite an ambitious project we limited our scope to solely simulating road users, i.e. no bikes, pedestrians or trams. It only simulates cars, buses and trucks.

The simulation is capable of simulating arbitrary intersections, due to limitations with python these can't be all that big though.

Requirements

Python 3 is required for this project. It requires no installation other than its dependencies, which you can install here:

pip3 install -r requirements.txt

Note that specific versions of arcade and bezier are required since newer versions introduced differences which were interfering with our implementation.

Introduction to the project structure

The python files in the parent directory are all different ways of running the simulation.

python3 gui-sim.py runs a graphical user interface to visually show the simulation

python3 speed-test-sim.py runs the simulation without a graphical interface, to test the maximum speed of the simulation

As you can see the visualizer and the simulator are separated from each other therefore the simulation can work entirely without the visualizer.

Subfolders

  • Simulator - Contains the simulator
  • Visualisation - Contains the gui which can draw
  • Data - The data when running the simulation is saved here
  • Evaluation - Data evaluation from the data we have been given
  • Intersections - A number of intersections which can be loaded in the simulation

Loading a different intersection

There is no way of loading a different intersection without editing code right now. To change the intersections go to Simulator/simulator.py, then change real_intersection to one of the other possible intersections. For example threeway_intersection.

License

GPLv3, see LICENSE

simple-traffic-simulation's People

Contributors

liquidfun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.