swarm-support
[Top][All Lists]
Advanced

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

Re: Circle


From: donalson
Subject: Re: Circle
Date: Tue, 01 Sep 1998 14:02:32 -0700

You don't actually need a space object to model this, although it is useful
for display purposes.  If you want to model a "ring" structure, as part of
each bank object have two id's, say neighborLeft and neighborRight.  When you
create the objects you can then add in the adjacencies.  You can model the
center of the "wheel" the same way, but you might want to make it a array of
id's with length equal to the number of banks in your simulation.

If you want to add space to it, just put the id's for your agents into an
object 2D grid.
In pseudo code: (This is NOT executable code!)

id  <Grid2d>  myWorld;
aBank=[Bank create begin];
[myWorld putObject: aBank atX:  5  Y: 7]

Now you can literally just chose your x's and y's to make a pseudo-circle in
the grid, and of course you put the non-bank in the center of the circle.

You can then steal the heatbugs display method to use shades of color to
display relative and/or absolute values of each objects internal variables.

I know this is a bit terse, if you want more help, let me know, I have already
coded up most of this.  Also, the configuration you are looking at is (or at
least was) a way to due distributed processing in computer engineering.  There
may be some research out there on the characteristics of this type of system.

Cheers,

   D3

Alessandra Cassar wrote:

> Hi all,
> has anyone modeled an environment where agents (banks) are on a circle
> and can communicate (trade) only with the 2 neighbors, while in the
> center there is a different kind of agent (a non financial trans.) that
> can communicate (trade) with all the nodes?
> It is the same, I think, that having the agents on a line with the firt
> and the last that are neighbor, and another agent thatcan communicate
> with all of them.
> 1. Which space object may I use (I tried to trick a 2D imposing Y=0 but
>    it did not work)?
> 2. I am not sure about which one of the applications is more similar to
>    mine (so I can use the same structure of the program), maybe
>    SimpleObserverBug in the tutorial?
> Thank you very much
> Alessandra
>
> P.S. I am sorry if these are really stupid questions, but I am an absolute
> beginner at her first program (I started only 4 weeks ago reading a C
> Manual, an Objective-C one, and the Swarm tutorial) !!!
>
>                   ==================================
>    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.
>                   ==================================



--
*********************************************************************
* Doug Donalson                 Office: (805) 893-2962
* Ecology, Evolution,           Home:   (805) 961-4447
* and Marine Biology            email address@hidden
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*
*   The most exciting phrase to hear in science, the one that
*   heralds new discoveries, is not "EUREKA" (I have found it) but
*   "That's funny ...?"
*
*       Isaac Asimov
*
*********************************************************************



                  ==================================
   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]