Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MarcusGitAccount/traffic-simulation-cluj-napoca
Prototyping a traffic simulator for Cluj-Napoca using html5 canvas and a lot of maths and basic AI.
https://github.com/MarcusGitAccount/traffic-simulation-cluj-napoca
artificial-intelligence canvas canvas2d car cluj-napoca js math nodejs prototype road roads traffic traffic-simulation
Last synced: 3 months ago
JSON representation
Prototyping a traffic simulator for Cluj-Napoca using html5 canvas and a lot of maths and basic AI.
- Host: GitHub
- URL: https://github.com/MarcusGitAccount/traffic-simulation-cluj-napoca
- Owner: MarcusGitAccount
- Created: 2017-08-31T07:39:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-18T11:05:29.000Z (almost 7 years ago)
- Last Synced: 2024-04-09T04:02:15.308Z (7 months ago)
- Topics: artificial-intelligence, canvas, canvas2d, car, cluj-napoca, js, math, nodejs, prototype, road, roads, traffic, traffic-simulation
- Language: JavaScript
- Homepage:
- Size: 648 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Traffic Simulator for Cluj-Napoca
# !! Not fully documented repo, future updates will fix this.
## About
This projects aims to create a traffic simulator for Cluj-Napoca, Romania. The firsts steps are to choose a zone to represent(in this case Mihai Viteazu Square, main central area of the town as seen in the printscreen below) on the scene(canvas) and create a prototype that will be used in the near future to develop the traffic AI and roads and road logic.
http://prntscr.com/gke16s
## Currently developed
- Roadsystem created with a multigraph and linked lists of 2D vectors. (as seen here: http://prntscr.com/h6ht77)
- Math utils for linear algebra problems that occured during the project development and more.
- Mockup api for fetching the points for the roads.
- Data structures such as Queue, Stack, BinaryHeap, PriorityQueue, LinkedList, Multigraph etc..
- Models such as Road, Car (they are currently in development)## Currently working on:
- Updating the Car model and creating the AI for cars. (will be using graphs to easy work with distances between cars)
- Updating the Road model
- Enhancing the API.
- 2D Car representation and physics (acceleration, deceleration, braking, ground friction, steering, maintaining distance from
objects near, overtaking other cars in the same lane, changing lanes, etc..)
- Creating a 2D Vector model with the basic operations needed and putting togheter the existing utilitary functions in the the class Vector2D
- Changing the road friction based on the weather type(dry road = standard, wet road, snowy, etc..)## TO-DO:
- create a user dashboard for inserting multiple cars
- create an interface for users to select the area of the city to simulate traffic on
- create weather conditions
- add road obstacles## Installation
- clone the repo
- npm i
- npm start_Notes_:
- _1°_. You may have to change the environment variables IP and PORT as they are by default set to 0.0.0.0 and 8080.
- _2°_. No transcripters/loaders such as babel are used to transforms the ES6 code. The project makes use of the ES6 module system and await/async implemented in Chromes 61's V8 engine.
- _3°_. The api is currently just a mockup that sends data collected from Google Maps by hand. :(## Technologies used:
- NodeJS version > 8.5.0
- ES6 JS
- 2D canvas api## License
[License link(gplv3)](https://github.com/MarcusGitAccount/traffic-simulation-cluj-napoca/blob/master/gplv3.txt)