Sure! I first used VID = traci.vehicle.getIDList() to load all the vehicle IDs into list VID. Then I ran a for loop from 0 to len(VID) and used traci.vehicle.setMaxSpeed(VID[v],0.5*35) to alter the speeds of all the vehicles.
I hope it is clear. Thanks PSK ________________________________ From: [email protected] <[email protected]> on behalf of Traboulsi, Abdullah <[email protected]> Sent: Friday, July 3, 2020 6:46 AM To: Sumo project User discussions <[email protected]> Subject: Re: [sumo-user] Changing maximum speed limit of all the vehicles in a simulation at a given time. Hi, Could you please share your solution? How did you do that? Thank you and regards On Fri, Jul 3, 2020 at 2:20 AM Padisala, Shanthan Kumar <[email protected]<mailto:[email protected]>> wrote: Thanks, guys. I was able to figure it out. ________________________________ From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Padisala, Shanthan Kumar <[email protected]<mailto:[email protected]>> Sent: Friday, July 3, 2020 1:33 AM To: Sumo project User discussions <[email protected]<mailto:[email protected]>> Subject: [sumo-user] Changing maximum speed limit of all the vehicles in a simulation at a given time. Hello Everyone! I am trying to change the maximum speed of all the vehicles that are currently at this instant in the SUMO simulation using TraCI. May I know how I can execute this? Thanks and Regards, PSK _______________________________________________ sumo-user mailing list [email protected]<mailto:[email protected]> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/sumo-user__;!!KGKeukY!m8MUp3i8iYNrh3B-A0q7aP46_w6T_Zcsh3P1cBO7XrGJBwNyflVuxn1X1qKDbq3fkcDhVR_6Bsg$>
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
