[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Agent Pools
From: |
Paul E Johnson |
Subject: |
Re: Agent Pools |
Date: |
Wed, 28 Mar 2001 06:18:44 -0600 |
Rob Leclerc wrote:
>
> Given that my predation model both creates and drops a lot of agents
> through the simulation, I am curious to know whether or not it would be
> cheaper if I created a large pool of agents at the begining of the
> simulation, and set a flag in the methods normally scheduled, such that if
> "isDead == true", that this would simply leave that method call. This way I
> don't have to do dynamic scheduling OR object creation, but would the extra
> overhead be worth it? I simply don't know the costs of each.
>
> Rob Leclerc
It is pretty common to "recycle" agents when they are supposed to die.
Object creation is a slow thing, and you just put them in a queue
somewhere, and then if you need births, you take and adjust your
objects. Seems like you don't need dynamic scheduling if you can address
your problem by just removing agents from a list that is repeatedly
processed.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
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.