swarm-support
[Top][All Lists]
Advanced

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

[no subject]


From: Laszlo Gulyas
Date: Wed, 15 Apr 1998 16:08:52 +0200 (MET DST)

Glen Ropella wrote:

>Marcus G. Daniels wrote:
>> LG> I want to stop it right away when some condition (inside the
>> LG> agent) becomes true.
>>
>> LG> I implemented it by
>>
>> LG> [getTopLevelActivity() terminate]
>>
>> Hmm, that should work. Is this in a GUI or Batch mode? If the former,
>> what if you try to stop the simulation, by sending a setStateStopped
>> to your GUISwarm subclass controlPanel?
>
>I would suggest this, as well, for two reasons: 1) I presume
>you actually want to "stop" the model, not "terminate" it.
>Terminate deletes things. Stop just halts them. 2) We had
>been trying to isolate "control" functions through the controlPanel
>and any amount of use that can be extracted from that would be
>preferable to using the low-level interface to the activity
>library.

Well, I am using batch mode and I have to do so. Moreover I want to
_terminate_ the whole simulation and not simply stop it. This means that I
cannot simply send setStateStopped to ControlPanel. 

After your suggestions I looked into the implementation of ControlPanel
and I discovered that 'setStateStopped' simply sends a stop message to the
topLevelActivity while the setStateQuit sends the 'well-known' terminate
message. I made some experiments during which I tried to send 'stop'
message or a 'send & terminate' combination to the top level activity, but
I've got ambiguous results. 

If I use the stop & terminate combination then I got the same result as
simply using terminate. If I use only the send message then the simulation
terminates if it's in batch mode but does nothing perceivable if it's in
GUI mode.

So, what to do next?

Yours,

Gulya from Budapest


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

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