Thu, 12 Aug 1999 13:54:10 -0400 (EDT)
You can just change the access mode parameter on the file open command
(the one that creates the tcl file object for the trace file) to "a"
instead of "w". This will append the new traces to existing ones.
Be careful with this though, the trace file will get big in a hurry.
-George F. Riley (email@example.com)
-Grad Student Liaison
On Thu, 12 Aug 1999, Haobo Yu wrote:
> > If I want to run the same simulation for many times, only changing some
> > parameters, but I want to write data to the same trace file, what should I
> > do? Is there any such example?
> > I tried to use a single $ns for the whole simulation, but I am not sure if
> > it is possible. Also I am confused about "$ns run". Is there any parameter
> > for Simulator instproc run? The original code has no parameters defined, but
> > the NS notes and documents mentioned there are args.
> If you start and stop the simulation multiple times, although you can
> write to the same trace file, the result is a concatenation of all trace
> files, i.e., they are not continuous in time.
> I think a better way is to build your simulation so that those different
> sims with different params actually co-exist in a single run of
> simulation. tcl/ex/rbp_demo.tcl is an example, where 3 different types of
> TCP streams are run on 3 parallel (and identical) topologies, but in the
> same run...
> Of course doing postprocessing and combining traces there is always an
> - Haobo