Result collecting and vector data to gnuplot data question

437 views
Skip to first unread message

GTsiou

unread,
Jul 5, 2010, 9:39:25 AM7/5/10
to omnetpp
Hi,
Sorry if this has been answered before but i couldn't find any
reference. I 've just started working with omnetpp and i want to turn
my results files (scalars and vectors collected using signals) into
gnu-plots. I am rather new to this, learning omnetpp for academic
purposes, so i'd appreciate a detailed answer if you know of an
efficient way.

Right now, i am using scavetool, to extract from the vector files the
columns i want to use with gnuplot, for example the number of the
vector and the hopCount stat, (x axis vector, y axis hopCount), but
the resulting file (either csv or splitcsv), isn't readable right away
from gnuplot, i have to open the file and comment out the text lines
(you can;t do this in large splitcsv files) and then gnuplot will read
it. Is there any other, more efficient way to do so, using scavetool?
(both for vector and scalar files especially with histogram). The
command i am using for the time is of the type: < scavetool vector -p
"hopCount:vector" -O hopCount.csv -F csv -V General-0.vec >

On the other part of my question, i'd like to collect summary data
from a number of batch runs using the signal mechanism, for example in
a propabilistic flooding implementation in grid topology, i want to
create a gnuplot with x axis the number of total messages send (even
after alla the nodes have received the initial message, since there
may be more messages underway - using Square Grid topology), and a y
axis, with the propability. I plan to run 100 repeats on a 5x5 grid,
then 100 on 10X10 etc and then create the respective gnuplot-files for
each batch, so i can plot all of them on the same plot. So, can i,
using the signal mechanism (a cListener maybe), gather the total
messages sent in a repeat and the propability in that repeat, and
store it on a vector or scalar file? If yes, how can i afterwards,
gather the data from all the files regarding lets say the 5x5
scenario, in a single file for plotting? I know that the scalar files
can gather the data from all the repetitions but on differents block
of data, and although i have seen the sum() function on scavetool, i
don't know how to use it, i don't even know if it can be used for this
purpose.

Any help would be appreciated,
GTsiou

Andras Varga

unread,
Jul 5, 2010, 12:17:17 PM7/5/10
to omn...@googlegroups.com
Hi,

I would recommend that you use R (r-project.org) for all this. It is a very
capable open-source statistical computing language or environment (not
unlike Matlab), with very strong graphics support (see e.g.
http://www.r-project.org/screenshots/screenshots.html).

You can load a plugin for loading vec and sca into R here:
http://www.omnetpp.org/omnetpp/doc_details/2222-omnetpp-r-package-version-01

And a tutorial for the package is here:
http://wiki.github.com/omnetpp/omnetpp-resultfiles/omnetpp-r-package-tutoria
l

and there are many excellent tutorials on the web for R, for example
http://freshmeat.net/articles/creating-charts-and-graphs-with-gnu-r

No scavetool, awk, perl or gnuplot is needed, you can do everything inside
R.

Regards
Andras

--
You received this message because you are subscribed to the Google Groups
"omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to
omnetpp+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/omnetpp?hl=en.

turingns2

unread,
Mar 31, 2014, 9:28:36 AM3/31/14
to omn...@googlegroups.com
I've some issues to install R-packages in Ubuntu 12.04 (I can't get R working in Ubuntu 13.10). I solved as follow:

# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
# apt-get update
# apt-get install r-base

Get the latest omnetpp-resultfiles package for R package (I get omnetpp_0.2-1.tar.gz):

https://github.com/omnetpp/omnetpp-resultfiles/downloads

Then, I followed the tutorial: https://github.com/omnetpp/omnetpp-resultfiles/wiki/Tutorial-for-the-omnetpp-r-package

Hope this help.
Reply all
Reply to author
Forward
0 new messages