Hi
I'm trying to swap out the default classifier in a node for my own agent.
The following code inserts my agent into the entry point of the node...
# Create CSG
set agt [new Agent/MyAgent]
puts "Node entry: [$n1 entry] agt entry: [$agt target]"
$ns attach-agent $n1 $agt
$n1 insert
Hi
I'm trying to swap out the default classifier in a node for my own agent.
The following code inserts my agent into the entry point of the node...
# Create CSG
set agt [new Agent/MyAgent]
puts "Node entry: [$n1 entry] agt entry: [$agt target]"
$ns attach-agent $n1 $agt
$n1 insert
feira, 29 de Janeiro de 2007 20:16
> To: ns-users@ISI.EDU
> Subject: [ns] node entry?
>
>
>
> Hi
>
> I'm trying to swap out the default classifier in a node for my own agent.
> The following code inserts my agent into the entry point of the node...
>
> # Cre
Ok,
The reason this wasn't working was because I'd defined the links to and from
$n1 prior to updating $n1's entry point. Thus, the following code works...
--
# Create nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
# Create MyAgent
# NOTE: $n1's entry point must be updated before