[ns] Random motion for ad-hoc network

sara MA s_marashi at hotmail.com
Mon Aug 7 20:28:31 PDT 2006


hello:

I'm using these codes for creating random motion in an ad-hoc network:

	for {set i 0} {$i < $val(nn) } {incr i} {
	    set node_($i) [$ns_ node]
            $node_($i) random-motion 1 }

   	for {set i 0} {$i < $val(nn) } {incr i} {
	    $node_($i) start }

The distribution of my nodes looks random, but my problem is every time I 
run the nam file,  the initial positions of nodes is the same as last time, 
and they even move in the same way they moved as last time.

Do you know what maybe the problem?

Thanks:
Sara

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Ns-users mailing list