How to create/generate vehicles from veins instead of SUMO

154 views
Skip to first unread message

Yasir Saleem

unread,
Jan 3, 2021, 7:07:51 AM1/3/21
to OMNeT++ Users
Hello everyone,

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? 

I also searched for similar question but couldn’t find. If this is previously been asked, I would be thankful if someone can provide me its link. Many thanks. 

Best Regards, 
Yasir

israa

unread,
Jan 11, 2021, 5:17:04 PM1/11/21
to omn...@googlegroups.com
you can set the speed inside the rou.xml file 

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/2376b7fa-3812-4261-beb1-c8aaa3f8bbb1n%40googlegroups.com.

Yasir Saleem

unread,
Jan 12, 2021, 6:48:30 AM1/12/21
to OMNeT++ Users
Yes, I am currently setting speed in rou.xml file. 
However, my question is about generating vehicles inside veins instead of SUMO. 

Muhammad Bute

unread,
Jan 12, 2021, 7:19:43 AM1/12/21
to omn...@googlegroups.com
in most cases mobility are generated in sumo, Then imported in to the omnet/veins environment. you can set the number of vehilces and their costumize random starting time in your rou file

israa

unread,
Jan 12, 2021, 9:11:56 AM1/12/21
to omn...@googlegroups.com
vehicles are just moving nodes and sumo gives you the ability to watch them as in real life. you can generate moving nodes without the need of Sumo in inet , but if you are working in vanet you need a mobility generate like Sumo.

Pablo

unread,
Apr 3, 2021, 11:51:19 AM4/3/21
to OMNeT++ Users
Hi,

Perhaps you mean something like this:

TraCIScenarioManager* traciScenarioManager = TraCIScenarioManagerAccess().get();
TraCICommandInterface* traciCmd = traciScenarioManager->getCommandInterface();
std::string traciID = "node[10]";   // Vehicle ID
std::string typeID  = "passenger";   // Vehicle Type ID
std::string routeID = "rou1";  // Route ID
traciCmd->addVehicle(traciID, typeID, routeID);

Regards
Pablo

foryou all

unread,
May 20, 2021, 5:04:26 AM5/20/21
to OMNeT++ Users
hey I am a beginner for omnet++, veins, sumo share link /tell me please how I can create/generate vehicles from sumo like  speed, position, direction different parameters 
, thank you.
Reply all
Reply to author
Forward
0 new messages