0

Currently, I am generating vehicles from SUMO and importing into veins. However, now I want to use large number of vehicles (from 100 to 1000) and I want their random generation (e.g., random start time and random speed).

Can anyone help that i) how can I create/generate vehicles from veins instead of SUMO? and ii) how to randomly select start time and speed of vehicles?

Best Regards, Yasir

Yasir Saleem
  • 145
  • 1
  • 1
  • 12
  • Why don't you create an appropriate scenario in SUMO? – Ventu Jan 08 '21 at 22:17
  • I already have create the scenario in SUMO. However, now instead of generating vehicles in SUMO for my scenario, I want to generate vehicles in veins because I want randomness. – Yasir Saleem Jan 12 '21 at 10:41

2 Answers2

1

This is what https://github.com/sommer/veins/blob/veins-5.1/src/veins/modules/mobility/traci/TraCIVehicleInserter.ned was designed for. Whenever the number of active vehicles in OMNeT++ is less than a configured number, it starts a new vehicle using one of the existing route definitions.

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
0

You can use python to generate route files with random seed/random start time. Refer to runner.py file in https://github.com/eclipse/sumo/blob/master/tests/complex/tutorial/traci_tls/runner.py and to the tutorial in https://sumo.dlr.de/docs/Tutorials/TraCI4Traffic_Lights.html

netbug
  • 47
  • 6