Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Changing the Actual Deceleration Rate

As you already figure out, setDecel is not meant to influence current vehicle speed directly. For that you should use the commands
vehicle.setSpeed (fine grained control in every step) or vehicle.slowDown (implicit linear speed time line for a given time period).

You will have to convert between desired deceleration and resulting speed in your own code (newSpeed = oldSpeed - desiredDecel * stepLength).
I'm not sure what you are doing with the negative speeds but a simple 'newSpeed = max(0, newSpeed)' should avoid any issues with negative speed.


Am Fr., 8. Mai 2020 um 02:14 Uhr schrieb Bae, Jong In <jbae42@xxxxxxxxxx>:
Hi,

I keep getting an error saying that the speed is going below 0. In order to avoid this error, I am changing the deceleration rate, using setDecel function same as the upcoming vehicle speed.
However, it seems like setDecel only changes the maximum deceleration rate, rather than the actual deceleration rate. 

For example, the upcoming speed for a particular timestep was 1.94 which then was used to change the deceleration rate. I expected to see the vehicle stop since now I have set the deceleration rate as 1.94. But the deceleration rate of 1.23 was used. 

Is there any way in SUMO that I can change the actual deceleration rate rather than the maximum rate?
I know the actual deceleration rate is determined based on the traffic condition but is there any way I can overwrite it with the value I'd like to assign?

Also, would you guys consider including a feature that prevents vehicle speed from going below 0 (possibly forcing vehicle to stop if the speed is going to be negative) for the future versions of SUMO?

Thank you so much. 


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top