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.
Related
I wanted to compare the energy consumption of directional vs omnidirectional antennas in WSN specifically. Couple of questions:
1-) How the direction of the incoming signal determined? In which parameter the nodes (both sender and receiver) can store it? simply I need to find out the signal's coming angle if possible. I guess there is sth in Castalia related to that.
2-) The coordinator node's coordinates should be specified, isn't it?
3-) Any tutorial on the Battery depletion models for Castalia?
4-) If I just accept/transmit signals from/to a certain direction (with higher gain) can this be regarded quick-dirty directional antenna? How can this be done?
5-) I need more examples on these, especially on 802.15.4 stuff.
Sorry just a beginner in Castalia...
Thanks...
There is no directional signal propagation model in Castalia, so you can't use Castalia for your purposes. You could built that model for Castalia, but this is a huge task.
There is no connection between the directionality of signal (physical layer) and the MAC protocol used (MAC layer). I am not sure why you are asking about it.
The battery model is yet another topic (note: it's better not to ask multiple unrelated questions within a StackOverflow question). Castalia's battery depletion model is a the most simple one: linear depletion. Other people have built more advanced models but I am not sure they are publicly available.
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.
I am a beginner about Veins. Now I am trying to simulate dynamic adjustment of the transmission power and speed between 2 running vehicles based on their distance with each other with Veins 4.5, Omnet 5.0 and Sumo 0.29.
So far I have built the Sumo model and run the model in Omnet but without any programming which means the transmission power and speed between 2 vehicles are all set in the .ini file. Now I want to implement an algorithm to adjust them dynamically.
As a beginner I barely know how to start this job. The Veins tutorial didn't tell how to apply the functions provided by Veins. I now build a new .cc file based on our .ned file. And from MyVeinsApp.cc I found some methods I need to implement. But still I need some programming instructions about my problem.
1 how to get the realtime distance between 2 running vehicles?
2 is it possible to control the transmission power and speed with Veins 4.5?
I am sorry for these initial questions.But I really don't know how to develop a Veins simulation from the very beginning step by step at the programming level
Thank you very much!
To get the distance between two vehicles you can use the built-in function distance() from Coord (see this post).
To control the transmit power you can use the parameter txPower from Mac1609_4.
For changing the speed of the vehicle you can check this post.
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.
I have a simple traffic light intersection in which I have already set the traffic light logic. Suppose the vehicle density is increasing in one road and I want to retrieve this data in Omnet and use the C++ logic to direct the traffic lights to change state. Is it possible to do this in Omnet++?
In short I am looking to control the traffic using the network information obtained by running SUMO and coupling through SUMO. Is it possible to control the traffic through Omnet++? If yes, then can you tell me an example of how to do so?
Veins already includes some TraCI commands to retrieve the state of a SUMO simulation, as well as to change traffic lights. SUMO includes many more TraCI commands which should be able to do what you describe. You would just need to implement them in Veins as well, building on what is already there.