swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] How to terminate a GUISwarm?


From: Paul Johnson
Subject: Re: [Swarm-Support] How to terminate a GUISwarm?
Date: Wed, 14 Dec 2005 11:12:42 -0600
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Advice from someone who tried and failed: don't try to do it this way. Instead, write the model so you can re-start it from the command line with various options and a set random number seed. In the directory called memos under the SwarmFaq directory, there are several notes about how Java users can process command line arguments. If you want to run a model many times, in various batches with various settings, the command line approach is the way to go.

Shutting down the simulation and re-starting another seems like a great idea and I even had a working prototype "RepeatingHeatbugs" at one time, but it never was stable and now does not run at all. The problem is that you need to completely clean out everything in memory and get a fresh run at it to get truly manageable replication, and the simpleExperBug approach just doesnt work very well. I talked to several of the core development team who advised me not to pursue that approach. That's why the newer tutorial has the explanation about running batches with command line options.

pj

Patrick Schmidt wrote:

Hello,

I am using the java implementation of Swarm.

Currently I am searching for a way to terminate a running instance of a GUISwarm.

The background is that I want to do multiple runs of my model like in the simpleExperBug example (http://www.iba.k.u-tokyo.ac.jp/~iba/Swarmlec/yabuki03/swarm/tutorial/simpleExperBug). This includes terminating a instance of the model after it has been run.

In this example a running model swarm is terminated by calling getActivity().terminate();

However unlike this example my swarm, which needs to be terminated, is not of type SwarmImpl as the swarm in the example, but of type GUISwarm.

If I try calling getActivity().terminate() for this GUISwarm I get following error:

*** event raised for error: SourceMessage
*** function: auditRunRequest(), file: /src/swarm/src/activity/XActivity.m, line: 71
> cannot run an activity that is already completed
*** execution terminating due to error
/src/swarm/src/defobj/Symbol.m:187 -[Error(c) _raiseEvent:]

Where is my mistake? What else has to be terminated besides the activity? Is there any other way to terminate a GUISwarm?

Any help would be greatly appreciated.


Best regards,

Patrick Schmidt

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



--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700



reply via email to

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