[NAB] question

jin kim <[email protected]> Tue, 27 Apr 2004 00:36:19 -0700
Newsgroups gmane.network.simulator.epfl
Message-ID <[email protected]>
Hello.
My name is Jin B. Kim, who is studyng ad hoc network at USC.
I'm testing EASE algoritm using NAB. But I have some question...


1. In lesson 3 (http://nab.epfl.ch/lesson3.html)

-------------------------------------------------------------------------  
 # let grease_cost = ref 0.0 and ease_cost = ref 0.0 and fresh_cost = ref 0.0;;
val grease_cost : float ref = {contents = 0.}
val ease_cost : float ref = {contents = 0.}
val fresh_cost : float ref = {contents = 0.}

# let route_cost_hook tot_cost l2pkt node =      
  let l3pkt = L2pkt.l3pkt l2pkt in               
  let ler_hdr =  L3pkt.ler_hdr l3pkt in        
  tot_cost := !tot_cost +. ((Ler_pkt.search_dist ler_hdr) ** 2.0);;
val route_cost_hook : float ref -> L2pkt.t -> 'a -> unit = 

# Nodes.gpsiter (fun n -> n#add_pktout_mhook ~stack:0 (route_cost_hook grease_cost));;
- : unit = ()
# Nodes.gpsiter (fun n -> n#add_pktout_mhook ~stack:1 (route_cost_hook ease_cost));;
- : unit = ()
# Nodes.gpsiter (fun n -> n#add_pktout_mhook ~stack:2 (route_cost_hook fresh_cost));;
-------------------------------------------------------------------------------
 It,,,, I think, looks like the only total searching disk size.
 Am I wrong????
 I think that total sum of route cost + total searching disk size is the cost...
but, it looks like only total searching disk size....




2. I want to print out the postion of nodes every test.
 Can you give me any suggestion? 

I would appreciate if you answer to me...

Regards.