openmove / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
0 stars 0 forks source link

Traffic for Car journeys - Discussion #4

Open zabuTNT opened 2 years ago

zabuTNT commented 2 years ago

Manage traffic.

Step 1:

Step 2:

zabuTNT commented 1 year ago

I'm not sure if we should add these features or use a specific router for car journey, for instance OSRM. Anyway we can create an updater that update the car speed for each streetEdge, so if we have x,y,z as start_node,end_node,speed :

graph.getStreetEdges()
            .stream()
            .forEach(streetEdge -> {
                if(streetEdge.getStartOsmNodeId() == x && streetEdge.getEndOsmNodeId() == y) {
                    streetEdge.setCarSpeed(z);
                }

            });