Closed LucasAlegre closed 2 years ago
You can calculate it by the lane width, vehicle width, and min vehicle gap, which are given in the roadnet.json and flow.json. For now, we don't have such an API, you can modify "src/cityflow.cpp" and re-compile the C++ code to add one.
I believe I should calculate with lane length, vehicle length and min vehicle gap. However, the lanes only have the width attribute in the roadnet.json files. The workaround seems to be computing the lane length calculating the distance between the two points (x,y) of the road...
I need to compute the lane occupation, and for it, I need to retrieve the maximum number of vehicles that a lane can have at a given time. The roadnet.json files only store the lane width, which is not useful.
Is there a way to get this value using the API?
Thanks!