Agent-Based Simulation Techniques

This forum contains all archives from the SD Mailing list (go to http://www.systemdynamics.org/forum/ for more information). This is here as a read-only resource, please post any SD related questions to the SD Discussion forum.
Locked
Jim Duggan jim.duggan nuigalway.
Junior Member
Posts: 6
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Jim Duggan jim.duggan nuigalway. »

Posted by Jim Duggan <jim.duggan@nuigalway.ie>
Hi,

Is anyone aware of the fundamental techniques and approaches you
might use to build an agent-based simulation system. For example,
the underlying problem solving approach for SD is numerical
integration, and designing a system to implement this is a well- understood software design task.

I'm keen to discover what the underlying approach is
for agent-based systems. For example:

- Are agent-based modelling systems always based on
discrete-event simulation?
- How are agent societies constructed?
- How important is message-passing in an agent-based system?
- Does the model builder need to know how to program in order
to use agent-based modelling systems?

Any guidance on these points would be appreciated,

best regards,
Jim.

_________________________________
Dr. Jim Duggan, Chartered Engineer,
Department of Information Technology,
National University of Ireland, Galway,
IRELAND.
Posted by Jim Duggan <jim.duggan@nuigalway.ie>
posting date Mon, 27 Feb 2006 12:58:29 +0000
Tobias Lorenz space56 freenet.de
Junior Member
Posts: 10
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Tobias Lorenz space56 freenet.de »

Posted by ""Tobias Lorenz"" <space56@freenet.de>
Dear Jim,

I will try to approach your questions: Agent-based Modelling is
somehow based on Discrete-Event-Simulation as an agent normally
reacts to events, so to turn it the other way around entities
in a Discrete-Event-Simulation might be seen as very very stupid
agents. Because what is central in Agent-Based-Simulation, is
interaction between the agents/entities, which is normally not
given in a Discrete-Event-Simulation.

How are Agent societies constructed? Normally you would try to
create an agent with some very specific policy in order to try
to show that some macro phenomenon can be traced back to that
simple rule of the agent. So for a classic agent society you
wouldn't need more than several clones of one agent, maybe with
changes in some parameters. Nevertheless different and more
complicated agent societies might easily be thought of and the
field is in my eyes still moving very much and very heterogenous,
so there is probably no definition of what an Agent society would be.


Message-passing/Interaction is very important in Agent-based simulation,
because the crucial question is: Can i aggregate my agents and thereby
dramatically simplify my model or do i need the individual level. The
individual level is very important if interaction is responsible for
the behaviour under observance.

And unfortunately you still need basic programming skills for Agent-based
modelling although there are libraries available for your support and
meanwhile also software tools. Nevertheless basic skills are necessary.


Best regards

Tobi

Posted by ""Tobias Lorenz"" <space56@freenet.de>
posting date Tue, 28 Feb 2006 14:29:49 +0100
Timothy Quinn tdquinn MIT.EDU
Junior Member
Posts: 3
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Timothy Quinn tdquinn MIT.EDU »

Posted by ""Timothy Quinn"" <tdquinn@MIT.EDU>
Hi Jim,

I'm no expert on ABM, but I did look into using SWARM about 5 years ago when it was still being developed by the Sante Fe Institute. My colleague Hazhir Rahmandad won the Dana Meadows student award at the 2004 SD conference for his paper ""Heterogeneity and Network Structure in the Dynamics of Contagion: Comparing Agent-Based and Differential Equation Models"", which you might find illuminating.

(1) Are agent-based modelling systems ALWAYS based on discrete-event simulation?

No.

""Discrete-event"" simulation means that you have an operational definition for an ""event"" and you construct your model to produce those events realistically situated along a time line. There are no continous flows here. You might care how much time has elapsed between events (e.g., how long between customer arrivals), but you don't really care about having the computer tick off all the intervening microseconds. Therefore, these methods have the computer ""skip"" those time intervals when nothing of interest is happening, fast forwarding through the boring dialogue to get to the exciting car chase.

""Agent-based"" simulation means that you explicitly represent a discrete ""something"" that either acts or is acted upon. For example, instead of aggregating people together into a homogeneous stock, you represent each person explicitly. Imagine that you are an architect designing a football stadium and your problem is to design the stairwells, aisles, and exits. You might build a 3-D stadium model and put a simulated person in each seat. You can easily imagine what each agent's decision rule might be at the end of the match (with an objective function of ""leave quickly"", not ""storm the field and tear down the goalposts"").

Having discrete agents does NOT mean you are tied to discrete events. The early modelers of cellular automata used a fixed time step and assumed that every agent had the opportunity to transition its state in every time step. Of course, we would regard this modeling practice as sloppy (see prior debates in this forum on the ""meaning"" of DT), but it does illustrate my point. Practically speaking, however, it is usually the case that modeling discrete agents requires modeling their discrete events, hence the confusion.

I will not attempt to address the question of whether discrete-event simulations are ALWAYS agent-based as well. There is plenty room for debate here, but not very helpful, I think.

(2) How are agent societies constructed?

The typical and best method is with an object-oriented programming language. For example, see SWARM: http://www.swarm.org/wiki/Main_Page.

(3) How important is message-passing in an agent-based system?

Modeling the influence of the agents' environment or the other agents on their state transitions is at the heart of ABM.

I'm reading between the lines of your question here. The programming of discrete-event simulations with networks of ""queues"" and ""servers"" can become quite complex, especially if the possibilities for blocking and starving exist. I did a little ""under the hood"" custom programming in Extend (http://www.imaginethatinc.com/) in a former life and the messaging can get ugly. In contrast, with AMB each agent's decision logic is ""encapsulated"" within that agent, consistent with the object-orientation paradigm. This conceptual approach is much cleaner.

(4) Does the model builder need to know how to program in order to use agent-based modelling systems?

I am not familiar with the latest ABM tools, but I would guess that the answer here is ""yes"". So-called ""integrated development environments"" (IDE), like AnyLogic (http://www.xjtek.com/), make the task easier, but it is still programming.

I hope this helps.

Thanks,
Tim Quinn
~~~~~~~~~
MIT Sloan School of Management
System Dynamics Group
Posted by ""Timothy Quinn"" <tdquinn@MIT.EDU>
posting date Tue, 28 Feb 2006 09:27:40 -0600
Edward Gallaher gallaher ohsu.ed
Newbie
Posts: 1
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Edward Gallaher gallaher ohsu.ed »

Posted by ""Edward Gallaher"" <gallaher@ohsu.edu>
Brief reply re agent-based modeling:

Suppose we have 1000 rabbits in some finite age group. We can either look at the Œaverage lifespan¹ of this population, or conversely, we can look at the probability of any one individual dying within a finite time period.

Let¹s assume a .05/month mortality rate (a time constant of 20 months). The output equation = Stock * .05/mo.

In SD, we model this as a Œlarge¹ stock of rabbits, with a continuous outflow as rabbits meet their demise. As a result, we see an Œidealized¹
(smooth) decline in the population. This might include fractions of rabbits along the way, but since we know we¹re modeling a continuous process, we usually don¹t worry about this too much. Of course, with an initial population of 10,000, or 100,000, this granularity becomes less and less significant.

Let¹s assume a .05/month mortality rate (a time constant of 20 months).

In contrast, with agent-based modeling we literally define 1000 Œentities¹, in this case rabbits. In each Œdt¹, a random number is generated for each individual entity. If the random number assigned to Rabbit-1 is 1-5, Rabbit-1 dies; if 6-100, Rabbit-1 lives (for the moment, anyway). This calculation is repeated for each of the remaining live rabbits.

As a result, the population decline WILL be granular, but this will be Œrealistic¹ granularity! In some intervals, more than the expected number will die; in others, less. Populations don¹t really decline as pure exponentials, but as a noisy data trace around a pure exponential mean.

Similar logic can be applied to Œmovement¹ of rabbits from one locale to another. There is a finite probability that a given rabbit will leave Meadow A and enter meadow B, and vice versa. In the absence of foxes, the ratios of out-migration and in-migration will determine relative sizes of the two sub-populations.

However,iIn Meadow A there may be a .05 probability of being caught by a fox; in Meadow B there may be a .09 probability.

It is also possible to keep track of Œnear misses¹ in Meadow B. A surviving rabbit will then have an increased probability of returning to Meadow A, and a subsequent decreased probability in re-visiting Meadow B. It can get very interesting!

Both approaches have merit, of course. I believe further comparisons of agent-based solutions and SD solutions can be enlightening in many cases as we try to understand the Œreal¹ behaviors of interest.

Ed Gallaher
Posted by ""Edward Gallaher"" <gallaher@ohsu.edu>
posting date Tue, 28 Feb 2006 11:24:54 -0800
Francisco Perez francisco77pp ya
Junior Member
Posts: 18
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Francisco Perez francisco77pp ya »

Posted by Francisco Perez <francisco77pp@yahoo.com>
My piece of advise:

* GO to www.xjtek.com (Anylogic Software Developers Website),
there you will find enough material on AB Modeling

And/Or Refer to any the following books:
*Agent-based Supply Network Event Management (Whitestein Series
in Software Agent Technologies) by Roland Zimmermann
* Agent-Based Manufacturing and Control Systems: New Agile
Manufacturing Solutions for Achieving Peak Performance by Massimo
Poluci et al
* Micro Motives and Macro Behavior by Thomas Schelling
* Game Theory and Decision Theory in Agent-Based Systems (Multiagent
Systems, Artificial Societies, and Simulated Organizations) by
Simon Parsons et al
* The Complexity of Cooperation: Agent-Based Models of Competition
and Collaboration by Robert Axelrod et al
* Multi-Agent-Based Simulation : Second International Workshop,
MABS 2000, Boston, MA, USA, July 2000
* Agent-Based Simulation: From Modeling Methodologies to Real-World
Applications by Post Proceedings of the Third International Workshop
on Agent-Based Approaches
* Multi-Agent Systems and Agent-Based Simulation by Sichman, Conte
and Gilbert.

There are pretty more of AB modeling, but I think it may suffice so far.

I also recommend visiting the Simulation Winter Conference Webpage since
they have the papers archives where you'll surely find AB modeling and
simulation.

hope this helps
Regards Francisco
Posted by Francisco Perez <francisco77pp@yahoo.com>
posting date Tue, 28 Feb 2006 10:38:29 -0800 (PST)
Jim Duggan jim.duggan nuigalway.
Junior Member
Posts: 6
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Jim Duggan jim.duggan nuigalway. »

Posted by Jim Duggan <jim.duggan@nuigalway.ie>
Hi:

Just a quick note to thank people for their
responses (through the SD list and also direct emails).
They have provided me with a super range
of perspectives and ideas on ABM, which
I will be following up on.

best regards,
Jim.
Posted by Jim Duggan <jim.duggan@nuigalway.ie>
posting date Wed, 01 Mar 2006 15:41:53 +0000
Martin Davies martin p5.co.uk
Newbie
Posts: 1
Joined: Fri Mar 29, 2002 3:39 am

Agent-Based Simulation Techniques

Post by Martin Davies martin p5.co.uk »

Posted by ""Martin Davies"" <martin@p5.co.uk>
Jim,

If not mentioned already you might find these references of use:

Colella, V.S, Kolpfer, E., Resnick, M. Adventures in Modeling: Exploring
Complex, Dynamic Systems with StarLogo, Teachers College Press, NY (2001)
isbn 0-8077-4082-9
Resnick, M., Turtles, Termites, and Traffic Jams: Explorations in
Massively Parallel Microworlds, MIT (1994) isbn 0-262-18162-2

I believe there is some interesting work to be done relating the
conceptual frameworks of ABM and SD and their application in different
problem domains. If you'd like to discuss this further please do get in
touch.

Regards,

Martin...

Martin Davies
Posted by ""Martin Davies"" <martin@p5.co.uk>
posting date Thu, 2 Mar 2006 22:50:50 +0000
Locked