[ns] HELP:Error in running wireless tcl file

2007-03-31 Thread aritra pal

Hello everybody,I*  *am working on wireless
sensor networks and am presently studying the directed diffusion
protocol.while running the
"*ns-2.26/tcl/ex/diffusion/simple-diffusion.tcl*" file, it is giving
the following error regarding the use of the channel
variable:



num_nodes is set 3

warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl

can't read "chan": no such variable

while executing

"$node add-interface $chan $propInstance_ $llType_ $macType_ $ifqType_
$ifqlen_ $phyType_ $antType_ $inerrProc_ $outerrProc_ $FECProc_"

(procedure "_o3" line 70)

(Simulator create-wireless-node line 70)

invoked from within

"_o3 create-wireless-node 0"

("eval" body line 1)

invoked from within

"eval $self create-wireless-node $args"

(procedure "_o3" line 14)

(Simulator node line 14)

invoked from within

"$ns_ node $i"

("for" body line 2)

invoked from within

"for {set i 0} {$i < $opt(nn) } {incr i} {

set node_($i) [$ns_ node $i]

$node_($i) color black

$node_($i) random-motion 0 ;# disable random ..."

(file "simple-diffusion.tcl" line 10

please help.


-your`s,


aritra.


Re: [ns] RNG in ns

2007-03-31 Thread Michele Weigle

> Date: Sat, 31 Mar 2007 13:36:41 -0700
> From: "suhaib obeidat" <[EMAIL PROTECTED]>
> Subject: [ns] RNG in ns
> To: ns-users@ISI.EDU
> Message-ID:
>   <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>  Hi All,
>
> I am using ns-2.1b7. I need to define few exponential random  
> variables in my
> C++ code. However, I do not know how to advance the rng to the correct
> sub-stream for different runs/replicates.
>
> I know in recent ns versions, we can use the function  
> "reset_next_substream"
> but this function does not exist in the old ns-2.1b7
>
> I would really appreciate somefeed back because my simulation heavily
> depends on Markovian models.
>
> Thanks a lot
> Suhaib

The RNG in the newer versions of ns-2 is different than the one used  
in ns-2.1b7.  If you look in the source of rng.{cc,h}, I believe  
there are some "known good seeds".  You might be able to use those to  
generate independent replications.

Or, if you want to use the same RNG as in later versions, you might  
just want to grab the rng.{cc,h} files from a later version (such as  
ns-2.29).  You can get the files from cvs:
http://nsnam.cvs.sourceforge.net/nsnam/ns-2/tools/rng.cc
http://nsnam.cvs.sourceforge.net/nsnam/ns-2/tools/rng.h

-Michele




[ns] RNG in ns

2007-03-31 Thread suhaib obeidat

 Hi All,

I am using ns-2.1b7. I need to define few exponential random variables in my
C++ code. However, I do not know how to advance the rng to the correct
sub-stream for different runs/replicates.

I know in recent ns versions, we can use the function "reset_next_substream"
but this function does not exist in the old ns-2.1b7

I would really appreciate somefeed back because my simulation heavily
depends on Markovian models.

Thanks a lot
Suhaib


[ns] Simulation Time

2007-03-31 Thread ahmed nagy

 Dear All
I am developing a routing protocol and i would like to know how long should
i simulate it in order to get dependable results. I have 50 nodes in my
network in an area of 1000*1000 with a transmission range 250 m. Should the
experiment be repeated and the results averaged. if yes  How many times
should the experiment be repeated. Any idea would be appreciated. I
appreciate your response and help
Thank you


[ns] how to discard a redundant packet

2007-03-31 Thread sinduja R

if a base station is receiving redundant info from many nodes (wireless),
how to discard those pkts?
please help