Open way-thu opened 1 week ago
Results may change between versions due to bug fixes, so a difference in behavior between versions is not unexpected. Your logging output also shows situations that are 48s apart in time. A vehicle that has accumulated 56s of waiting time may well have 94s accumulated waiting time at this later point (if it remains stationary for 38 out of 48s).
To compare two scenarios between versions, it is helpful to compare fcd-output and also traffic light output (https://sumo.dlr.de/docs/Simulation/Output/Traffic_Lights.html)
In fact, this vehicle will only stop once (because there is only one traffic light). To be precise, when using Traci, the vehicle completes its journey at time 113.5 and then disappears. However, when using libsumo, the vehicle continues until 151.5 seconds and also waits for a longer time.
I'm not sure if this is a version issue, but if you have time, you could give it a try and fix it.
I further checked my version and I found that both traci and libsumo are 1.20.0. As mentioned above, this seems to be related to the signal control method. When using static control, there doesn't seem to be an error, but when switching to actuated, the above error occurs.
Here is a description of what an error report needs to include to be actionable: https://sumo.dlr.de/docs/FAQ.html#how_do_i_report_erroneous_behavior_of_a_sumo_application
problems.zip @namdre Hello, I upload the problems I meet, I hope to hear your reply.
On my system, both of your scripts return the same output. My best guess is, that one of the scripts picks up the library from SUMO_HOME (version 1.18.0) and the other one picks the installed version (1.20.0). For debugging, see https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_the_traci_library_being_loaded
I modified the import paths for traci and libsumo, but the results I'm getting are still different. Is there something wrong with what I'm doing?
Please check the path of the actually loaded modules as described in my link.
Sorry for my bad understanding, I still not solve it. Is it possible that the issue arises because the version of libsumo I am using is 1.20, while the SUMO version is 1.18.0? Could the inconsistency between the versions of libsumo and SUMO cause this problem?
yes
I may meet a confusing mistake between libsumo and traci. Specifically, I want to obtain the cumulative waiting time of a vehicle, but using libsumo and traci, I got different results. Here are the details below.
First of all, my signal control method is actuated.
When I use traci, the result of the vehicle is 56.0.
However, if I change traci to libsumo, the result changes to 94.0.
What makes me more puzzled is that when my signal control method is static, the results obtained are consistent. However, when I change the signal control method to actuated, the results obtained by libsumo and traci will deviate. I don't know where the problem lies for the time being.
I hope to hear your reply, thanks for your help.
SUMO-version: 1.18.0 libsumo-version: 1.20 **operating system: windows