Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Bug Report: Traci returning wrong edge when vehicle is near junction

see for background and work-around.
Note, that you can catch the exception since it isn't fatal:

                 traci.vehicle.changeTarget(vehicle, "E20")
             except traci.TraCIException:

Am Mo., 6. März 2023 um 10:16 Uhr schrieb Ching, Jia Chin <jiachin.ching@xxxxxxx>:

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/' ... 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).



               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:

  1. For every step in TraCI:
  2. Retrieve list of all vehicles on edge(E15) before junction.
  3. 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;

  1. Download and unzip zip file
  2. Run


Debugging already done by us:

  1. 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)


  1. 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:

  1. 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


DXC Technology Singapore Pte Ltd - Registered Office: 1 Depot Close #03-01 Singapore 109841. Registered in Singapore No: 198400958N.
DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
sumo-user mailing list
To unsubscribe from this list, visit

Back to the top