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-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Traboulsi, Abdullah <at666@xxxxxxxx>
Sent: Friday, July 3, 2020 6:46 AM
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
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
Thanks, guys.
I was able to figure it out.
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?
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
|