jdlph / Path4GMNS

An open-source, cross-platform, lightweight, and fast Python path engine for networks encoded in GMNS.
https://path4gmns.readthedocs.io/en/latest/
Apache License 2.0
54 stars 25 forks source link

Travel time estimation of traffic lights #46

Closed lisb20 closed 1 month ago

lisb20 commented 2 months ago

Thanks for the efficient and easy-to-use tools. I am interested in how the traffic light is handled in path4gmns, as there seems few description in the documents. In "perform_simple_simulation.py", I am not sure whether the series of "wait_time" are performing that role.

Recently I am applying it to a project, and needs to estimate the reality of outputs, and common problem is that the travel time is usually shorter than real ones, even with low speed limit. And that's the reason of this simple confusion

Thank and best wishes~

jdlph commented 2 months ago

The traffic simulation module in Path4GMNS is a mesoscopic simulator using the point queue model.

  1. While signal control is important in microscopic traffic simulation, it is usually not considered in mesoscopic simulation.
  2. You can supplement a link toll as an additional (constant) travel time to approximate the time loss of signal control. This feature will become available in the forthcoming v0.9.9.
  3. The underestimated travel time is probably due to the point queue model where the free-flow travel time is presumed for traversing each link. The spatial queue model or the kinematic wave models shall provide more realistic traffic evolution and thus more accurate traffic time. However, the simulation module does not support these advanced traffic representation of traffic dynamics. Consider using the embedded DTALite or TransOMS if you really need them.
  4. I did not see "wait_time" throughout the source code. Please specify the file name and line number for us to locate it.
lisb20 commented 2 months ago

Thanks for the informative answer, from which I understand the details needed for my project. The "wait_time" I mentioned before is in /path4gmns/simulation.py, line112-118. I may have misunderstood the waiting_intvl in the codes and referred it to something related to traffic signals.

jdlph commented 1 month ago

That's the queue time for each individual agent. It has nothing to do with signal control.

I will mark it as closed. If you have any further questions, please reopen this thread or open a new one.