Use this proc:
http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652228

sample code:
------------

global opt
set opt(opt_conv) {
          { d my_delay_ms }
        ...
        }

set opt(my_delay_ms) 100                ;# default: 100 ms delay
my_getopt $argv
          

set opt(my_delay_s) [expr $opt(my_delay_ms) * 0.001 ]   ;# convert to
seconds


...

$ns make-lan "$TCP_BS $TCPr" 2mb $opt(my_delay_s) LL Queue/DropTail Mac
...

<change the trace name to include the current delay parameter, to create
different trace files>


Calling format in bash:
-----------------------

for i in "1 10 100 1000"; do 
        ns my_script.tcl -- -d $i
done



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




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Bilal AbuQadous
> Sent: sábado, 7 de Outubro de 2006 23:05
> To: ns-users@ISI.EDU
> Subject: [ns] How to change the parameters during the simulation to save
> thetime
> 
> 
> Dear ns users,
> 
> 
> 
> would you please tell me how I can change the parameters without stopping
> the simulation.
> 
> as eg.
> 
> 
> 
> how I can change the delay in the following command without stopping the
> simulation and make that automatic until the end.
> 
> 
> 
> $ns make-lan "$TCP_BS $TCPr" 2mb 0.001ms LL Queue/DropTail Mac
> 
> 
> 
> if I will make a test with different delay starting from 0.001, 0.01,
> 0.01,1,
> 10, 100, 150 ms, how I could make these changes automatically without
> entering new delay parameter by stop the simulation.
> 
> 
> 
> I need this thing To save the time and the effort.
> 
> 
> thank you in advance
> 
> 
> 
> 
> 
> 
> --
> AbuQadous, Bilal
> Alamiah Electronics (Systems Engineer)
> Mobile:+966507174541
> Office:+96638610044 ext:772
> P.O. Box 9912
> Dammam 31423
> KSA


Reply via email to