Multiscale agent-based models and simulations

Everything simple is false. Everything not is unusable.

Paul Valery

Understanding some mechanisms of the complex relationships between an individual (taken in a very broad sense) and the groups it belong to, is a fascinating subject. Well it fascinates me at least. Let us see how we tried to help crisis manager make sense in the multiple conversations they were involved in, how to model emerging vortices in fluid flows, or how ecosystem self-organize.

Representing multiple conversations during crisis management

During city-wide emergency situations management, different actors need to cooperate : firemen, medical teams, police, political management etc. Debriefing material from past crises show their different teams need to communicate, but that different focuses and doctrines make it difficult.

We created a prototype tool to improve this communication. It was designed to extract from important amount of communications, subjects that were automatically estimated to be relevant for each specific reader, based on what this reader had written previously. And we used agents to do that.

When a user used the scripted communication tools (“there is a truck in fire in Jeanne d’Arc Street”), we generated many agents from an organization we called Aspectual Agents. Each agent was relative to one aspect of the message : we would generate an agent truck, an agent fire, a localisation agent, define an energy for these agent, define links between them. When new messages arrived afterwards, if they contained new notions then new agents were created, and if they contained previously encountered notions the energy of the relative agents were increased. Agents of opposite meaning would fight, trying to lower the energy of the opposition (ex: “firemen have arrived on the site” vs “firemen are nowhere in sight”). All this created a swarm of aspectual agents : a synthesis was needed.

Other agents organisations called Morphological Agents tried to make sense of this swarm, one organisation for each reader. To do that, they clustered aspectual agents by meaning, and developed themselves an energy based both on the energy dynamics of the agents they clustered, and on the topics upon which their attached reader had himself communicated about. A final interface showed an interpretation of these agents to the reader.

Unfortunately the more detailed papers we wrote on the subjects were in French, such as this one, which can be downloaded here.

There were interesting ideas involved, such as using agents to model a conversation and thus overcome the difficult representation of contradictory concepts. I feel Morphological agents were an overly complicated tool to change scale, and in fact I never directly re-used this technique afterward, but you may be better inspired, or it may spark something. The general idea of using agents to detect and act upon self-organization inside another layer was on the other hand fruitful.

Vortices in fluid flows

Jupiter red spot, an Earth-size vortex

Jupiter red spot, an Earth-size vortex

In any fluid flow the main emerging structure is the vortex. Vortices size can range from a few angstroms to thousands of kilometers. They were therefore a very interesting application for methods aiming at exploring multi-scale individual-based modeling and simulation methods.

Viscous fluids dynamics is usually described with Navier-Stokes equations. We use an equivalence of these equations where we consider parcels of vorticity that induce motion to each other (Leonard 1980). The fluid flow is therefore discretized in these vorticity-carrying particles, that not only indicate the vorticity where they are situated , but are also put in motion by the fluid.

Vortices can therefore be perceived as certain organizations of these particles.  Particles in a vortex must be relatively close, have a vorticity of the same sign, and they organization must have a roughly elliptic shape.

We used two methods to detect them. The first is based on a succession of a Delaunay Triangulation, a rules-based elimination of some vertices, then finding the minimum bounding box, and then the ellipse closest to the box. The second is based on a side-effect of the quadtrees-like structure we use to accelerate the fluid mechanics computation. We use the height in the tree of each leaves and its surroundings as a real-time measure of particles density, thus skipping the Delaunay triangulation part. The first method is more accurate but implies a significant hit on the computational complexity of the simulation, while second one can be done in real time (the constant before the computational cost changes but not the order itself).

Once our vortices are detected, we replace in the simulation the particles it is composed from with an agent. This agent interacts with other vortex agents  and with basic particles. Its behavior is therefore rules both by a finite state automaton that presides over its stability (growing, shrinking, fusionning with other agents, “dying”) and by a vorticity it carries to stick to Navier-Stokes equations.

This paper is probably our best description of this work. This one describe into more depth the idea behind the second method, and the other uses it could have. And if you can read French, my PhD Thesis is the most complete description of this work (among others).

Emerging groups in ecosystem models

Ecosystems are really great example of complex systems : biotope and biocenosis are multi-layered, multi-scale, filled with interactions and feedback loops. In this work we tried to build a contribution to ecosystems modeling and simulation by mixing equational models with agent-based models in a compartmental approach. In each compartment we had agents producers (plants), consumers (animals) and decomposers (plants, bacteria). We built an agent-based predator-prey model for their relationships. Each compartment could have different parameters, and different starting conditions. They could represent different depth in a body of water for example. Furthermore, each compartment exchanged fluxes of matter and energy with the others : light, oxygen, carbon dioxyde and nutrients. These fluxes were modeled using differential equations, with state variables being measured in the simulation of the agents model compartments.

This work is described here.