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: sumo-user-boun...@eclipse.org <sumo-user-boun...@eclipse.org> on behalf of Traboulsi, Abdullah <at...@njit.edu> Sent: Friday, July 3, 2020 6:46 AM To: Sumo project User discussions <sumo-user@eclipse.org> 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 <padisal...@buckeyemail.osu.edu<mailto:padisal...@buckeyemail.osu.edu>> wrote: Thanks, guys. I was able to figure it out. ________________________________ From: sumo-user-boun...@eclipse.org<mailto:sumo-user-boun...@eclipse.org> <sumo-user-boun...@eclipse.org<mailto:sumo-user-boun...@eclipse.org>> on behalf of Padisala, Shanthan Kumar <padisal...@buckeyemail.osu.edu<mailto:padisal...@buckeyemail.osu.edu>> Sent: Friday, July 3, 2020 1:33 AM To: Sumo project User discussions <sumo-user@eclipse.org<mailto:sumo-user@eclipse.org>> 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 sumo-user@eclipse.org<mailto:sumo-user@eclipse.org> 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 sumo-user@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user