Fairness in Agent Based Simulation Frameworks

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.

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.


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.


Sign in / Sign up

Export Citation Format

Share Document