Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] vehicle set speed issue


This is because you are using the duration parameter value as zero in your slowdown method. Please take a look at the manual. If you set the duration to 0 seconds, the vehicle won't be able to set your new speed. Typically, the slowDown method sets your new speed up to a given duration (in seconds)  and gets back to its original speed after that. 
Thanks & Regards,
UofM logo

Lokesh Chandra Das
Ph.D. Student | Computer Science
Graduate Teaching Assistant
The University of Memphis
email: lokeshdu17@xxxxxxxxx

On Thu, May 11, 2023 at 5:51 AM Mahima <mahima13@xxxxxxxxx> wrote:

I am adding a vehicle on a lane with max depart speed (max speed of this lane is 16.67).

Now, in the same timestep I am moving this vehicle to the next lane (max speed of this lane is 27.78). I want to change the speed of this vehicle to 22.27.
But, when I check the fcd file, the position and lane changes as per the moveTo but speed remains 16.67 only. Please suggest why the speed is not going beyond the depart speed in this timestep and how I can achieve this. Thanks

I am using the following steps:

libsumo::Vehicle::setSpeedMode(2, 32);
libsumo::Vehicle::slowDown(2, 22.27, 0);
libsumo::Vehicle::moveTo(2, lane_id, lane_pos);

sumo-user mailing list
To unsubscribe from this list, visit

Back to the top