- python/peopleModel - generates people (origins and destinations)
- python/routeModel - generates a route for each person (polylines)
- python/simulation - simulates people (polylines) moving; sends views to redis
- python/view - view the models and simulations from redis (openlayers + bottle REST API)
Time is always in seconds. Distances have their own class and can be feet or meters.
git clone https://github.com/davidbailey/TransportSim.git
pip install pandas geopandas shapely requests bottle redis
# osrm-backend
brew install osrm-backend
wget http://download.geofabrik.de/north-america/us/california-latest.osm.pbf
./osrm-extract california-latest.osm.pbf
./osrm-prepare california-latest.osrm
./osrm-routed california-latest.osrm
# download osm
cd var
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/los-angeles_california.osm.bz2
bunzip2 los-angeles_california.osm.bz2
# redis
brew install redis
redis-server
# TransportSim
cd TransportSim
python src/view.py
python src/simulation.py
Launch a browser and open http://localhost:8080/