Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Forcing vehicles to start at the same time, with non-zero speed

When setting departSpeed="max" you need to add the vehicles in upstream direction. i.e:
for i, pos in enumerate(range(200,0, -10)):
    traci.vehicle.add(str(i), routeID="r0", departPos=str(pos), departSpeed="max")

If you do it the other way around, the first vehicle will be inserted with a very high speed and the next vehicle doesn't have a secure gap to the follower vehicle.

Am Mo., 20. Apr. 2020 um 22:36 Uhr schrieb Branka Mirchevska <brankamircevska@xxxxxxxxx>:
Hello Jakob,

thanks for the suggestions. Here is what I found out:

These two:

- define your vehicles with departSpeed="max" departPos="random_free" and
let them all start at the same time (this may cause some vehicles to be
inserted with very low speeds)
- define your vehicles with departSpeed="desired" departPos="random_free"
(ensures high insertion speed and dense traffic)

won't work for me since I already have custom positions that I want to

This one:

- define your vehicles with departSpeed="max" departPos="yourCustomPosition"
and let them all start at the same time

doesn't work, max speed is assigned by all means and for that, the cars
don't start at the same time even if I set depart to "0"

The last one:

- define your vehicles with arbitrary departSpeed and departPos, then force
them into the network by calling vehicle.moveTo. If you follow this up with
vehicle.setSpeed(vehID, someHighValue), the cars will try to drive as fast
as possible while still staying safe.

is the only one that works, but because of calling moveTo, I "waste" one

I hope I haven't missed anything.



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

Back to the top