Re: FRESH project - Supervisor Dr. A. Helmy

Henri DF <[email protected]> Tue, 20 Apr 2004 18:18:28 +0200 (CEST)
Newsgroups gmane.network.simulator.epfl
Message-ID <[email protected]>
sorry, forgot the diff in the previous email.



--- mobs.ml.~1.10.~	2004-04-13 14:16:45.000000000 +0200
+++ mobs.ml	2004-04-21 18:14:57.000000000 +0200
@@ -123,7 +123,7 @@ object(s)
 
       dir_ <- s#new_direction;
 
-      let lambda = 1. /. (speed_mps *. (Param.get Params.x_size)) in 
+      let lambda = 1. /. ((Param.get Params.x_size) /. speed_mps ) in 
       (* The inter-change time is an expo; mean is the time to traverse
 	 distance of network size. *)
       let delta_next_change = Misc.expo ~rand:(Random.float rnd 1.0) 
~lambda in



> Hello Hemen, 
> 
> > Dear Henri,
> > 
> > Thank you for the prompt reply earlier.
> > Ok right now i am facing a small problem with billiards model when i am increasing the speed . The direction does not get changed if the speed is increased.
> 
> I'm not sure I understand this part. Why would you expect the direction to 
> change when the speed is increased?
> 
> > line:::::125
> > method private new_direction = (
> >      (* let rad = (Random.float rnd (2. *. pi)) -. pi in 
> >       polar 1.0 rad;*)
> >  if (Random.int rnd 2 = 0) then (
> >        let rad = pi in polar 1.0 rad)
> >     else (
> >       let rad = pi/. 2. in polar 1.0 rad )
> > )
> 
> btw a minor point: the above if statement can be simply written as:
> 
> if (Random.int rnd 2 = 0) then 
>     polar 1.0 pi 
>   else 
>     polar 1.0 (pi /. 2.)
> 
> 
> > I just want the nodes to move N S E W and refelect back but when i am implementing this nodes move N-S for a vey long time and donot change direction. 
> 
> It looks like you uncovered a bug ;) 
> I was computing the wrong lambda which was making the next direction 
> change be much too far ahead in time. I've attached a patch fixing this. 
> Please let me know if you still don't see the expected behavior with the 
> patch.
> 
> > Also how can i restrict the nodes to a grid like structure like you have 
> > done in EPFL ..could you provide me with some pointers to this.
> 
> will answer in a separate email.
> 
> henri
> 
> > 
> > Thanking you 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
> > 
> > 
> > 
> 
> 
> 
>