swarm-support
[Top][All Lists]
Advanced

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

Re: Synchronization problem


From: Marcus G. Daniels
Subject: Re: Synchronization problem
Date: 17 Mar 2001 08:53:42 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "RL" == Rob Leclerc <Rob> writes:

RL> that updating those values are suppose to occur concurrently. 

By default, updating will happen left-to-right. 

RL> I am in a situation where one agent moves on top of another agent
RL> -- although not on the grid, the agent on the bottom simply has a
RL> reference to the agent. 

So you want a notion of N items being at a certain grid site, but only
the one on top to run?  If the notion is that the environment is
acting on the agents, e.g. sun shining, then you might want to have
the model iterate over the cells calling a method like `getTop'.  You
could implement that with a stack on each cell (methods like push,
pop, getTop).  Otherwise, you could have the self-scheduled agents
call getTop on the cell (which they would have a field for), and compare
it with themselves (`this'), and if there was a match, do the behavior. 

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