swarm-support
[Top][All Lists]
Advanced

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

Re: Dropping agents?


From: Roger M. Burkhart
Subject: Re: Dropping agents?
Date: Fri, 27 Sep 1996 13:15:18 -0500

> Does anybody know of any general problems with *dropping* agents
> in the course of a swarm simulation?

> My initial (wild?) conjecture is that the activity scheduler, which
> traverses the bug list (sending them each a -step message) gets confused
> if the "currently stepping" bug gets dropped from this list.

If a bug removes itself from the bug list while executing its -step method,
then, yes, the index on the list that the scheduler maintains would become
invalid and likely cause a crash.

Since the scheduler permits any type of collection to be used as the target
of a ForEach action, I'm not sure there's any way we'll ever be able to
protect entirely against the possibility of this type of crash.  The special
collection feature for "safe indexes" (documented but not yet implemented)
will be standard for actions in a schedule but not on members of an
arbritrary user collection.

Probably the scheduler could be changed to guarantee that the index has
been moved off the current member when the message is sent to the
member.  That moves the problem somewhere else where it's less likely
to be a problem, but if you started removing members at random you
could still have a problem.  Probably the best option will be just to
require, as a user responsibility, that you use the "safe indexes"
option (once it's available) on a collection if you remove members while
you're running messages on them.

As a workaround for now the best approach is probably just to avoid
removing the bug list member within the step method, by arranging for it
to be removed at some later time, perhaps later in the same schedule cycle.
That could add significant complication, but for now might be the only way
to be entirely safe.

Roger Burkhart


reply via email to

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