'Veins and SUMO: assigning multiple module types to a vehicle or including pedestrians inside a vehicle
I am using Veins 5.1 and might be forced to keep it. I would like to have multiple (2) different OMNeT .ned modules to be assigned to a single SUMO vehicle. 2 modules with the exact same mobility pattern and departure time are needed.
According to the comment ( line 132 and following in TraCIScenarioManager.cc ) only a single module type can be assigned to a vehicle type. Could this be changed?
I think an alternative solution would be to have 2 passengers ride the vehicle and assign a module type to each of them. I tried the following:
<vehicle id="0" type="non" route="1" depart="0"/>
<person id="p0" type="ue1" depart="triggered">
<ride to="1/1to1/2" lines="0"/>
</person>
<person id="p1" type="ue2" depart="triggered">
<ride to="1/1to1/2" lines="0"/>
</person>
The passengers do show up when running the SUMO simulation with sumo-gui but do not get assigned a module type in the OMNeT simulation. The code in the omnetpp.ini is correct. A vehicle would get assigned the correct module type.
Would it be possible to include the passengers?
I tried having 2 vehicles with identical routes and departure times, but that caused SUMO to create a delay between the 2 vehicles and does not seem to be an option.
Thank you for your help!
Solution 1:[1]
Looks like I found a workaround:
INET provides an AttachedMobility module. The one module that uses VeinsInetMobility can create the other module and the newly created module can then use AttachedMobility.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user18767429 |
