Search code examples
veinsinetsumo

How am I supposed to use two vehicle types in one simulation?


Veins_inet said it was made on top of veins library. So how can I use the 802.11p vehicle in inet simulation?

I've defined two vehicle types in rou.xml file. How can I read them in simulation ? I tried this and so far it seems impossible. most of the modules have connected to each other from source files.

Is it capable to do this in a single mobility model or can I use both mobility models in a single simulation ?


Solution

  • Veins 5.0 and INET 4 are using completely separate models for simulating wireless channels. While it is perfectly feasible to make both models aware of "correct" vehicle positions (by instantiating both model stacks, that is, using two applications, two wireless card modules and two mobility modules per vehicle -- as well as two channel modules per simulation, though only one connection to SUMO), this is not necessarily the easiest way forward.

    Are you sure your study needs to simulate both types of models in the same simulation? If not, build two separate simulations -- one using Veins+veins_inet+INET (using only the latter's wireless models), one using Veins.

    Are you sure you cannot rely on an INET WLAN model configured to opMode=p instead of the wireless models of Veins? See https://github.com/inet-framework/inet/blob/v4.2.0/examples/wireless/nic/omnetpp.ini#L245 for an example configuration. If not, all your cars can use purely INET wireless models.