[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Cannot assign cost to links
$ns simplex-link does not return a handle to the link. :(
Either create a simplex link first, then use [$ns link $n0 $n1] cost -10
(there might be a handy one let you do sth like $ns cost $n0 $n1 -10...)
Or go to your tcl/lib/ns-lib.tcl, find simplex-link, and put at its last
line 'return $link_($sid:$did)'
On Fri, 6 Oct 2000, Ann Monico wrote:
> Hi
>
> I'm having problem in assigning link cost for the
> links.Say for a simple
> case of 3 nodes 0,1 and 2 I'm doing the following
>
> set link1 [$ns simplex-link $n0 $n2 1Mb 10ms DropTail]
> $link1 cost -10
> set link2 [$ns simplex-link $n0 $n1 1Mb 10ms DropTail]
> $link2 cost -10
>
> While it works for the 1st link, for any subsequent
> links it gives the
> following problem:
>
> invalid command name "_o24 _o34"
> while executing
> "$link2 cost -10 "
>
>
> This command name "_o24 _o34" concatenates as more
> link objects are added.
>
> I'm very badly stuck, any help is appreciated.
>
> -ann
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
> http://photos.yahoo.com/
>