|
From: | Valmir Meneses |
Subject: | [Swarm-Modelling] True Concurrency? |
Date: | Wed, 31 Aug 2005 20:20:01 +0100 |
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,
|
[Prev in Thread] | Current Thread | [Next in Thread] |