To get ouput graphs I need to generate vector and scalar graphs but can't find any way to do it. Only an event log file is generated. I am wondering if any one can help me.
There will be a results folder after sucessful compliation of simulation of your omnet project.Click on it you will find input file like vector and scalar files.The browse it to run the file.Then you will find the each node simulations results.There you can click and see different plots.
Actuallly, i'm recording all my results in a single output file. All my nodes write in the same file. I want just to make separate output files : (means each node has an output file) .
It's pretty easy as in manual. As Nayan Basumatary said above, you can browse and filter your wanted vectors/scalars. In case you want to make separate output files for each single/multiple vectors, just right-click on a vector name or two-more vectors ==> export to CSV.
CSV files are very useful to process for high publication-quality figures. You can process them in MATLAB, GNUPLOT, Matplotlib, or R.
@hoang-linh To and @nayan thanks for your answers. my problem is the reseult just produce the sca or vec and I don't know where should I adjust these properties. I am quiet new in omnet and I am working with MiXim extention. In which file I should adjust these properties in ini file or oother file.
And what statistics you want? (Drop, Throughput, Delay...) or a vector?. If you want a vector, then depend on your simulation model, in the omnetpp.ini file, you usually have to add the line:
**.scalar-recording = true
**.vector-recording = true
That would record all scalar and vectors in all modules of your simulation model. After having *.vec, then do as my first answer.
thanks for your answer. I have another question: between Mixim and Castalia which one is better for Wsn if I want to change RSS in my simulation for different nodes?
I was also confused of mixim and castalia choice. However, I chose Mixim because of good integration with inet framework. Also, I am new to WSN, just start mixim one month ago. Before that, I only worked with inet and tcp congestion control/
I checked that example. You can enable batterystats vectors, however, I think it is not efficient, because the *sca files already have some interesting statistics. And the purpose of this example is to measure power consumption or lifetime of sensor nodes (Y-axis) over number of hosts (X-axis) (**.numHosts = ${numHosts=5,25}
Anyway, to see some vectors, even already enable **.vector-recording = true, but we did not see anything. So I checked some of modules in ned file: WSNRouting.ned
Double click on node[numHosts] then you see many sub-modules inside, some of them might already exist vector recording scheme.
I check the batteryStats (my experience: see "Stats") then it open BatteryStats.ned
Let's also find the definition in C++ (Header and C files) of BatteryStats, you can find them with the first line in ned : package org.mixim.modules.power.battery. Go to this path in mixim directory and you will find.
After that, try by yourself to read the header and c++ definition of them, if they have some vector and scalar recording, then is good :)
If you are unlucky, that module does not have the scalar or vector you want, for example, throughput (must be recorded at node or different layer), then you should check the other submodules, or add new recording: calculation throughput vector or loss by yourself (consult omnet++ manual and googlegroups of omnet++)
In this case, batterystats has some vectors, but I see those vectors are not as interesting as scalars of batterystats. After reading C++ files, I found we should enable timeSeries of batterystats to be true (in the definition: Host802154_2400MHz.ned, I see default of timeseries is false)
**.batterystats.timeseries = true
For reference: you might see this line in BatteryStats.ned
// subscribe to battery status and record time series
// data in omnetpp.vec (resolution depends on battery's
// publishDelta)
bool timeSeries = default(false);
Re-run simulation, and I found the vector files has the content of some vectors from BatteryStats. However, I dont know why it cannot show on analysis of Omnet (Might be too little !!)
@Hoang_Linh_To thanks for your useful information, I will go through the simulation and discover more about it. I am completely new in mixim, do you have a tutorial or document about mixim. I want to design my network I have a scenario to implement. Thanks
Every packages such as mixim, omnet++ or inet, you can look for doc folder after installing. It's always there, detail or not will depend on specific project