Monday, April 29, 2013

NS-2 NAM Error

If following is the error when you run

$nam sample.nam
node 0 is not defined… node 0 is not defined… node 1 is not defined… node 1 is not defined… node 1 is not defined… node 0 is not defined… node 0 is not defined… node 0 is not defined… node 1 is not defined… node 1 is not defined… node 1 is not defined… node 0 is not defined… node 0 is not defined… node 0 is not defined… node 1 is not defined… node 1 is not defined… node 1 is not defined… node 0 is not defined… node 0 is not defined… node 0 is not defined… node 1 is not defined
 
Solution:
 $node_(0) set X_ 1236.434683198672
$node_(0) set Y_ 179.979610823970
$node_(0) set Z_ 0.000000000000
$node_(1) set X_ 1790.717030099859
$node_(1) set Y_ 83.776877593619
$node_(1) set Z_ 0.000000000000
 $ns_ at 0.000000000000 "$node_(0) setdest 8.478589906252 340.108921691462 0.138306462152"
$ns_ at 0.000000000000 "$node_(1) setdest 758.184447675563 73.841187162084 0.696734621404"
Add following two line at the after the mobility declaration.
$ns_ initial_node_pos $node_(1) 20
$ns_ initial_node_pos $node_(0) 20

2 comments:

  1. Hello sir,
    I want to simulate location aided routing protocol in ns-2.32 on ubuntu 11.10. I have created a mobility file and tried to run box.tcl file for simulation of location aided routing protocol.
    But I am getting the error "Invalid AODV type (26)" when option "set val(rp) AODV " is used and error "segmentation fault" when option "set val(rp) DSR" is used in box.tcl file.
    Can you help me to solve this error.

    ReplyDelete
    Replies
    1. Hi,

      You cant use same script for AODV and DSR, so it will give segmentation fault.

      For the first error, follow the link:

      http://ramakrishnamundugar.blogspot.in/2013/01/using-added-new-routing-protocol-in-ns2.html

      Delete