Need advice on simulating real time bus movement and eta predictions
Posted by Weird_Celebration651@reddit | Python | View on Reddit | 7 comments
Hello Everyone,
I'm currently studying in college and for semester project i have selected project which can simulate real time bus movement and can predict at what bus will arrive that the certain destination.
What I have:
- Bus departure time from station
- Distance between each bus stop
- Bus stop map coordinates
What I'm trying to achive:
- Simulating bus moving on real map
- Variable speeds, dwell times, traffic variation.
- Estimate arrival time per stop using distance and speed.
- Live dashboard predicting at what time will reach certain stop based upon traffic flow,speed
Help I need:
- How to simulate it on real map (showing bus is actually moving along the route)
- What are the best tools for this project
- How to model traffic flow
Thanks
inbred_@reddit
Google maps api has a decent free tier for directions, even with real time info.
shockjaw@reddit
See what you can learn from GTFS feeds. Anita Grasser (Underdark) has some good material you can learn from as well.
Training_Advantage21@reddit
Start with simpler simulation assuming constant speed. Then tweak for variable speeds.
SharkDildoTester@reddit
Interesting question. I would take this one of two ways. If it was your goal to do this on a route level, this is a typical transport problem similar to that of fluid flow with advection, dispersion, tortuousity, etc. If you want to simulate the entire network, you should do it as a probabilistic transport actor model, where each actor can interact with each other actor and you can simulate the network and their interactions. Not a trivial exercise either way. Best of luck.
redcat10601@reddit
Not a solution, just an idea. There's a website busti[dot]me that aggregates GPS track of public transport all across the world. The best coverage is in Russia though. If you can extrapolate simulation rules from real data it may be helpful. The site holds 7 days of GPS tracks (~1 minute resolution) and is quite simple in terms of reverse engineering the API. If you want more info on collecting this data - please DM me
nemom@reddit
PostgreSQL database with PostGIS extension to hold / supply the bus location data. Create a View that has the latest position. Set your map to refresh every few seconds. Each time it does, it will ask the PGDB for the location of the buses.
I don't know what to do about modeling traffic flow.
Weird_Celebration651@reddit (OP)
Ok thank you