[ns] Change output file

Debojyoti Dutta ddutta@ISI.EDU
Sat, 6 Oct 2001 07:50:18 -0700 (PDT)


I think this is what you can try:

proc change-trace { filename }
	global ns fp
	$ns $fp
	close $fp
	set fp [open $filename w]
	$ns trace-all $fp
}

set time 100
at $time "change-trace"  $newtracefile

debo

On Fri, 5 Oct 2001, Stefan Rank wrote:

> Hi,
> 
> is it possible to change the ouput file for the traces (not nam traces)
> during the simulation? I want to create multiple output files with one
> simulation run.
> 
> THANKS
> 
> Stefan
> 
>