Ismail Bouhariche
Ismail Bouhariche

Reputation: 11

How to initialize vehicles position randomly on the route using OMNET++?

I want to set randomly vehicles positions on the route. My SUMO files has the same start and end points, but I couldn't find how to set a new coordination. Is there any ways to do it using OMNET++?

Upvotes: 0

Views: 266

Answers (1)

Christoph Sommer
Christoph Sommer

Reputation: 6943

The SUMO Wiki Page on "Definition of Vehicles, Vehicle Types, and Routes" has the following to offer:

A vehicle may be defined using the following attributes:

  • depart: (≥0, "triggered", "containerTriggered") The time step at which the vehicle shall enter the network [...]
  • departLane: (≥0, "random", "free", "allowed", "best", "first") The lane on which the vehicle shall be inserted [...]
  • departPos: ("random", "free", "random_free", "base", "last") The position at which the vehicle shall enter the net [...]

Seems like you are looking for the departPos parameter.

Upvotes: 1

Related Questions