[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Running multiple simulations with a single tcl script
On Wednesday 15 August 2001 02:56, Giuseppe Tringali wrote:
> Hi ns users,
>
> first of all, thanks a lot to Brian Lee Bowers and Lloyd Wood for
> their answers.
You're welcome.
> I think I should insert the code for the simulation after the line
> # now use time for something
The code I wrote only extracts the times from the command line
arguments, you have to do something with them. Yes, you need to add
code after "# now use time for something" to make your sim do
something useful.
> but, since there is a finish procedure with an exit command, when
> this exit command is reached the simulation stops (I suppose).
>
> Where is my mistake? Could you help me?
If you exit the script, then you are done. That was one reason I
chose to use both Perl and Tcl for getting these types of things
done. I write a simple Tcl script to run my simulation, then a I
write a simple Perl script to run the Tcl script multiple times.
(You can accomplish much the same thing with shell scripts, but I'm
more comfortable with Perl).
My suggestion to you is to learn another scripting language (whether
it be Perl, or shell, or some other) to automate running ns scripts.
--
Brian Lee Bowers | RADIANT Team (Summer Intern)
bowersb@lanl.gov | Los Alamos National Laboratory