Giter VIP home page Giter VIP logo

veins_scripts's Introduction

Veins scripts

This is a collection of scripts to make using Veins easier.

  • Scripts in the running/ subdirectory deal with running simulations.
  • Scripts in the eval/ subdirectory deal with result evaluation.

running/

generateRunsFile.pl

runs ./run -a in the current directory and outputs all possible combinations of ./run -u Cmdenv -c X -r Y lines (where X are all configurations and Y are all runs). Output is formatted for use with runmaker4.py (see https://github.com/veins/runmaker).

For example, given an .ini file that has a configuration section [Config WithBeaconing] which configures the simulation for 6 runs (e.g., 3 repetitions of 2 parameter values each), the following call and output might correspond:

$ generateRunsFile.pl | grep WithBeaconing
. ./run -u Cmdenv -c WithBeaconing -r 2
. ./run -u Cmdenv -c WithBeaconing -r 1
. ./run -u Cmdenv -c WithBeaconing -r 4
. ./run -u Cmdenv -c WithBeaconing -r 3
. ./run -u Cmdenv -c WithBeaconing -r 0
. ./run -u Cmdenv -c WithBeaconing -r 5

eval/

opp_vec2longcsv.sh

Converts an OMNeT++ .vec file into a long-format CSV. For example, given a file results/output.vec as follows...

version 2
run c1-0
attr configname c1
param *.prio 7

vector 0 net.node[0].mob posx ETV
vector 1 net.node[0].mob posy ETV
vector 2 net.node[1].mob posx ETV
vector 3 net.node[1].mob posy ETV
0	101	1	10
0	102	2	11
0	103	3	12
1	101	1	21
1	102	2	22
1	103	3	23
2	102	2	10
2	103	3	11
3	102	2	21
3	103	3	22

...the following call and output will correspond:

$ ./opp_vec2longcsv.sh results/output.vec
0 net.node[0].mob posx 101 1 10
0 net.node[0].mob posx 102 2 11
0 net.node[0].mob posx 103 3 12
1 net.node[0].mob posy 101 1 21
1 net.node[0].mob posy 102 2 22
1 net.node[0].mob posy 103 3 23
2 net.node[1].mob posx 102 2 10
2 net.node[1].mob posx 103 3 11
3 net.node[1].mob posy 102 2 21
3 net.node[1].mob posy 103 3 22

That is, each value of each vector will be output on a separate line, with each line containing

  • vector ID
  • module path
  • vector name
  • event number
  • time
  • value

opp_vec2csv.pl

Converts an OMNeT++ .vec file into a wide-format CSV. For example, given the same vector file as above, the following call and output might correspond:

$ ./opp_vec2csv.pl --merge-by em -A configname -P "*.prio" -F posx -F posy results/output.vec
event	time	node	configname	*.prio	posx	posy
101	1	net.node[0].mob	c1	7	10	21
102	2	net.node[0].mob	c1	7	11	22
103	3	net.node[0].mob	c1	7	12	23
102	2	net.node[1].mob	c1	7	10	21
103	3	net.node[1].mob	c1	7	11	22

That is, each line contains all requested vector values (here, posx and posy belonging together (defined by a merge criterion, here: event number and module path), along with arbitrary attributes (here: configname) and parameters (here: *.prio).

opp_sca2longcsv.sh

Converts an OMNeT++ .sca file into a long-format CSV. For example, given a file results/output.sca as follows...

version 2
run c1-0
attr configname c1
param *.prio 7

scalar net.node[0].app sent 1
scalar net.node[0].app recvd 2
scalar net.node[1].app sent 10
scalar net.node[1].app recvd 20

...the following call and output will correspond:

./opp_sca2longcsv.sh results/output.sca
net.node[0].app sent 1
net.node[0].app recvd 2
net.node[1].app sent 10
net.node[1].app recvd 20

opp_sca2csv.pl

Converts an OMNeT++ .sca file into a wide-format CSV. For example, given the same scalar file as above, the following call and output will correspond:

./opp_sca2csv.pl sent recvd -f results/output.sca
nod_name	sent	recvd
net.node[0].app	1	2
net.node[1].app	10	20

opp_csvsample.pl

Generates one-out-of-n samples from .csv files.

opp_csvcat.pl

Concatenates .csv files (essentially: concatenates multiple files while printing the header line only once)

That's it!

veins_scripts's People

Contributors

sommer avatar heinovski avatar dbuse avatar ion-turcanu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.