[ns] help with sensor network simulation problem!!
Hi,ns2 users: I am just start using ns2 to simulate sensor networks. It only requires support sensor data modeling, querying, updating etc operation. Is it possibile to simulate them wtih ns2-29 basic version? I didn't see a place to modeling sensor datas in ns2, does anyone can provide some guide? For nlr extension, the difference with basic ns2 version is that it sopport phenom(CO...), but what if I want to store specific sensor value (such as temperature)? How to extend to support this? Appreciate any help! Robin
[ns] help on simulating sensor networks
Hi,ns2 users: I am just start using ns2 to simulate sensor networks. It only requires support sensor data modeling, querying, updating etc operation. Is it possibile to simulate them wtih ns2-29 basic version? I didn't see a place to modeling sensor datas in ns2, does anyone can provide some guide? For nlr extension, the difference with basic ns2 version is that it sopport phenom(CO...), but what if I want to store specific sensor value (such as temperature)? How to extend to support this? Appreciate any help! Robin
[ns] Problem on large number of wireless nodes display on NAM
Hi,all: I am using ns2-29 to simulate wireless networks. I created 256 nodes and there mobility file. But I only see 215 nodes of them. Where are other nodes? I checked the .nam file and only see 215 nodes recorded. Is there any size limitation in .nam file? I spend long time in it. Pls give some help. Thanks robin # = # Main Program # == set ns_ [new Simulator] set tracefd [open dqt.tr w] $ns_ trace-all $tracefd set namtrace [open semme12.nam w] $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) #set god_ $val(nn) #$god_ off #$god_ allow_to_stop #$god_ num_data_types 1 # configure node $ns_ node-config \ -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -topoInstance $topo \ -channelType $val(chan) \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF for {set i 0} {$i < $val(nn)} {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 $ns_ initial_node_pos $node_($i) 25 } # # Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes # $node_(0) set X_ 1 $node_(0) set Y_ 1 $node_(250) set X_ 2121 $node_(250) set Y_ 2986 $node_(251) set X_ 2333 $node_(251) set Y_ 2986 $node_(252) set X_ 2545 $node_(252) set Y_ 2986 $node_(253) set X_ 2757 $node_(253) set Y_ 2986 $node_(254) set X_ 2969 $node_(254) set Y_ 2986 $node_(255) set X_ 3181 $node_(255) set Y_ 2986 #setdest format is "setdest " $ns_ at 0.01 "$node_(0) setdest 1 1 50.0" $ns_ at 0.01 "$node_(1) setdest 213 1 50.0" $ns_ at 0.01 "$node_(2) setdest 425 1 50.0" $ns_ at 0.01 "$node_(3) setdest 637 1 50.0" $ns_ at 0.01 "$node_(4) setdest 849 1 50.0" $ns_ at 0.01 "$node_(5) setdest 1061 1 50.0" $ns_ at 0.01 "$node_(6) setdest 1273 1 50.0" $ns_ at 0.01 "$node_(7) setdest 1485 1 50.0" $ns_ at 0.01 "$node_(8) setdest 1697 1 50.0" $ns_ at 0.01 "$node_(9) setdest 1909 1 50.0" $ns_ at 0.01 "$node_(10) setdest 2121 1 50.0" $ns_ at 0.01 "$node_(11) setdest 2333 1 50.0" $ns_ at 0.01 "$node_(12) setdest 2545 1 50.0" $ns_ at 0.01 "$node_(13) setdest 2757 1 50.0" $ns_ at 0.01 "$node_(14) setdest 2969 1 50.0" $ns_ at 0.01 "$node_(15) setdest 3181 1 50.0" $ns_ at 0.01 "$node_(16) setdest 1 200 50.0" $ns_ at 0.01 "$node_(17) setdest 213 200 50.0" . $ns_ at 0.02 "$node_(248) setdest 1697 2986 50.0" $ns_ at 0.02 "$node_(249) setdest 1909 2986 50.0" $ns_ at 0.02 "$node_(250) setdest 2121 2986 50.0" $ns_ at 0.02 "$node_(251) setdest 2333 2986 50.0" $ns_ at 0.02 "$node_(252) setdest 2545 2986 50.0" $ns_ at 0.02 "$node_(253) setdest 2757 2986 50.0" $ns_ at 0.02 "$node_(254) setdest 2969 2986 50.0" $ns_ at 0.02 "$node_(255) setdest 3181 2986 50.0" ### # setup UDP connections to data collection point, and attach sensor apps set null_0 [new Agent/Null] $ns_ attach-agent $node_(255) $null_0 for {set i 0} {$i < 255} {incr i} { set udp_($i) [new Agent/UDP] $ns_ attach-agent $node_($i) $udp_($i) set cbr_($i) [new Application/Traffic/CBR] $cbr_($i) set packetSize_ 512 $cbr_($i) set interval_ 4.0 # $cbr_($i) set random_ 1 $cbr_($i) set maxpkts_ 1 $cbr_($i) attach-agent $udp_($i) $ns_ connect $udp_($i) $udp_($i) $ns_ at 5.0 "$cbr_($i) start" } #Tell nodes when the simulation ends # for {set i 0} {$i < $val(nn) } {incr i} { $ns_ at 10 "$node_($i) reset"; } $ns_ at 10.1 "stop" $ns_ at 10.1 "puts \"NS EXITING...\" ; $ns_ halt" proc stop {} { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace } #Begin command line parsing puts "Starting Simulation..." $ns_ run
[ns] Help: scheduler going backwards in time...problem
Hello: I made some modification on gpsr routing protocol and trying to do some simulation on cbr traffic. When I run the tcl script, an error occured like this: ns: scheduler going backwards in time from from 20.05 to 0.00 Actually I manipulated the GPSR packet and do triangle routing. Each path use standard gpsr. I was wondering if it is related that the packet is somehow changed(but I didn't change it, all I do is to change the source and destination address)? Does anybody has experience on this error? Thanks robin
Re: [ns] Help: scheduler going backwards in time...problem
Hi, all: I found that on the trace file, only 20.0 seconds id recorded. The program is actually stuck in scheduler.cc file and cann't get out. Is it a timer related problem? Any clue? Have nice weekend! Robin Quoting [EMAIL PROTECTED]: > > Hello: >I made some modification on gpsr routing protocol and trying to do > > some simulation on cbr traffic. When I run the tcl script, an error > occured like this: > ns: scheduler going backwards in time from from 20.05 to > 0.00 > > Actually I manipulated the GPSR packet and do triangle routing. > Each > path use standard gpsr. I was wondering if it is related that the > packet is somehow changed(but I didn't change it, all I do is to > change > the source and destination address)? > > Does anybody has experience on this error? > > > Thanks > robin > > >