MASON-INTEREST-L Archives

February 2014

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 26 Feb 2014 20:36:53 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
On Feb 26, 2014, at 8:29 PM, Megan Olsen <[log in to unmask]> wrote:

> So is this true in all cases? Is there any way around that?

It's true in all cases.  But the easy way around it is as follows:

1. Make TWO fields.  Call them A and B.  At start(), make them hold the same exact stuff.

2. Agents read field A to get their sensor information, but they make changes to field B.

3. A special agent, scheduled repeating, but at a later ordering (say ordering = 2), copies field B to field A, overwriting field A's contents.

Note that if your agents move around, they'll need to make sure that they don't overwrite each other in field B. 

Sean

ATOM RSS1 RSS2