[ns] R: Ending the simulation after a transfer is finished

2006-07-04 Thread Marco Fiore

Prateek,

setting the finish time to a high value should not cause any 
harm, nor should it make you wait more.
Since ns-2 is an event-driven 
simulator, once no event is scheduled the time shall move directly to 
the
'end of simulation' event, in no (user) time.

I don't know if 
other better solutions exist, though.

Marco

Messaggio 
originale
Da: [EMAIL PROTECTED]
Data: 4-lug-2006 12.53 PM
A: ns-users@ISI.EDU
Ogg: [ns] Ending the simulation after a 
transfer is finished


Hi,

Is there a way to end the simulation 
just after a transfer is finished and
not by specifying a time on 
which to end it. For e.g.: my script has a line:

$ns at 5.0 $ftp 
send 6000

Where ns is a network simulator object and ftp is an ftp 
application object.
Now, I don't know at what time will this transfer 
be over. So, I can't have
a line which says:

$ns at 10.0 finish

I also don't want to use a big number for the time over there because 
that
will mean unnecessary waiting in most cases.

Is there a way to 
end the simulation when $ftp is over with its transfer? In
other 
words, is there a way to know the time when a transfer will be over?

Thanks,
Prateek Singhal

-- 
Prateek Singhal | mailto:singhal.
[EMAIL PROTECTED]





Re: [ns] R: Ending the simulation after a transfer is finished

2006-07-04 Thread Prateek Singhal

Hi Marco,

I think this does not hold if the Scheduler type is Realtime, right? I
should have mentioned that earlier :(

Prateek

On 7/4/06, Marco Fiore [EMAIL PROTECTED] wrote:

 Prateek,

 setting the finish time to a high value should not cause any
 harm, nor should it make you wait more.
 Since ns-2 is an event-driven
 simulator, once no event is scheduled the time shall move directly to
 the
 'end of simulation' event, in no (user) time.

 I don't know if
 other better solutions exist, though.

 Marco

 Messaggio
 originale
 Da: [EMAIL PROTECTED]
 Data: 4-lug-2006 12.53 PM
 A: ns-users@ISI.EDU
 Ogg: [ns] Ending the simulation after a
 transfer is finished
 
 
 Hi,
 
 Is there a way to end the simulation
 just after a transfer is finished and
 not by specifying a time on
 which to end it. For e.g.: my script has a line:
 
 $ns at 5.0 $ftp
 send 6000
 
 Where ns is a network simulator object and ftp is an ftp
 application object.
 Now, I don't know at what time will this transfer
 be over. So, I can't have
 a line which says:
 
 $ns at 10.0 finish
 
 I also don't want to use a big number for the time over there because
 that
 will mean unnecessary waiting in most cases.
 
 Is there a way to
 end the simulation when $ftp is over with its transfer? In
 other
 words, is there a way to know the time when a transfer will be over?
 
 Thanks,
 Prateek Singhal
 
 --
 Prateek Singhal | mailto:singhal.
 [EMAIL PROTECTED]
 





-- 
Prateek Singhal | mailto:[EMAIL PROTECTED]