swarm-support
[Top][All Lists]
Advanced

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

Re: dynamically-created swarms


From: Paul E. Johnson
Subject: Re: dynamically-created swarms
Date: Sat, 20 Nov 1999 15:31:17 -0600

When this eventually works, I'd really like to see it!

Michael Krumpus wrote:
> 
> In my simulation, Agents die and are born dynamically.  When I dynamically
> create a new Agent, I call [agent buildActions] to build its schedule, and
> then call [agent activateIn: population]. 
There needs to be a Swarm zone where you have "population", perhaps

[agent activateIn: [population getZone]] 

or
[agent activateIn: self] 

Usually you would have a schedule created in the buildActions phase, for
example agentSchedule, and then you would activate that.  I'm not quite
understanding what you mean by activatIn: called against an agent.

You have not told us how the agent is created, just scheduled. 
Presumably, the agent has "+createBegin" and "-createEnd" methods that
are called when it is born.  The activateIn thing does not create an
object, it just puts a schedule in the larger scheme of things.

I guess I'm saying it is hard for me to say what's wrong with your code
without seeing it.

I think the example in sss (look in swarm ftp) has some pretty good
hints how to create models that dynamically create and kill off agents. 
Generally, you write a "createAgent" method that has all the create
related calls in it, and then you can schedule methods that call
createAgents and integrate  your new creatures.

Good Luck.  I'm always eager to hear people working on the multilayer
swarms. There was a person working on such a thing at SMU, I believe,
but I don't have his name handy.  But if he is reading this...

 But, the agent never executes.
> This is precisely how I activate the initial population of agents and they
> run fine, but agents created and activated after the simulation has started
> don't ever run.  Upon return from activateIn, their status is "Completed"
> instead of "Initialized".  What am I doing wrong here?  Do I have to
> explicitly do something so that the new Agent's schedule is merged up into
> the master schedule?
> 
> Thanks in advance.
> p.s. I'm still on Swarm 1.4.1 on RedHat 6.0.
An antique!


-- 
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.



reply via email to

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