swarm-modeling
[Top][All Lists]
Advanced

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

Re: Creating Dynamic Swarms


From: glen e. p. ropella
Subject: Re: Creating Dynamic Swarms
Date: Mon, 20 May 2002 10:39:31 -0700

>Hi all
>
>In my  simulation I want that one of my agents create a swarm, in a
>dynamic way. By "dynamic" I mean to create this swarm in the simulation'
>run time. Is it possible? Any help?

It is certainly possible.  The first question is what do you mean by "creation"?
If you program a Swarm (like the ModelSwarm) ahead of time and compile
it with the rest of your code, then having an agent create a swarm at runtime
consists solely of invoking the Constructor for that swarm class in order to
get an instance.

However, if you mean you want to construct a Swarm without this pre-programming,
then you'll have to either use DefObj and chop up and reorganize some 
pre-existing
classes and methods during run-time in order to create a new class on-the-fly.
Or, you can have the agent actually write code, compile it, load it, and run it.

Another option as a hybrid between the former paragraph and the latter is to
write a highly parametrized swarm class that has various setup methods.  Then
your agent can call the Constructor, execute several setup methods, then 
activate
the swarm in some parent swarm.  If you chose this path, you could either take
the overhead hit of a regular class/instance relationship, or use the defobj
CREATING/USING macros.

glen
-- 
-- glen e. p. ropella                              =><=                         
    Hail Eris!
"...the closest thing to a genuine panacea- known to medical science is
work." -- T. Szasz
Home: 831.335.4950                          =><=              Cell: 831.247.7901


                  ==================================
   Swarm-Modelling is for discussion of Simulation and Modelling techniques
   esp. using 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]