swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Time Stepping in Swarm.


From: Ed Baskerville
Subject: Re: [Swarm-Support] Time Stepping in Swarm.
Date: Tue, 18 Jan 2005 15:34:11 -0800

I've done something like this for debugging purposes in one of my (non-Swarm-based) models: just add something like this as the last thing that happens during a timestep to wait for a Return keypress:

printf("Press Return to go to the next timestep.");
while(getch() != '\n');

You'll probably want an easy way to turn this on and off--either add a command-line parameter and put those lines in an if statement that checks the parameter, or wrap them in an #ifdef and use gcc's -D option, e.g.

#ifdef DEBUGMODE

printf("Press Return to go to the next timestep.");
while(getch() != '\n');

#endif

Compiling with gcc -DDEBUGMODE will mean the lines print; compiling without it means they won't.

--Ed

On Jan 17, 2005, at 10:57 AM, Steve Railsback wrote:

Mervin Chan wrote:

> My simulation is running in Batch mode, no GUI.
>
> Can I use control panel with my simulation with no GUI?

I suppose you could create a version that is graphics mode but includes no graphics other than the control panel?

By the way, I meant "Next", not "Step".

Steve

--
Lang Railsback & Assoc.
250 California Ave.
Arcata, California 95521
707 822 0453

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support




reply via email to

[Prev in Thread] Current Thread [Next in Thread]