Omnet++- Energy consumption curves - omnet++

I'm doing network simulation using Omnet ++ software and castalia. so i want to know how to plot power consumption, RSSI value curves
thanks in advance

This question's answer is dependent on what software you're using exactly. OMNeT++ provides a suite and toolchain for visualization, but as user Thanassis points out below, Catalia has its' own specialized evaluation tools.
For general OMNeT++ simulations
The OMNeT++ tutorial covers this in quite a lot of detail. Basically:
tell OMNeT++ what data you're recording (by editing the .ned files) using the #statistic annotation
modify the simulation to track the data you're interested in, either over simulation time (referred to as vectors) or per simulation (referred to as scalars), basically using emit().
make sure that your simulation (omnetpp.ini) is set up to collect the statistics (by setting e.g. histogram or vector as the type of collected data)
use either the graphical OMNeT++ interface or your own scripts to analyze the output of the simulation (which is, by default, stored in a folder called results wherever you're running the simulation, unless you change that in the omnetpp.ini)
Please also refer to these related questions:
How to collect traffic data and macroscopic statistics in Veins?
Calculating end-to-end delay for SimpleServerApp in Veins-LTE

Related

Calculating Throughput, Goodput, end-to-end delay time, Packets lost count from scalar file generated by the Omnet++

In a network with some wireless nodes, after simulation, the Omnet++ generates a scalar file.
I want to calculate throughput, goodput, end-to-end delay time, packets lost count from the generated scalar file.
Is there a tools that calculate them? or script?
If there isn't, what is the best solution?
I search similar question in the stackoverflow site, most questions are unanswered.
Assuming you are using INET, if the application layer emits a packetReceived signal then you can use the dataAge(packetReceived) and throughput(packetReceived) result filters.
This will produce these results in the .sca and .vec files.
For an example of how to use them see: https://github.com/inet-framework/inet/blob/007bc454ec7749e2dea8fcb808429d21074880ad/src/inet/applications/udpapp/UdpSink.ned
Some example applications which will work with this are: IpvxTrafGen, SctpClient/Peer, TcpAppBase (and derivatives), UdpBasicApp/Burst, UdpSink etc.

How to print collisions in real time on the OMNet ++ console?

I am doing the geographic routing in VEINS. However, in a moment the message is not transmitted by a node.
I suspect this is caused by a collision. I know that it is possible to take collision statistics at the end of the simulation.
But, I was wondering if there is any method I can use to print the collision on the OMNeT ++ console in real time.
Development environment used: SUMO 1.2.0, VEINS 5.0 and OMNet++ 5.5.1.
I suggest taking a look at the various visualizers in INET. For example you can set up a packet drop visualizer. See the related showcase.
You can also visualize the actual electromagnetic signal if you want to see it on lower level.

How to control the transmission power and speed based on the distance between two vehicles in Veins

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.

How to analyse path-loss in omnet++ for veins example?

How can i analyse the path-loss in veins, during the communication between two nodes. I looked through the analogue modules files and found that simple path-loss module is used but i don't know how this module could be used to accumulate the path-loss results. Do i have to add separate statistics to extract the path-loss results?
The path-loss is a communication phenomena. If you want to analyze it your have to look at metrics which quantify its effect.
As an analogy, if someone calls your name from distance you might not hear because the signal power (amplitude of the voice) has been attenuated due to the distance.
For example, you can look at recvPower in decider80211p, or higher level statistics which are recorded in mac1609_4
For more information about the path loss in Veins, you can consider this Q&A: Maximum transmission range vs maximum interference distance

How can I write Traffic Light logic based on Induction Loop data in Omnet++?

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.

Resources