I need to make vehicles do random routes, not random speed or acceleration, random edges that he moves to.
I tried using "RNG" and "random" to see if caused any effect and it didn't.Also tried searching for it and couldn't find anything about the issue.I'm on windows
To constantly change the vehicles' routes, you would have to use TraCI. You can use either one of the following ways:
setRoute
.setRouteID
moveToXY
in the TraCI package. When using this command, you can change the vehicle's edge for each time step (by setting the keepRoute
parameter to 0). This forces the vehicle to change its route, however, now the route consists of only ONE single edge (to which the vehicle was moved). Do this repeatedly.