[Simulators for Sensor Networks]

P2P Network Simulation


See [p2psim], mentioned on [this article from slashdot].

DAJ


http://www.risc.uni-linz.ac.at/software/daj/

O DAJ é um simulatdor closed-source muito simples. É ideal para quem quer ter uma idéia de como fazer simulações de rede. Possui um ótimo tutorial introdutório e vários programas-exemplos que podem ser usados como base para a construção de várias simulações.

Contudo, ele é tão flexível quanto ele é simples: não dá para fazer coisa muito complicada nele. O modelo de rede é com conjunto de nós com canais FIFO unidirecionais. A simulação é deterministica: se você não utilizar delays randômicos ou coisas do tipo, dificilmente você terá duas simulações diferentes. Existe também um limite para o número de nós que a rede pode ter: 100.

JavaSim


"It provides a dual-language environment in which Java is used to implement network components, and a script language is used as the glue that integrates and configures components at runtime. Currently the Tcl and Python scripting languages are supported. ... The fidelity of simulation results has been validated through comparison against results obtained from ns-2 and well-known theoretical results. With smaller memory footprint, JavaSim exhibits better scalability than ns-2 (SSFNET) in network simulation scenarios of more than 10,000 (< 4000) nodes (on a PC with dual Pentium III 6000 MHz and 256 Mbytes RAM)."[src]


NS-2


É o simuladore de redes academicamente mais respeitado. Tem uma curva de aprendisado nada convidativa, mas os resultados obtidos com ele são tidos como referência para vários outros simuladores.

Em http://www.dcc.ufmg.br/~fred/redes.pdf pode-se encontrar um minicurso preparado pelo pessoal da UFMG sobre a simulação da internet/protocolos internet usando o na.

Para simulação de RendesDeSensores? existem os seguintes links:

TCL

Alguns conceitos básicos de TCL e OTCL

proc test {} {
    set a 43
    set b 27
    set c [expr $a + $b]
    set d [expr [expr $a - $b] * $c]
    for {set k 0} {$k < 10} {incr k} {
        if {$k < 5} {
            puts “k < 5, pow= [expr pow($d, $k)]”
        } else {
            puts “k >= 5, mod= [expr $d % $k]”
        }
    }
}
test

Class mom
mom instproc greet {} {
    $self instvar age_
    puts “$age_ years old mom: How are you doing?”
}

Class kid -superclass mom
kid instproc greet {} {
    $self instvar age_
    puts “$age_ years old kid: What’s up, dude?”
}

set a [new mom]
$a set age_ 45
set b [new kid]
$b set age_ 15

$a greet
$b greet

Adding a new routing protocol to NS


Some folks said that NS was build with C++ and OTCL in order to make the coding more flexible, efficient and easier to extend by the means of the object-oriented paradigm. Well, that´s plain bullshit because the code in NS is a complete mess of un-interperable things barely glued together in order to give the programmer the ilusion that there´s a tight coupling between his coding in TCL and the undeling C++ classes. In reality, the OO concepts are completely distorted in the C++ code in order to favor the TCL ilusion. AFAICT, the concept of code-reutilization those folks have is "You don´t have to code your own IEEE 802.11 MAC layer to do your simulation, use ours!" instead of "You can use UDP as base-class of your own datagram-based protocol", i.e., unless you want to make your own routing protocol or whatever, NS can be of some use. Otherwise, you will spent a hell-huge amount of time trying to make your ways through the nastiness of the c++/otcl coupling - an let me tell you in thing, OO here have the same feeling of OO in VB 3.

Having said that, let´s see what you have to do in order to add your very own routing protocol to NS.

  1. Create a new agent and the respective headers for your protocol
    1. Headers
      See Chap. 12 of the [NS Manual] and Chap. VII [of the NS tutorial]
    2. Protocol
      See Chap. VII of the tutorial and somewhere like chap. 9 of the manual.


Links


Outros Simuladores


Simulators in Python

http://www.pyzine.com/Issue007/Section_Articles/article_SimPy.html