Hi Antonio,
There are several different ways of updating the graph in OTP. Some ways actually modify the graph structure, while others update auxiliary data structures like public transit timetables that are referenced by the graph during searches.
For public transit, OTP supports GTFS-RT trip updates. These can be loaded from a file or a URL, or provided in a continuous stream (differential mode) over websockets. For streets, some work has been done on dynamically changing street speeds.
There is some information (including example configuration files) in the OTP documentation:
There is not really any documentation on the speed updaters because that is a very experimental system built against an early version of OpenTraffic. If you’re writing your own code though that could be adapted to updating speeds or even blocking traversal of certain roads. The example class is:
org.opentripplanner.updater.traffic.OpenTrafficUpdater
The shared mechanism that would need to be used by a custom speed updater is:
graph.streetSpeedSource.setSnapshot(new StreetSpeedSnapshot(speedIndex));
You can see an example of this in org.opentripplanner.updater.traffic.OpenTrafficUpdater.
If you are looking for more specific information about configuration or extension points, you will need to be much more specific about what you’re trying to do and what data sources you’re using for people to be able to help you.
Regards,