On Oct 5, 2004, Sean Luke wrote:

> Without some bookeeping (which adds cost
> elsewhere), removing objects from heaps is O(n) -- expensive...

Thanks for the extensive discussion about what goes on in schedule in
your two notes.

> If you have a very large number of objects in the heap, so many that
> it's causing problems memory-wise, we can figure out some way to remove
> objects from the heap.  But I'd be surprised: you'd need to be looking
> at millions of agents probably.

You're right -- I'm hoping I won't see time and space impacts until I
get to the point of that many agents (if I ever do).  As you've pointed
out to me, wrapping things in Multistep and using an order of magnitude
or two higher step rate for expensive computational things (like
sorting on all the agents for an attribute for graphing purposes) is an

> Instead, as you've said you're already doing, you should "turn off" the
> Steppable so that when step() is called it it is simply ignored.

I think I'll stick with this method, though the code you've posted will
probably be useful in the future.

It's funny--I remember a series of infrequent discussions in 1997 or so
on the Swarm devel list about "death."  Apparently it is one of two
things inescapable in life ;)