[ns] Movement of nodes should be modifiable during runtime of an ns-2 simulation

2007-08-22 Thread Schuenemann, Bjoern

Dear all,
 
I'd like to make a simulation with ns-2 where the movement of the nodes is 
modifiable by another program during the runtime of the ns-2 simulation. How 
could I realize this? It seems that modifications of trace and movement files 
are ignored by ns-2 after the files are read in by the TCL script.
 
Thank you very much for your help!
 
Regards,
Björn


Re: [ns] Movement of nodes should be modifiable during runtime of an ns-2 simulation

2007-08-22 Thread Daniel Mahrenholz

Hi Bjoern,

Schuenemann, Bjoern schrieb:
 I'd like to make a simulation with ns-2 where the movement of the nodes is 
 modifiable by another program during the runtime of the ns-2 simulation. How 
 could I realize this? It seems that modifications of trace and movement files 
 are ignored by ns-2 after the files are read in by the TCL script
I think the problem is that after reading the movement files all events 
that actually control the movement are already in the event queue.

One of my students implemented an external movement control some years 
ago for the emulation mode. Basically he adds a listening socket that 
takes simulator control commands from an external program, converts them 
to TCL code and evaluates them. Then he ran the simulation for an 
infinite time (and send a stop command from the external controller to 
exit) and could move the nodes around as he liked.

But, this only works in emulation mode. The reason is, if you are in the 
normal simulation mode, time will jump from event to event. And if there 
is the last movement event in the queue, the simulator possibly will 
jump to the final stop event and quit. So, only emulation ensures that 
your simulation time does not runs too fast.

I took a quick look but could not find the diploma thesis / code of the 
student. I will spend more time searching if you like. Title of the 
thesis was  Eine dynamische WLAN-Emulationsumgebung auf Basis des 
NS-2, Thomas Kiebel, Diplomarbeit, 2005.

Daniel.

-- 
Dr.-Ing. Daniel Mahrenholz
rt-solutions.de GmbH
Oberländer Ufer 190a
D-50968 Köln

Web: www.rt-solutions.de

rt-solutions.de
networks you can trust.



Re: [ns] Movement of nodes should be modifiable during runtime of an ns-2 simulation

2007-08-22 Thread Pedro Vale Estrela

Yes, looked at this issue, and the only way to do it in run-time is to use
emulation!

If the movement customization did not require run-time, it would be a simple
problem - the first program would just generate a movement file according to
some parameters.

Pedro Estrela
http://tagus.inesc-id.pt/~pestrela/ns2



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Daniel Mahrenholz
 Sent: quarta-feira, 22 de Agosto de 2007 15:46
 To: Schuenemann, Bjoern
 Cc: ns-users@ISI.EDU
 Subject: Re: [ns] Movement of nodes should be modifiable during runtime of
 an ns-2 simulation
 
 
 Hi Bjoern,
 
 Schuenemann, Bjoern schrieb:
  I'd like to make a simulation with ns-2 where the movement of the nodes
 is modifiable by another program during the runtime of the ns-2
 simulation. How could I realize this? It seems that modifications of trace
 and movement files are ignored by ns-2 after the files are read in by the
 TCL script
 I think the problem is that after reading the movement files all events
 that actually control the movement are already in the event queue.
 
 One of my students implemented an external movement control some years
 ago for the emulation mode. Basically he adds a listening socket that
 takes simulator control commands from an external program, converts them
 to TCL code and evaluates them. Then he ran the simulation for an
 infinite time (and send a stop command from the external controller to
 exit) and could move the nodes around as he liked.
 
 But, this only works in emulation mode. The reason is, if you are in the
 normal simulation mode, time will jump from event to event. And if there
 is the last movement event in the queue, the simulator possibly will
 jump to the final stop event and quit. So, only emulation ensures that
 your simulation time does not runs too fast.
 
 I took a quick look but could not find the diploma thesis / code of the
 student. I will spend more time searching if you like. Title of the
 thesis was  Eine dynamische WLAN-Emulationsumgebung auf Basis des
 NS-2, Thomas Kiebel, Diplomarbeit, 2005.
 
 Daniel.
 
 --
 Dr.-Ing. Daniel Mahrenholz
 rt-solutions.de GmbH
 Oberländer Ufer 190a
 D-50968 Köln
 
 Web: www.rt-solutions.de
 
 rt-solutions.de
 networks you can trust.