From: TellMeJD <tel...@ho...> - 2009-08-25 05:26:17
|
If X1 is calculated first and then x2 is calculated based on updated value of x1, the results will be different from the case that x2 is calculated first then x1 is calculated based on updated value of x2. It is my interpretation of 'sequential update'. So I need a clarification what 'sequential' means. In contrast, "simultaneous updates", in my understanding, would be at both x1 and x2 values will be updated with the same stage of iteration. I have thought that RePast is the latter case. For instance, if initially x1=1 and x2=2, new x1=2+1=3, and new x2=(1/2)+2=2.5 From: Chen Liang [mailto:che...@gm...] Sent: Monday, August 24, 2009 9:25 PM To: Tatara, Eric R. Cc: TellMeJD; Repast Subject: Re: [Repast-interest] agents' properties I think what he means is if the parameters of 2 agents are dependent on each other, then different sequences of execution will result in different parameter value. I'm not quite sure if this is true in Repast. The example is if X1 is agent 1's parameter, and X2 for agent 2 likewise. But I think the agents' behavior should be the same, not as given in his example, which is X1=x2+x1 X2=x1/2 + x2 On Tue, Aug 25, 2009 at 4:24 AM, Tatara, Eric R. <ta...@an...> wrote: Not sure what you are asking here. Can you please rephrase the problem or provide more information? Eric Tatara, Ph.D. Assistant Software Engineer Center for Complex Adaptive Agent Systems Simulation Decision and Information Sciences Division Argonne National Laboratory -----Original Message----- From: TellMeJD [mailto:tel...@ho...] Sent: Monday, August 24, 2009 3:05 PM To: Tatara, Eric R.; 'David J. Barnes'; 'Repast' Subject: RE: [Repast-interest] agents' properties If it is calculated sequentially, will the following model behave differently depending on which of x1 or x2 is calculated first? X1=x2+x1 X2=x1/2 + x2 -----Original Message----- From: Tatara, Eric R. [mailto:ta...@an...] Sent: Monday, August 24, 2009 2:30 PM To: TellMeJD; David J. Barnes; Repast Subject: RE: [Repast-interest] agents' properties Sequentially. Eric Tatara, Ph.D. Assistant Software Engineer Center for Complex Adaptive Agent Systems Simulation Decision and Information Sciences Division Argonne National Laboratory -----Original Message----- From: TellMeJD [mailto:tel...@ho...] Sent: Monday, August 24, 2009 10:09 AM To: 'David J. Barnes'; 'Repast' Subject: Re: [Repast-interest] agents' properties Then do agents run simultaneously or sequentially? -----Original Message----- From: David J. Barnes [mailto:d.j...@ke...] Sent: Monday, August 24, 2009 4:13 AM To: Repast Subject: Re: [Repast-interest] agents' properties Hi Zhanna, This question is about the way that object-oriented languages deal with having multiple "instances" created from a single "class". With Repast, when you describe an agent's behaviour you are, in effect, defining a class. You can create as many instances (or "agents", or "objects") from that class as you like. Although each agent shares the same code as the others, all of an agent's variables are kept strictly separate from each other. This goes for parameters, local variables and properties (or "instance variables" as they are also known.) This is, of course, completely different from the way that non- object-oriented languages work, which is probably why you have the confusion in your mind. It is actually possible to share variables between agents, but I won't say anything about that here to avoid confusing you! I hope that helps, David ===== David J. Barnes (d.j...@ke...) Lecturer in Computer Science http://www.cs.kent.ac.uk/~djb/ <http://www.cs.kent.ac.uk/%7Edjb/> Zhanna * wrote: > Hi, > > I have a question concerning agents' properties. Actually, I don't > understand quite well how Repast works with agents. I have a code for > agent and if there are several agents in the model all of them run the > same code; but is each agent running its' code simultaniously or > sequentially? And if there are some parameters in the code which has > to be assigned for each parameter individually, won;t they mess up? > For example, let's say I have Agent1 and Agent2 (similar agents, > behaviour is decribed with the same code). In the code the parameter x > is calculated and then reused: x=x+y . But it is different for > Agent1 and > Agent2 depending on the neighbors. So, as I understand, each agent > will calculate its' own x, when the behavior is scheduled. But the > main > question: is it stored in the memory for each agent? So, when I repeat > this behavior again, will it use x(agent1)= x(agent1)+y and > x(agent2)=x(agent2)+y ? or i have to create x as array x[agent_id]? > > I hope my question is clear > > Thanks in advance, > > Zhanna > > > ---------------------------------------------------------------------- > -- > > ------------------------------------------------------------------------ ---- -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Repast-interest mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/repast-interest ------------------------------------------------------------------------ ---- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Repast-interest mailing list Rep...@li... https://lists.sourceforge.net/lists/listinfo/repast-interest ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Repast-interest mailing list Rep...@li... https://lists.sourceforge.net/lists/listinfo/repast-interest ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Repast-interest mailing list Rep...@li... https://lists.sourceforge.net/lists/listinfo/repast-interest -- ___________________________ CHEN Liang Department of Architecture The Chinese University of Hong Kong Shatin, N.T. Hong Kong SAR, China tel +852 2609-6597 |