Bug Description:
Traci returning wrong edge when vehicle is near junction.
Sumo Version: 1.15.0
OS: Windows 10, 64-bit operating system, x64-based processor
Error Screenshot:
Full Traci Screenshot Included inside zip file
Error Message:
***Starting server on port 58726 ***
Loading net-file from './config/CargoReroute2.net.xml' ... done (24ms).
Loading done.
Warning: Value of tau=1.00 in vehicle type 'p_0' lower than simulation step size may cause collisions.
Simulation started with time: 0.00.
Warning: No connection between edge 'E18' and edge 'E20' found.
Warning: No route for vehicle 'car_0.0' found.
Error: Answered with error to command 0xc4: Route replacement failed for vehicle 'car_0.0' (No route found).
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown
Quitting (on error).
Description:
Goal: We wish to dynamically assign counters(edges E16, E18 or E20) inside SUMO using TraCI. Counter assignment logic defers depending on use case.
Bug: If vehicle is near the junction(node) where counters(edges) are assigned, Traci would say the vehicle is still before the junction despite the vehicle already entered the next edge.
Snapshots: (Full screenshot in zip file)
Python code breakdown:
- For every step in TraCI:
- Retrieve list of all vehicles on edge(E15) before junction.
- Assign them a new counter depending on current conditions on current time stamp. In the sample code in zip file, we are just assigning between the 3 edges sequentially.
Steps to reproduce bug;
- Download and unzip zip file
- Run main.py
Debugging already done by us:
- We have confirmed that the vehicle is in the correct edge (E15, before junction). Afterwards, we assign a new counter(edge E16, E18 or E20) to the vehicle.
This can be seen in the cmd output below: (Note that the python code crashed after calling traci. simulationStep)
- We have confirmed that all edges can be reached by assigning new targets. Traci.vehicle.changetarget is working as intended.
Change target to E16:
Change target to E18:
Change target to E20:
- This behaviour is inconsistent. There are times when it resolves itself if we redraw the nodes and edges.
PS: Thanks for reading and I look forward to your response.
Best Regards,
JiaChin Ching
Full Stack Engineer