Re: FRESH project - Supervisor Dr. A. Helmy

Henri DF <[email protected]> Tue, 13 Apr 2004 13:44:57 +0200 (CEST)
Newsgroups gmane.network.simulator.epfl
Message-ID <[email protected]>
Hi Hemen, 
Thanks for pointing this out. The problem was an old assert i had 
mistakenly left in several months ago (haven't used the drwalk in a long 
while, so it got a slight case of bit rot... :)

The patch below should fix the problem. 

Henri



Index: sim/mob/mobs.ml
===================================================================
RCS file: /home/anoncvs/camlrepo/nab/sim/mob/mobs.ml,v
retrieving revision 1.9
diff -u -r1.9 mobs.ml
--- sim/mob/mobs.ml	1 Apr 2004 13:35:48 -0000	1.9
+++ sim/mob/mobs.ml	13 Apr 2004 11:38:43 -0000
@@ -260,7 +260,6 @@
   (* ignores gran, meaningless for a discrete mob *)
   method getnewpos ~gran = 
     let pos = ((World.w())#nodepos owner#id) in
-    assert ((isint (xx pos) ) && (isint (yy pos)));
     let step = 
       [|
 	(1., 0.); 
@@ -278,7 +277,7 @@
       Params.x_size) -. 1.);
     if (!newy = (Param.get Params.y_size)) then newy := ((Param.get
       Params.y_size) -. 1.);
-    (!newx, !newy)
+    (World.w())#boundarize (!newx, !newy)
 
 end

> Dear Henri,
> 
> I was successfully able to run all the mobility models mentioned in NAB except 
> for Discrete random walk model.
> The error i am getting is "Assert failure on line 264 of mobs.ml."
> can you help me figure out how to go solve this error and wherre i am missing 
> something because i am planning to use this model on a grid like structure 
> similar to your eplf model where nodes will be moving in a DRWalk model on a 
> grid only.
> 
> Thanking you for your time and awaiting your response.
> 
> Sincerely,
> HEMEN R.VIMADALAL
> B.S. ELECTRONICS ENGINEERING(Mumbai University)
> M.S. ELECTRICAL ENGINEERING(U S C)
> Phone # (323)620 6279
> 
>