Hello,
you would have to track the velocity for each vehicle and compare the
previous time step with the current. If the difference is larger than a
threshold (4.5m/s is the default maximum deceleration) it constitutes an
emergency stop.
regards,
Jakob

2015-08-21 0:18 GMT+02:00 Rijken, Tobias <[email protected]>:

> I want to use TraCI to detect if a car has made an emergency stop. I can
> think of two possible approaches:
>
>   *   ?Get the actual deceleration of a vehicle and if its absolute value
> is very high (above some threshold) we can define it as an emergency stop.
> However, TraCI only has a function, getDecel(vehID), that returns the
> maximum possible deceleration of a vehicle. Is there a way to get the
> actual deceleration of a vehicle at a specific time? I reckon it should be
> possible as the warning message given by the GUI indicates the actual
> deceleration.
>   *   Get the warning message, parse the string, and look for "emergency
> stop".
>
> Here is an example of a message:
>
> Warning: Vehicle 'veh15' performs emergency stop one lane ':254208588_1_0
> at position 8.91 (decel=-11.11), time=623.00
>
> What do you think? Would this be possible?
>
> ------------------------------------------------------------------------------
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to