identify shortest path routing, sample tcl code

 

set dd 2
set st 0
set cr 1
set si [list]
set now [$ns now]

set m 0
for {set j 0} {$j < 25 } {incr j} {

 

set sre [lsearch $ne_ig “$j”]
set sre1 [lsearch $to_do “$j”]

 

set a [ expr $X1($j)-$X1($ne)]
set b [ expr $a*$a]
set c [ expr $Y1($j)-$Y1($ne)]
set d [ expr $c*$c]
set e [ expr $b+$d]
set f 0.5
set g [expr pow($e,$f)]

if {$g <= 250 && $ne != $j} {

lappend ne_ig “$j”

Leave a Comment