Fairness in Agent Based Simulation Frameworks

Author(s):  
Lawrence Welch ◽  
Stephen Ekwaro-Osire

An agent based simulation engine should provide a fair playing field for all of its agents. A fundamental design axiom of agent based simulation frameworks is that the simulation engine should not arbitrarily bias its execution towards one agent or another. This fairness is basic to giving the agent modeler confidence that differences in behavior and performance between agents derive legitimately from the simulation modeling, initial conditions or specific agent characteristics, rather than the capriciousness of the underlying framework. One aspect of fairness in a simulation is the relative order of execution of agents over time. This order of execution is affected by techniques employed by frameworks to simulate the concurrent activities of multiple agents. One such technique is multi-threading. Multi-threaded operating systems, or programming languages and environments, such as Java, allow multiple agents, represented by software threads, to share the computer’s execution time by taking turns, thus appearing to act simultaneously. The precise order of execution of peer threads in multi-threaded applications is often out of the hands of the programmer, and may be determined exclusively by the operating system or program execution environment. However, if overlooked by the framework developer, the idiosyncrasies of a particular thread ordering mechanism can pass on to the modeler inherent random behavior that is neither intuitive, nor in line with the modeler’s expectations. To be considered fair, the engine should aim to provide all agents with equal probability of executing first within a time step, or last, or in any position in between. This paper analyzes the sequencing of agent thread execution within a Java framework that implements a multi-threaded, time-stepping, agent based simulation engine. The natural ordering of Java thread execution is demonstrated to be unfair (that is, not uniform) in its treatment of agents. This research shows that the standard mechanism of Java thread scheduling, while appropriate for most applications, is inappropriate on its own for the agent based framework. It is demonstrated that with Java’s standard thread scheduling algorithm, over time certain agents tend to execute ahead of others within each time step, while others tend to execute in the middle or at the back of the pack. This paper then introduces and demonstrates the “Uniform Specific Notification” pattern, a technique that produces a fairer, uniformly distributed random order for the initial execution of Java agent threads at each simulation time step.

Author(s):  
L. Welch ◽  
S. Ekwaro-Osire

An agent based simulation engine should be able to provide a fair playing field for its agents. This paper analyzes fairness in the sequencing of agent thread execution within a Java framework that implements a multithreaded, time stepping, agent based simulation engine. The results illustrate why a multithreaded agent based simulation framework using the Java Virtual Machine for concurrency must supplement standard Java thread scheduling with techniques that enable fairness in agent execution order. The “uniform specific notification” pattern is introduced as one technique for producing fairer, uniformly distributed order for initial execution of Java agent threads at each simulation step.


2003 ◽  
Vol 13 (04) ◽  
pp. 629-641 ◽  
Author(s):  
Konstantin Popov ◽  
Mahmoud Rafea ◽  
Fredrik Holmgren ◽  
Per Brand ◽  
Vladimir Vlassov ◽  
...  

We discuss a parallel implementation of an agent-based simulation. Our approach allows to adapt a sequential simulator for large-scale simulation on a cluster of workstations. We target discrete-time simulation models that capture the behavior of Web users and Web sites. Web users are connected with each other in a graph resembling the social network. Web sites are also connected in a similar graph. Users are stateful entities. At each time step, they exhibit certain behaviour such as visiting bookmarked sites, exchanging information about Web sites in the "word-of-mouth" style, and updating bookmarks. The real-world phenomena of emerged aggregated behavior of the Internet population is studied. The system distributes data among workstations, which allows large-scale simulations infeasible on a stand-alone computer. The model properties cause traffic between workstations proportional to partition sizes. Network latency is hidden by concurrent simulation of multiple users. The system is implemented in Mozart that provides multithreading, dataflow variables, component-based software development, and network-transparency. Currently we can simulate up to 106 Web users on 104 Web sites using a cluster of 16 computers, which takes few seconds per simulation step, and for a problem of the same size, parallel simulation offers speedups between 11 and 14.


2005 ◽  
Vol 4 (2) ◽  
pp. 83-94 ◽  
Author(s):  
Hala Mostafa ◽  
Reem Bahgat

As scientists from various domains increasingly resort to agent-based simulation for a more thorough understanding of real-world phenomena, the need for a simulation environment that facilitates rapid development of multi-agent systems is growing. Such a platform should provide means of visualizing the simulated scenario. In this paper we present the agent visualization system, the first system of its kind to specifically focus on catering to the visualization needs of agent-based simulation. The proposed system is a generic add-on that equips a simulation environment with a rich set of visualization facilities offering a variety of textual and graphical browsers that allow the modeler to detect trends and relationships in the simulation scenario. Some techniques from the field of information visualization were adapted and added to the system, while others were devised especially to be used in it. Regardless of their origin, all visualization techniques were thoroughly revised to make them generic enough to fit in our generic system. Agent visualization is more challenging than traditional information visualization in more than one respect. One of them is that the data to be visualized is not static; the simulation system is constantly producing data with every time step. Moreover, the sheer amount of data, together with its diversity, call for special adaptations to ensure that the system remains responsive and generic. To illustrate the various features of the proposed agent visualization system, we present a visualization of MicroTerra; a simulation scenario involving a group of beings trying to maximize their food intake.


2021 ◽  
Author(s):  
Tzu-Hsin Ho ◽  
Michał Gałkowski ◽  
Julia Marshall ◽  
Kai Uwe Totsche ◽  
Christoph Gerbig

<p>Atmospheric transport models are often used to simulate the distribution of Greenhouse Gases (GHGs) for atmospheric inverse modeling. However, errors in simulated transport are often neglected in the context of inverse flux estimation. We coupled the commonly used Weather Research and Forecasting (WRF) model with the greenhouse gas module (WRF-GHG), to enable passive tracer transport simulation of CO<sub>2</sub> and CH<sub>4</sub>. As a mesoscale numerical weather prediction model, WRF’s transport is only constrained by global meteorological fields via initialization and at the lateral boundaries; over time the winds in the center of the domain can deviate considerably from these (re-)analysis fields that are constrained by observations. The aim of this study is to have the WRF-simulated transport represent reality as closely as possible, which in this case means staying consistent with the (ERA5) reanalysis fields used as boundary conditions.</p> <p>Therefore, two ways of blending ERA5 with WRF-GHG were tested: (a) regularly restarting the model with fresh initial conditions from ERA5, and (b) nudging the atmospheric winds, temperatures, and moisture to those from ERA5 continuously, using the built-in FDDA option (four-dimensional data assimilation). FDDA constantly forces the model towards the physical reference state (ERA5) by adding an additional tendency term at each grid point and time step.</p> <p>Meteorological variables, as well as the concentrations of CO<sub>2</sub> and CH<sub>4</sub>, were analyzed by comparing with observations. We also compared mixed layer heights (PBLH) with radiosonde-derived observation. We found that performance in horizontal winds and PBLH are slightly better in the nudged simulation (NS) compared to the simulation incorporating frequent restarts (RS). The advantage of grid-nudging is notable when comparing CH<sub>4</sub> with aircraft measurements from the CoMet campaign. However, differences in soil moisture increase over time, as soil moisture is not used for nudging. The consequence is a change in the Bowen ratio and thus in vertical mixing, impacting the distribution of GHG tracers in general.</p> <p>To preserve the benefits of nudging and avoid the divergence of soil moisture, we recommend a hybrid approach, combining nudging with daily re-initializations. This technique will be used in an ensemble-based regional inversion system currently under development to make use of satellite-based measurements of GHGs.</p>


Sign in / Sign up

Export Citation Format

Share Document