eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.56k stars 1.43k forks source link

How to save the warning information as a log file in sumo by traci #15639

Open MoMingQimio opened 2 weeks ago

MoMingQimio commented 2 weeks ago

I just want to know why the simulation can shut down for no reason, I can't catch up with the latest warning in sumo-gui, So I must find a way. The warning information is as follows

Warning: Vehicle 'slow_car.53' performs emergency braking on lane 'E0_2' with decel=9.00, wished=6.00, severity=1.00, time=83.50. Warning: Vehicle 'slow_car.87' performs emergency braking on lane 'E0_1' with decel=9.00, wished=6.00, severity=1.00, time=149.20. Warning: Vehicle 'slow_car.99' performs emergency braking on lane 'E0_0' with decel=9.00, wished=6.00, severity=1.00, time=149.50. Warning: Vehicle 'slow_car.99'; collision with vehicle 'slow_car.87', lane='E0_0', gap=-1.30, latGap=-0.05, time=149.60, stage=laneChange. Warning: Vehicle 'slow_car.129' performs emergency braking on lane 'E0_3' with decel=9.00, wished=6.00, severity=1.00, time=196.60. Warning: Vehicle 'slow_car.129' performs emergency braking on lane 'E0_3' with decel=9.00, wished=6.00, severity=1.00, time=197.00. Warning: Vehicle 'slow_car.145' performs emergency braking on lane 'E0_0' with decel=9.00, wished=6.00, severity=1.00, time=217.60. Ep = 9, Step = 23701, Reward = -4091.1923, Colli = 0, Speed = 5.8339, Risk = 0.3692, Dis = 993.4952, Time = 230.8, Acc = 2.9982, Dec = -1.9663, Left = 0.0879, Right = 0.0896

as the information above, the collision didn't happen, but the running time is less than 360.1(which is the max time length),

m-kro commented 2 weeks ago

You can always redirect the output to text files like this: sumo-gui -c test.sumocfg > textFile.txt

If you want both normal and error messages in the same file append 2>&1: sumo-gui -c test.sumocfg > textFile.txt 2>&1

Could you please tell us which SUMO version you use? If you don't use the last one (v.1.21), could you please try that one to see if it crashes there as well?

m-kro commented 1 week ago

@MoMingQimio Please tell us whether your simulation crashes when using the latest SUMO version (v.1.21, download here).