Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE: problem while creating communicating agents during simulation

New Message Reply Date view Thread view Subject view Author view

Subject: RE: problem while creating communicating agents during simulation
From: Nicolas Becu (nicolas.becu@gmail.com)
Date: Wed Oct 22 2008 - 11:13:52 CEST

Dear Olivier,

I used exactly the same trick as you did to initialize the communication
channel of agent created during simulation by another comm. Agent.
For the moment it didn't cause any problem and I don't think it will because
as far as I understood there is only one instance of channel used for all
comm. entities of the model. So from wherever you pick it, it's all the
same.
Yet, we would have expect Cormas to manage by itself the initialization of
agents' channel during simulation ;) :D

Regards,

Nicolas

-----Message d'origine-----
De : owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] De la
part de Olivier Barreteau
Envoyé : mercredi 22 octobre 2008 04:44
À : cormas@cirad.fr
Objet : problem while creating communicating agents during simulation

Hi,

I am currently implementing a model in which instances of subclass of
AgentComm
(let's say AgentComm1) do launch creation and init of other instances of
another subclass of AgentComm (let's say AgentComm2).
This raises a problem because channel attribute of AgentComm is initialized
in
CormasModel initSimulation.
Creating these new instances of AgentComm2 from an instance of AgentComm1 I
can't get the channel attribute of the model.

My solution to get through this has been to give the value of channel
attribute
of the instance of AgentComm1 to the channel attribute of AgentComm2.
I think it is not generating problems in the simulation and at least it
works.

I wonder if some of you have already faced this problem and are aware of
cleaner
solution (such as a patch at the level of AgentComm rather than at the level
of
its subclasses)

best

Olivier
Internal Virus Database is out of date.
Checked by AVG - http://www.avg.com
Version: 8.0.173 / Virus Database: 270.7.6/1714 - Release Date: 08/10/2008
07:01

New Message Reply Date view Thread view Subject view Author view
 

Back to home