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: Fri, 2 Sep 2005 15:48:29 -0500

Running a single “step” method indefinitely might not really be what you want.  Most simulations are event-based and thus are designed to support step-wise or staged activities.  If you conceptually want a single step method that runs forever, you’d break the step method behaviors into separate pieces and activate these pieces when they are designed to occur (e.g., you’d activate them at the same time the single unified step method would have executed them).

 

Mike

 


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

 

Hi Mike,

I am thrilled with this discussion!.

I am sorry that I might have led to misunderstanding, it could be because english is not my native language.

What I meant with "alive at the same tick" is that one class of agent can instantiate many agents (objects).

And I do not know how to make two or more agents (instances) of the same class of agent have their task run at different processors (or threads) at the same time with the Scheduler.

What I understood is that in the same tick, the agents array is read and the step() method of each agent is ran in random or determined order. The step method of each agent is synchronous.

And for "threaded agent task" I meant that a step() method of an agent could run indefinetly until a pause, stop or end event is triggered by the command bar.

Sorry to make this discussion a lecture but it is really important for my research to get this issue thorougly cleared.

Thanks Mike and Marcus,

 

PS: I promisse to send a translated paper to you both!

 

 

 

----- Original Message -----

Sent: Wednesday, August 31, 2005 8:38 PM

Subject: RE: [Swarm-Modelling] True Concurrency?

 

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,

 

 

 

 


 


_______________________________________________
Modelling mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/modelling


reply via email to

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