Forum Replies Created
In fact, in a ns2 tcl script, each node will have a unique id by default.
From c++ code of ns2, we can also refer that node id.
Your question is not clear.
Kindly post your code using “code tag” Button. Other wise there will be trouble in copy it and test it for you.
In the section “XI. Generating traffic-connection and node-movement files for large wireless scenarios” of Marc Greis’s tutorial there is a simple example illustrating similar problem.
If you are trying it on ns2.26 and using the sample script provided by the authors then you will end up with same results.
If you are trying it on your script, then check the transmission range of your nodes, Transmission power and bandwidth. You may find your answer.
While I am trying the problem
I am getting split object unknown error
at the line $n1 add-route-to-adj-node -default $n2
I am using the command as follows
$ns rtproto Manual
set n1 [$ns node]
set n2 [$ns node]
$ns duplex-link $n1 $n2 10Mb 100ms DropTail
$n1 add-route-to-adj-node -default $n2
allke0527,
If you are successfully 😀 installed the NIST code in ns2 and getting some meaningful statistics and results, then your problem probably will not be in Otcl or tcl. You have to find the section of ‘c’ code which is handling the Hanover process and add your scheme in those sections.
The location information of nodes can be resolved in side the ‘c’ code or tcl simulation script(using X_, Y_ and Z_ values at an instant).So we can simulate GPS using a single function. (The neighbor information which we may require during finding location information can only be resolved in c code; tcl neighbor detection function will not work in wireless scenario)
Help with that or any code example about modification of the source file can be obtained after little effort on google(try keywords 💡 such as “ writing new agent for ns”, “new protocol for ns”). But, anyway, implementing our own handoff strategy in NIST code will take lot of time and effort 🙁 .