Multi-lane accidents in Veins - omnet++

I would like to create accidents that block all lanes of the respective direction of the road and not just the lane the vehicle is on.
I tried changing the lane change mode but that can only prevent cars on the same lane from passing the accident. Vehicles that are on another lane can still pass the incident site. However, I want all vehicles on that road going in the same direction as the vehicle that has the accident to be forced to stop. How can I do that?
Thanks in advance

Related

How I can collect the results of veins example?

I am using veins example and I replaced the scenario by real map of open street map. It work well but I do not know how I collect the result to prove the work.
I expected to have a result for example the delay and how the accident message delivered on the time for the neighbouring vehicle and we avoid another accident and road congestion if I am not right please advise me what results we can got if such example

Sumo/Veins not spawning all vehicles

I am using Omnet, SUmo and Veins to simulate Vanets. The issue I face is that with certain maps, not all cars in the route file are spawned, at least not when they are supposed to. From what I understand it is because there is "not enough space in the network". I find it weird because the map I currently have covers 5*4 Manhattan blocks and should be big enough to accommodate thirty vehicles.
When I use departLane and departPos with "free", cars spawn, but the simulation fails randomly. I used a much bigger map with thirty vehicles and that one worked fine.
Any ideas, thanks in advance.
At depart time SUMO does not check for general space in the network but on the given departLane (which defaults to the rightmost usable lane) of the first edge in the route that's why vehicles are delayed. You already found out what to do against it, use departLane="free".
As for the second problem please give at least the error message preferrably with a more detailled description and the SUMO version.

Messages not received by other vehicles because of building

I'm using veins 4.4, OMNeT++ 5.0 and SuMO 0.25, and my project is about intersection traffic control.
I have only one obstacle (building) on my map (by open street map), and my problem is that node 1 is not receiving messages from node 2 and vice versa while in other lanes communication is done perfectly without missing messages.
I think the problem is because of this obstacle. Can anyone help me to get rid of this problem?
The obstacle (which is likely representing a house next to a junction) is behaving as it should: it is obstructing radio communication. There are two ways to approach this: either this is intended, then you would need to design a system that can route data around the house in a multi-hop fashion; or this is unintended, then you would need to remove the building or its effect on radio communication.
If you do not want to have a building in your simulation, make sure that your simulation does not load the Obstacle Shadowing Model. If you load this model but no obstacles, the simulation will complain.

Disable/remove the NIC module of some vehicle in Veins

Dear OMNeT++/SUMO/Veins community,
There is a correct way to disable/remove the NIC module for some vehicle in the Veins?
I have lot of vehicles in my scenario and I want set only one part them with communication module, for example 50 %. For this I created one method that set half the vehicles to start the sendBeacon and other method to drop the beacon/data for half (same half that no start sendBeacon) the vehicles. I already see this question.
I think there is a correct way to do this, because in my code all the vehicle have the communication module and just not use or ignore the package that arrived.
I'd appreciate any help.
If you want only a certain fraction of vehicles to participate in the network simulation, you can set the penetration rate parameter in https://github.com/sommer/veins/blob/veins-4.4/src/veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.ned#L58 to a value smaller than one.
For example, if you set the penetration rate to 0.5 only half of the cars will take part in the network simulation (but still in the road traffic simulation), thus modeling a network where half of the cars are not equipped with VANET technology.

Using a Traffic Light as a RSU in Omnet++, Veins and SUMO

I am doing a project on improving the transit times of buses using 802.11p. Currently I have a SUMO model made and simulating and I am moving on to modeling the network using Omnet++ and Veins. I have completed the TicToc tutorials to become familiar with Omnet++.
I am wondering how I could use the traffic lights in SUMO as Road Side Units in Omnet++. Would I need to write code in Veins to allow Omnet++ "see" the traffic lights as it does with vehicles?
Thanks in advance,
Ciaran
You are right: In order to model whether a transmission from a car to a certain "point" in the simulation is received, you will need to instantiate an OMNeT++ module (let's call it a Virtual Induction Loop, VIL) with an 802.11p radio at that position.
A design decision will be how to estimate where these VILs will need to be.
Naturally, VILs will need to be close to the lanes that are controlled by traffic lights. Each traffic light can control any number of intersections, so putting a VIL at the center of "the intersection" will likely not be possible. This means that, ideally, you would hand-pick the positions.
Alternatively, you can try to estimate a good position automatically. As of Veins 4a2, only rudimentary commands for traffic lights (such as to set a traffic light program) are implemented. SUMO, however, offers many more commands for reading traffic light information. If you implement the commands to enumerate which traffic lights exist, which lanes they control, and where those lanes are, you might be able to derive good position estimates for the VILs.

Resources