Aqua-Sim in NS2
Hello Sir,
system descriptions: Aqua-Sim-1.0, ns-2.30, ubuntu 16.4 32 bits I run vbf_example_5.tcl..It works ok. But in nam i cannot able to know which node is source and which node is destination.There is no clear distinction between source and destination node.Some circulation is showing which shows transmission is happening.Can you help me sir? |
1 Attachment(s)
It's rather easy to mark nodes with text, etc.
"vbf_example_4.tcl" (New name for the edited vbf_example_5.tcl) .... source node: Code:
276 #Set the source node - |
Thanks sir for telling the source node.But still I am unable to determine which node is destination.Can you please help me?
|
Re #3.
You can still save the terminal output : $ ns-aqua vbf_example_4.tcl > 4.txt |
Can you send me vbf_example_4.tcl?So that I can better understand
|
Re #5.
vbf_example_4.tcl, as post #2 ... and vbf_example_3.tcl: nodes 0-4 turn red → aquasim-examples-Jun21.17.tar.gz → → https://drive.google.com/file/d/0B7S...ew?usp=sharing All ns2-examples https://drive.google.com/drive/folde...Ws?usp=sharing - |
Thanks sir for providing me links. But again sir there is no label which tells which node is destination like in aodv protocol examples we can see label of both source and destination.I can see source node label from coding of vbf_example_3.tcl and 4vbf_example_4.tcl but please sir can you tell me destination node label?
Is below coding is for destination node? #Set the Sink node set node_(0) [ $ns_ node 0] $node_(0) set sinkStatus_ 1 $god_ new_node $node_(0) $node_(0) set X_ 500 $node_(0) set Y_ 0 $node_(0) set Z_ 0 $node_(0) set passive 1 set rt [$node_(0) set ragent_] $rt set control_packet_size $opt(routing_control_packet_size) set a_(0) [new Agent/UWSink] $ns_ attach-agent $node_(0) $a_(0) $a_(0) attach-vectorbasedforward $opt(width) $a_(0) cmd set-range $opt(range) $a_(0) cmd set-target-x -20 $a_(0) cmd set-target-y -10 $a_(0) cmd set-target-z -20 $a_(0) cmd set-filename $opt(datafile) $a_(0) cmd set-packetsize $opt(packet_size) ;# # of bytes |
Hello Sir,
Can you provide links for learning or understanding tcl programming so that i can understand how traffic is generated and flow of data taken place? As i am confused with agent and application i.e traffic source generator.And there is same agent which is used in tcl for aquasim like UWSink is attached to almost all nodes.How this work can take place? Please help sir... |
Re #8.
Ns2: Not really the tcl language, but OTcl: Object oriented extension of Tcl . https://www.isi.edu/nsnam/otcl/doc/tutorial.html . http://nile.wpi.edu/NS/otcl.html Tcl https://www.google.com/webhp?hl=all&...q=tcl+tutorial OTcl https://www.google.com/webhp?hl=all&...l#hl=en&q=otcl I do not write tcl or otcl code, but can use 'grep' to find expressions in the other 2000 simulation examples https://drive.google.com/file/d/0B7S...ew?usp=sharing ← "Catalog link" https://drive.google.com/drive/folde...Ws?usp=sharing ... and copy useful bits of text : Do and try. The post #2 edits are based on "aodv10ms.tcl", "aodv10nodes.tcl". $ man grep $ grep -n red * $ grep -n blue * - |
Thanks sir for your help but these links are not besides to my work.If you found something related to communication set up between nodes kindly share with me. I Will be thankful to you!
|
Hello Sir,
In vbf_example_5.tcl I have increased a no.of nodes by 1 means total nodes are 7 in my modified tcl..but when i increase it gave me errors: shaveta@shaveta-Aspire-4738Z:~/Aqua-Sim-1.0/ns-2.30/underwatersensor/uw_tcl$ ns-aquasim vbf_example_5.tcl the file name is vbf_example_5.data the sending interval is 10.0 num_nodes is set 7 Width=100 INITIALIZE THE LIST xListHead can't read "a_(5)": no such element in array while executing "$a_($i) set data_rate_ [expr 1.0/$opt(interval)]" ("for" body line 2) invoked from within "for { set i 1 } { $i<$opt(nn) } {incr i } { $a_($i) set data_rate_ [expr 1.0/$opt(interval)] $ns_ at $start_time "$a_($i) cbr-start" set start_time..." (file "vbf_example_5.tcl" line 303) Changes in code: set opt(nn) 7 ;# number of nodes (change 7 from 6 in code) Please help me |
1 Attachment(s)
Re #11 : No automatic settings of nodes in vbf_example_4.tcl .. vbf_example_5.tcl .
Which means that the settings must be written for each node : See vbf_example_5.tcl, lines 142 .. 272 : That's node 0 to node 4. Easy : Copy "the node 4 section" to below "the node 4 section" and edit all 4 to 5. Set X,Y to your preferred location. New file name : vbf_example_4-7n.tcl Code:
271 $a_(4) cmd set-packetsize $opt(packet_size) ;# # of bytes - |
Thanks so much sir!It works now..
|
Hello Sir,
Now I am running vbf_example_6.tcl..This tcl consists of 100 nodes and in this every node is not separately defined. One node define and other nodes are put in loops.Almost all coding is similar to vbf_example_5.tcl. But when i run vbf_example_6.tcl nam window just opens and nodes are moving only without doing any transmission. I am unable to know why transmission between nodes do not takes place? |
1 Attachment(s)
Re #14.
Quote:
You can experiment with filters → vbf_example_7.tcl Code:
#set opt(filters) GradientFilter ;# options can be one or more of Code:
#Set the source node Code:
set opt(stop) 1000 ;# simulation time Code:
$ ns-aqua vbf_example_7.tcl > vbf7.txt Link, vbf_example_7.tcl https://drive.google.com/file/d/0B7S...ew?usp=sharing - |
All times are GMT -5. The time now is 09:23 PM. |