swarm-support
[Top][All Lists]
Advanced

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

Re: terminating a simulation


From: Roger Burkhart
Subject: Re: terminating a simulation
Date: Thu, 1 Feb 96 16:28:46 MST

> Another question: I am trying 
> to tell the sim to stop (actually swarmActivity to stop) based on some if 
> statement in one of my instance objects.  Is this possible and if so how 
> do I do it?  I tried just sending [swarmActivity stop] since I already 
> had [swarmActivity run] but swarmActivity (actually part of SwarmPlan) 
> has no method called "stop". I tried looking through SwarmPlan.m but 
> nothing jumped out at me which might be the right way to go. Any ideas?

The message is "terminate."  If you the swarmActivity variable is visible
in the code where you want to stop, you could issue:

  [swarmActivity terminate];

Otherwise, the following statement is equivalent (getTopLevelActivity()
is a macro that returns the top-running swarm activity):

  [getTopLevelActivity() terminate];

Roger


reply via email to

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