swarm-modeling
[Top][All Lists]
Advanced

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

RE: [Swarm-Modelling] True Concurrency?


From: North, Michael
Subject: RE: [Swarm-Modelling] True Concurrency?
Date: Wed, 31 Aug 2005 14:38:55 -0500

The answer depends on what “threaded agent tasks” and “’alive’ at the same tick” mean.  If these phrases mean that the code for two different agents executes at the same physical moment on two different processors (with shared memory) then Repast can do this.

 

Mike

 


From: address@hidden [mailto:address@hidden On Behalf Of Valmir Meneses
Sent: Wednesday, August 31, 2005 2:20 PM
To: address@hidden
Cc: Swarm Modelling
Subject: [Swarm-Modelling] True Concurrency?

 

Hi,

I posted the following message in the Swarm list:

-------------------------------------------------------------------------------------------------

Hi,

Is Swarm concurrent (agents run concurrently) or implements threaded
schedules like "swarm-alike" Repast?

A bit more detailed. Repast runs the agent action within a schedule. At
some tick, the agent list is scanned and each agent is given attention.
But, as far as I know, the agents do not run concurrently. Within each
tick, the agents are chosen randomly to determine who will have
attention. Repast implements "simulated concurrency".

Since Repast claims to be based in Swarm, I wonder what is the Swarm
behaviour?

Thanks for your help,
-------------------------------------------------------------------------------------------------------------

 

And Mike North replied:

 

-------------------------------------------------------------------------------------------------------------

As a quick note, Repast supports both simulated and true concurrency.
Repast's simulated concurrency works the way you outlined below.  True
concurrency (i.e., parallel execution) can be achieved using the Repast
scheduler methods with "duration" parameters.  Setting non-zero
durations will cause the scheduler to concurrently execute tasks that
have overlapping time durations.  If you have multiple CPUs available
then the tasks will execute in true parallel form on multiple CPUs.  The
Repast scheduler uses thread pooling to make this efficient.  Of course,
model developers are responsible for making sure that true parallel
execution makes sense for their model.  This generally means that the
model needs to be thread safe.

 

Mike
-----------------------------------------------------------------------------------------------------------------

 

I was aware that Repast scheduler uses thread pooling. But my understanding of this mechanism (Please! Correct me.) was that it allows threaded schedules but does not allow threaded agent tasks. Two or more agents are not "alive" at the same tick.

Is this correct?

As I am working on a paper on concurrency in Multiagent Frameworks (Repast, Swarm and Ascape), please correct my understanding of the mechanism.

Any  pointer to articles that would help in the article are fully appreciated.

Thanks Mike,

 

 

 

 


 


reply via email to

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