Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

9.1 Introduction and Motivation

This chapter examines the superclass of variable-oriented social simulation models, also called equation-based social simulations. Historically, these were the first types of social simulations and they have formal roots in differential equation models of social dynamics. Today, these social simulation models consist primarily of system dynamic (SD) models and queueing models. Each class is examined using the MDIVVA social simulation methodology (Motivate-Design-Implement-Verify-Validate-Analyze) developed in Chap. 8.

Both of these social simulation models focus on complex social systems over time, which makes them applicable to theoretical application for basic science as well as policy analysis. Historically, however, applications to applied operational and management issues have prevailed. Hence, their use for advanced theoretical analysis awaits many fruitful applications, especially in light of experience acquired through practical uses in management, industrial, and operational settings.

9.2 History and First Pioneers

Social simulation models examined in this chapter have scientific roots in Isaac Newton's theory of dynamical systems and Girolamo Cardano's theory of events in probability—a prestigious pedigree. The following summary of major milestones includes developments in SD and queueing models as well as closely related advances in dynamic simulation models more broadly.

1909:

Mathematician and engineer Agner Krarup Erlang pioneers scientific research on queuing systems by modeling the Copenhagen telephone exchange.

1953:

Statistician and mathematician David G. Kendall proposes the standard formal notation still in use for queueing systems, published in The Annals of Mathematical Statistics.

1958:

Richard Bennett at MIT creates SIMPLE (Simulation of Industrial Management Problems with Lots of Equations), the first system dynamics computer modeling language.

1959:

DYNAMO (DYNAmic MOdels) v. 1.0, an improved version of SIMPLE, is invented by Phyllis Fox and Alexander Pugh. DYNAMO quickly becomes the formal lingua franca of management science and operations simulation models.

1960s:

SD models become widely adopted in operations research of complex social systems and management science, remaining prominent today.

1961:

Engineering scientist Jay Forrester from MIT's Sloan School of Management publishes his pioneering book, Industrial Dynamics, the first in a series of SD classics.

1961:

Applied mathematician Thomas L. Saaty publishes the queueing theory classic, Elements of Queueing Theory with Applications. In the same year J.D.C. Little publishes his famous law of queueing systems in the journal Operations Research, and J.F.C. Kingman publishes his equally famous law in Mathematical Proceedings of the Cambridge Philosophical Society.

1969:

Urban Dynamics is published by Jay Forrester and John Collins (former mayor of Boston), expanding system dynamics simulation to social complexity and CSS in a proper sense.

1970:

Forrester and his group at MIT create the first socio-environmental global models, WORLD1 and WORLD2, published as World Dynamics, of what eventually became the famous Club of Rome model.

1972:

The Limits to Growth, the classic book that will make SD famous worldwide, is published by Donella Meadows under the sponsorship of engineer Aurelio Peccei's Club of Rome. It is immediately translated into many languages.

1972:

Cultural anthropologist Linda S. Cordell pioneers the first social simulation of Puebloan (Anasazi) polities in the American Southwest with her Ph.D. dissertation on “The Whetherill Mesa Simulation” at the University of California at Santa Barbara. Cordell received the Lifetime Achievement Award from the Society for American Archaeology and the A.V. Kidder Medal from the American Anthropological Association, becoming a member of the US National Academy of Sciences in 2005.

1975:

Political scientist Dieter Ruloff, disciple of CSS pioneer Daniel Frei from the University of Zürich, Switzerland, demonstrates the first application of SD to simulating insurgency and political stability. In the following years he publishes the first SD models of the collapse of Classic Maya polities and Soviet–Taliban insurgency dynamics in Afghanistan.

1975:

Political scientists Nazli Choucri and Robert North publish Nations in Conflict, the first discrete-time simulation in international relations, modeling the onset of World War I .

1979:

Political scientists Urs Luterbacher and Pierre Allan from the Graduate Institute of International Studies in Geneva, Switzerland, create SIMPEST, the first dynamic simulation model of USA-USSR-PRC strategic triad dynamics during the Cold War, correctly predicting the disintegration of the Soviet Union. Their paper was presented at the World Congress of the International Political Science Association, Moscow, USSR.

1979:

Archaeologists Colin Renfrew and K.L. Cooke co-edit the volume Transformations: Mathematical Approaches to Culture Change, another early pioneering collection.

1981:

Archaeologist Jeremy Sabloff publishes Simulation in Archaeology, one of the first edited volumes of its kind. The same year Nazli Choucri publishes International Energy Futures, the first SD modeling book on the world energy market from an economic and politics perspective.

1984:

The SD scientific journal, System Dynamics Review, is founded.

Mid-1980s:

Political scientist Michael Wallace publishes a paper demonstrating the implementation of Lewis F. Richardson's theory of arms races in SD models using DYNAMO.

1985:

The Stella version 1.0 software for system dynamics modeling is released by the isee systems company.

1998:

Nazli Choucri and her MIT students publish the first SD model of state stability in the System Dynamics Review.

2000:

American management scientist John D. Sterman publishes Business Dynamics: Systems Thinking and Modeling for a Complex World, the first major, comprehensive textbook in SD.

9.3 System Dynamics Models

This section introduces the superclass of social simulations based on system dynamic (SD) models, used in significant social science applications, and examines their main features for understanding social complexity. SD models are introduced within the broader context of dynamical systems, which span an even larger class of formal models. The emphasis of SD is on discrete-time systems as the main formalism for characterizing social dynamics of various types observed in referent social systems. Mathematical aspects are important, especially for learning how qualitatively different dynamical processes—i.e., different forms of dynamic behavior—are modeled through different model specifications.

Fig. 9.1
figure 1

Major pioneers of system dynamics models: Jay Forrester, founder of SD modeling (upper left); Dennis Meadows, director of the Club of Rome Project on the Predicament of Mankind, The Limits to Growth (upper right); Linda Cordell, pioneer in dynamical systems models in archaeology, elected to the National Academy of Sciences in 2005 (lower left); Nazli Choucri, MIT pioneer SD modeler of energy, conflict, and state stability dynamics (lower right)

The following terms must be distinguished in the interest of clarity, since they are easily confused when not used with precision:

Definition 9.1

(System Dynamics Model)

A system dynamics (SD) simulation is a variable-based computational model for analyzing complex systems containing feedback and feedforward dependencies among variables and rates of change, often with high-dimensionality.

Formally, an SD model consists of a system of discrete-time difference equations with forward or backward differencing. SD models can be purely deterministic or contain stochastic noise as defined by random variables. A complete SD social simulation model consists of causal diagrams explaining the network of dependencies and associated code implementation.

Definition 9.2

(Dynamical System Model)

A dynamical system (DS) is a variable-based mathematical model composed of a set of differential equations or differential and integral equations.

Dynamical system models in social science date to the first pioneering applications to the study of conflict, demographic, and economic dynamics almost a hundred years ago—i.e., they were used in mathematical social science much earlier than computational SD models. Formally, a DS model consists of a system of continuous-time equations. DS models can be purely deterministic or contain stochastic noise defined by random variables. Both SD and DS are formal models (computational and mathematical, respectively), and can be purely deterministic or contain stochastic components. The main difference lies in the discrete and continuous time domains, as well as the presence of forward and backward time delays in the former.

9.3.1 Motivation: Research Questions

SD models address research questions in numerous domains of CSS, especially those where the following features are present in a given referent system of interest:

  1. 1.

    Variables and their respective time trajectories are of immediate interest as stocks, sizes, or quantities of some kind. (State variables are later abstracted as levels, as detailed in the next stage of the modeling process.)

  2. 2.

    Causal relations among variables are responsible for observed changes in terms of temporal dependencies; they don't just occur for unknown reasons or through purely random mechanisms. (Change is later abstracted as caused by rates.)

  3. 3.

    Noise can affect resulting trajectories at various points in the causal network. (Noise is later abstracted as probability distributions.)

  4. 4.

    At the macroscopic system level trajectories of change can include stationarity, escalation, dampening, cycling, oscillations, asymptotic behaviors, and other temporal qualitative patterns.

  5. 5.

    Emergent properties of social complexity at the systemic level result from interactions at the level of variables at the lowest causal levels.

9.3.2 Design: Abstracting Conceptual and Formal Models

Given some referent system of interest S, a conceptual model \(\mathsf{C_{S}}\), consisting of a set of state variables and their respective rates of change, is abstracted by a two-stage process rendered through causal loop diagrams and stock and flow diagrams.

9.3.2.1 Causal Loop Diagrams

The first stage in SD abstraction to produce a conceptual model focuses on elementary causal relations called loops.

Definition 9.3

(Causal Loop)

A causal loop is a feedback relation between a given variable x and its rate of change.

Causal loops are the basic elements of an SD model. In turn, feedback can be positive or negative, depending on whether it promotes or impedes a given variable.

Definition 9.4

(Positive Feedback)

A positive feedback loop is a causal relation that increases the value of a variable.

Positive feedback is viewed as a reinforcement dynamic in SD terminology, producing an increasing effect: growth, expansion, gains, amplification, increases, improvements, enlargements, proliferation, or escalation, or other increasing patterns in the time trajectory of a variable, depending on the appropriate semantics of the referent system.

Definition 9.5

(Negative Feedback)

A negative feedback loop is a causal relation that decreases the value of a variable.

Negative feedback is a said to be a balancing dynamic in SD terminology, producing a decreasing effect: fatigue, decline, reduction, loss, diminution, mitigation, depletion, contraction, restraint, decay, or other decreasing patterns in the time trajectory of a variable, again depending on appropriate semantics of the referent system.

Definition 9.6

(Causal Loop Diagram)

A causal loop diagram is a graphic abstraction that describes positive and negative feedback in the behavior of a given variable.

Norm adoption by members of a community is an example of an emergent social phenomenon that can be represented by a causal loop diagram. This is useful for understanding how a new norm may be adopted as a social process from an SD perspective, as shown in Fig. 9.2. The figure shows two feedback loops operating simultaneously. The positive feedback loop R, on the right, denotes how social conformity tends to produce new norm adopters by peer pressure as the number of new adopters grows. This is a reinforcement dynamic. The more people conforming to the new norm, the greater the pressure to adopt it, which is abstracted as a positive feedback loop. The feedback loop B, on the left, represents negative reinforcement or “balancing” because the community has finite size, so the number of potential adopters decreases as more community members adopt a new norm. The higher the proportion of conformity with the new norm the lower the number of the non-conformists, so the loop on the left represents negative feedback. Related examples of social norms are fashions, opinions, technological innovations, attitudes, and behavioral patterns, so the norm adoption process has broad applicability across domains of social science.

Fig. 9.2
figure 2

Causal loop diagram for a system dynamics model of norm adoption

A similar example is found in the domain of inter-group conflict, based on Richardson's two-group rivalry model of arms race dynamics, shown in Fig. 9.3. (Although this is sometimes referred to as a two-nation arms race model, Richardson intended it to be a general model for conflict between rival groups of any kind, nations and non-state actors alike, as reflected by his term “deadly quarrels.”) In this case the rate of arms acquisition by each group is affected by two opposite dynamics produced by feedback loops. On one hand, there is an escalation dynamic because the rate of arms acquisition is driven by a rival's current (and threatening!) level of arms; the higher that is, the greater the need to catch up by increasing one's own rate. On the other hand, there is a mitigating dynamic driven by the cost of maintaining what one already has, so the higher the level of one's own armaments, the greater the economic burden, so the more difficult it is to procure further increases. Today, organization complexity required to support advanced capabilities must be added to direct economic cost. Richardson called this restraining force “fatigue.”

Fig. 9.3
figure 3

Causal loop diagram for a system dynamics model of inter-group rivalry

A system as a whole is represented by coupled causal loops representing how all elementary causal loops are related to one another. Note that in the last two examples overall system structure is the same, but the signs are not—the balancing signs of the mitigation dynamic are reversed. In the norm diffusion process in Fig. 9.2, the two feedback loops are assumed to be coupled, acting simultaneously. As shown in the diagram, the rate of norm adoption is a function of both the number of potential norm adopters and the number of norm adopters. Potential norm adopters and actual norm adopters are decreased and increased by the adoption rate, respectively. The result is that at different times the two coupled dynamics behave differently. During the early stages of the process, growth in the population of adopters will be greater than in latter stages when fewer non-conformists remain in the community.

In the rivalry process in Fig. 9.3, the two feedback loops are also assumed to be coupled, so they operate simultaneously. The rate of arms acquisition is a function of both the rival's arms level and the group's (own) arms level. The escalation dynamic on the right is a self-reinforcing drive (positive feedback). The mitigation dynamic on the left is a balancing drive (negative feedback). However, unlike the previous example, this case assumes two different kinds couplings, both acting on the rates of arms acquisitions:

  1. 1.

    Feedback couplings: positive and negative feedback processes are coupled, as in the norm emergence example.

  2. 2.

    Actor couplings: the two rivals are coupled through strategic interaction, in a game-theoretic sense, since the outcome for each (arms levels) is determined not only by what one decides, but also by what the rival decides.

These two coupled dynamics in the rivalry process in this case also behave differently at different times, depending on which dynamic drive prevails.

In sum, causal loop diagrams can contribute to building a conceptual SD model from a qualitative perspective by abstracting positive and negative feedback loops corresponding to reinforcing/escalating and dampening/mitigating drives, respectively. However, more is needed to build a sufficiently complete conceptual model of a referent system that can be computationally implemented in code.

9.3.2.2 Stock and Flow Diagrams

The second stage of abstraction in SD model development is to provide a more quantitative way of representing system structure and dynamics using stock and flow diagrams, as shown in Fig. 9.4. In this second kind of SD diagram, variables become stocks (rectangles) and rates become flow valves (bow ties). Unlike a feedback loop diagram, a stock and flow diagram can be directly translated into code.

Fig. 9.4
figure 4

SD stock and flow diagram for representing variables (stocks represented as rectangles) and rates of change (flow represented as valves)

The top of Fig. 9.4 shows a generic stock and flow diagram with its basic notation, where the source on the left represents a variable with realization determined by the flow valve that controls the stock or level on the right. The bottom of the figure uses the same notation applied to the case of the reinforcement loop or escalation dynamic of a conflict process (right portion of Fig. 9.3), where a group's rate of acquisition in military capabilities is determined by the level of its rival. The fully coupled conflict system is shown in Fig. 9.5.

Fig. 9.5
figure 5

Stock and flow diagram for a system dynamics model of a two-group rivalry interaction

Figure 9.5 specifies how rival actors and feedback loops are mutually dependent on each other, to formalize the concept of strategic interaction. The figure uses the same basic stock and flow components as in Fig. 9.4, with the added element of background hostility acting as a parameter that also affects the rate of change, so now the dynamic process of each rival is driven by three factors:

  1. 1.

    The rival's current arms level (representing positive feedback, escalation force)

  2. 2.

    The group's own arms level (negative feedback, mitigation force) and

  3. 3.

    Background hostility acting as a constant background force, which captures the idea that a group would acquire some minimal military capabilities as insurance, regardless of a rival's arms level.

Diagrams such as these—usually involving many more stocks/variables, flows/rates, and parameters—are used in SD methodology for representing a conceptual model of a given referent system. Noise, stochastic shocks, and other elements are also added as necessary.

The main result of the design stage in system dynamics is a conceptual model of the referent social system specified by a set of equations. For example, in the conflict model, the following system of equations in continuous time specifies the rivalry dynamics:

$$\begin{aligned} \frac{dX}{dt} = & aY - bX + g \end{aligned}$$
(9.1)
$$\begin{aligned} \frac{dY}{dt} = & \alpha X - \beta Y + h, \end{aligned}$$
(9.2)

where a and α are reaction coefficients, b and β are mitigation coefficients, g and h are hostility coefficients, and X and Y are levels of armaments. The following system of equations is in discrete time:

$$\begin{aligned} X(t + 1) = & aY(t) - bX(t) + g \end{aligned}$$
(9.3)
$$\begin{aligned} Y(t + 1) = & \alpha X(t) - \beta Y(t) + h. \end{aligned}$$
(9.4)

In this case, the system of equations can be analyzed to obtain closed form solutions, since the system is simple. Solutions to these systems of equations yield time trajectories containing exponential terms, which can be easily verified. In most cases this is not possible, which is why simulation is required.

9.3.3 Implementation: System Dynamics Software

Given a sufficiently complete conceptual model of a referent system, the next stage in SD methodology consists of implementing the model in code using a simulation system. The key milestone activity in the implementation stage is marked by the transition from mathematical equations in the conceptual model to code in the simulation model.

The current, most utilized simulation system for implementing SD models is called VENSIM, which is the current successor to earlier DYNAMO and STELLA simulation systems software. Vensim PLE is an education version that is made available free of charge. The classic textbook by John D. Sterman, Business Dynamics, includes a CD (for PC and Macintosh) containing simulation software and models, including ithink, Powersim, and Vensim software. A major advantage of systems such as these is their close association with the SD community, specifically the System Dynamics Society. The Vensim website has numerous resources for beginning and advanced users, including tutorials and other helpful materials.

Figure 9.6 shows a screenshot of the Vensim system while implementing a conceptual stock and flow model of a simple customer base in a company. While Dynamo was a programing language that required writing code, Vensim can be used by selecting facilities for defining variables, equations, and other components by clicking options, using drop-down menus, and other features of the user interface.

Fig. 9.6
figure 6

Screenshot while implementing an SD social simulation using the Vensim system

Fig. 9.7
figure 7

Major pioneers of queueing systems models: Agner Krarup Erlang, founding pioneer of queueing models (upper left); David George Kendall, inventor of the standard notation for queueing system models (upper right); Thomas L. Saaty (lower left), author of classic works in applied discrete mathematics, including queueing theory, and inventor of the Analytic Hierarchy Process; John Dutton Conant Little, discoverer of the law of mean arrival times and a founder of modern marketing research (lower right)

Another option for developing SD social simulation is to implement the conceptual model in simulation systems such as Netlogo or Repast. Although these simulation systems were not originally designed to run SD models, they do have such facilities in addition to the agent-based models for which they were originally designed. For example, Netlogo has demonstration SD models for exponential growth, logistic growth, prey-predator (wolf-sheep) dynamics (based on the classic Lotka-Volterra model), as well as other effective examples.

9.3.4 Verification

Recall the difference between verification and validation: the former is about ensuring a model is running the way it is supposed to, as guided by the conceptual model and any other simulation design specifications; the latter is about ensuring that the simulation model is a good representation of the referent system.

Once an SD social simulation model has been implemented, the next step involves verification procedures. Systems such as Vensim provide a number of facilities for verifying a model, such as checking that the right units are specified, rates are using the proper dependencies, and similar steps to ensure that the model is running the way it was intended by the conceptual model. Since an SD conceptual model, complete with stock and flow diagrams, uses the iconic metaphor of levels and flow valves, verifying an SD implementation essentially means checking that all “the plumbing” is working as it should according to the most minute details in the blueprints (stock and flow diagrams). Each element must be checked for accurate implementation, as well as every rate, feature, and connection. Facilities provided by whatever simulation system is chosen should be used in the context of the verification procedures examined in Chap. 8.

9.3.5 Validation

Validating an SD social simulation model that has been verified is accomplished from two main perspectives. Structure validity refers to internal features of the model, including all assumptions, relevant variables and their units, and the system of equations in all its component stocks and flows. The following are recommended tests of structure validity for SD models:

Empirical tests of validation::

This is aimed at validating the specification of equations used in the model as well as parameter values being used. For example, in the case of the conflict model discussed earlier, this part of the validation process would focus on parameters such as the equation's coefficients being assumed, as well as constants, such as background hostility that affects armament rates. The equations themselves require validation, since different specifications will yield different results. The classic rivalry model assumes additive and symmetrical armament levels, which is an assumption that requires validation through using empirical tests. It is also assumed that reaction coefficients and hostility parameters are constant. These all add up to an overall assumption of structural stationarity, in the sense that all equations specified do not undergo significant change over time—i.e., the standard model assumes that the basic clockwork mechanism does not change as history evolves, which may or may not be a valid assumption.

Theoretical tests of validation::

Model assumptions should also be confirmed by the extant theories being used, since even the simplest SD model assumes theoretical mechanisms that justify its causal structure. This is a broader perspective than empirical tests of structural validity, since it is based on fundamental causal arguments that are difficult if not impossible to quantify. For example, in the case of the conflict model, the overall structure is grounded on Richardson's theory of how rivalry between two groups is explained. The fundamental theory is based on three factors or dynamics driving the conflict process: escalation forces driven by positive feedback from a rival's stock of weapons; mitigation forces driven by fatigue and negative feedback from one's own stockpile of armaments; and some background constant force generated by hostility over disagreements and insecurity. Is this theory valid? Are there other factors as important or even more significant than these? The theory also assumes perfect symmetry between rivals; both make arms procurement decisions in the same way. Is it possible that the rivals in question decide with different goals, such as one trying to “catch up” with the other, so it reacts to the gap between its own level and the rival's [i.e., dX/dt∝(XY)], not simply to the rival's level (dX/dtY as in Eq. (9.1))?

As with any other kind of social simulation model, tests of structural validity for SD models are complex and require considerable attention. The empirical literature is of great value in navigating through these procedures.

By contrast, behavior validity concerns the actual results of simulation runs, primarily in terms of qualitative and quantitative features such as patterns of growth, decay, and oscillation, among others. Many of these procedures involve various forms of time-series analysis and extensions. Some of these were mentioned during the general methodological discussion in the previous chapter, including analyzing trends, comparing periodicities by means of autocorrelation functions, comparing distribution moments, and computing global statistics such as the discrepancy coefficient between simulated and observed time-series data (Barlas 1996: 207–208).

9.3.6 Analysis

The main goal of simulation research in CSS is to obtain qualitative and quantitative results to better understand the referent system. The previous forms of qualitative and quantitative analysis are primarily procedural, for purposes of gaining confidence in the veracity of a model by conducting verification and validation procedures. Obviously, the main goal of developing an SD social simulation—the reason for going through all the trouble—is to analyze it in substantive ways. Formal analysis, asking what-if questions, and scenario analysis constitute major forms of analyzing SD social simulations.

Formal analysis of an SD model yields results, such as time trajectories for all level variables (stocks), phase portraits in parameter spaces, sensitivity analysis, comparative statics, and similar sets of results in dynamical systems analysis. For example, the conflict model results from formal analysis would show the time trajectories of levels of armaments in the evolution of conflict between groups, phase portraits of trajectories as a function of parameter combinations, and similar qualitative and quantitative results. Results from formal analysis can reveal properties such as orbits, singularities, asymptotes, attractors, gradient fields, periodicities, chaos, bifurcations, ergodicities (equality between time averages and space averages), phase transitions, stability properties, and other significant dynamic features of social complexity that are typically not apparent from the model structure.

Asking what-if questions is another major approach to analyzing SD social simulations. For example, in the conflict model we may ask what happens when the hostility of one group versus its rival is some multiple of the other's hostility. Or, what happens when reaction coefficients differ significantly across the two groups? What-if questions can also extend to analysis of an SD model with alternative specifications of equations to explore what happens when rates of change are governed by different dynamics. For example, as was suggested earlier, in the conflict model we may wish to have a rival responding to the gap (YX) in armament levels, as opposed to the original assumption of responding to just level Y.

A more comprehensive form of analysis used with SD social simulations is scenario analysis, which typically involves a suite of related questions defining a given scenario, rather than analyzing one question at a time. For example, in the conflict model we may wish to examine a scenario in which reaction coefficients are relatively small, mitigation coefficients are several times larger than reaction coefficients, and hostility coefficients are weak. Intuitively, such a scenario should lead toward lowering of the conflict by de-escalation and disarmament. The opposite scenario would have the set of coefficients changed in opposite ranges, leading to escalation and the system spiraling out of control (blowing up). Within these two extreme scenarios lie many others with interesting qualitative and quantitative properties, some of which are previously known through analytical methods that yield a closed-form solution—many more are not known and remain to be explored, especially in high-dimensionality systems with many actors and different structural specifications in terms of reaction dynamics.

These and other forms of analysis are used in SD simulation to investigate basic CSS questions as well as applied policy issues. SD can also be used in combination with other simulation models, such as agent-based models examined in the next chapter.

9.4 Queueing Models

This section examines the superclass of social simulations that use queuing models, covering their significant social applications and main features. The emphasis is on distributions as the main feature for characterizing queues of various types of processes observed in referent social systems. As always, mathematical aspects are foundational, especially for learning how qualitatively different process structures, representing different forms of randomness, are modeled by different probability distribution laws.

Definition 9.7

(Queue)

A system consisting of one or more units or stations that service or process a stream of incoming demands or requests is called a queue. Formally, using Kendall's notation, a given queue Q is denoted by a triplet A/S/C, where A describes time between arrivals to the queue, S describes servicing or processing, and C is the number of processors, where C=1,2,3,….

This initial definition is useful by itself, and provides the basis for more complex systems with multistage queues, as we will demonstrate with examples.

9.4.1 Motivation: Research Questions

Queue-like systems are ubiquitous and significant across domains of social science. Consider the following examples:

  1. 1.

    A bank (the classic example given in many queueing theory textbooks) is a queueing system where customers arrive with frequency A; they are served by tellers in time S; and there are C teller windows to service customers. If a teller cannot satisfy the customer, there would be another queue for speaking with a bank manager or supervisor. Supermarkets, fueling stations, hospitals (including emergency rooms embedded within), and registration desks are other common everyday examples.

  2. 2.

    An airport check-in counter (and many other transportation nodes) is a queueing system where passengers arrive with a certain pattern A; the airline staff at the counter, or check-in machine, process passenger identification, flight information, and provide boarding passes in time S; and there are C counters with staff to assist passengers. Flight operations consist of other queuing systems, which are separate, albeit coupled, for processing arriving airplanes from entering the air space to the arrival gate. Modern airports are highly sophisticated, complex queuing systems.

  3. 3.

    A polity can be modeled as a queueing system where public issues arise with some temporal pattern A; each issue is addressed with policies S involving resources, processing time for decision-making, and implementation; and which uses a set C of agencies.

  4. 4.

    When a disaster occurs in a given society, demand for relief A increases significantly, which requires the immediate activation of emergency response services and humanitarian assistance supply chains S through multiple organizations C. The results are significant for societal welfare and even governmental stability, as seen in Haiti following the 2010 earthquake.

  5. 5.

    A legislative body is a queueing system where bills are introduced with frequency A and laws are passed in time S supported by C legislators and staff members.

  6. 6.

    Human information processing can be viewed as a queueing system where information arrives at rate A, is processed (decoded and interpreted) at rate S, and makes use of C cognitive elements (values, goals, belief systems, and heuristics, among other elements of bounded rational actors).

The key to recognizing queuing systems in human and social dynamics is identifying the A/S/C pattern in a referent system of research interest. Courts, markets, organizations, and a vast array of institutions provide additional examples. Queuing systems are abundant in social systems and processes. Note that the entities processed or serviced by a queue can be human agents (customers, passengers, shoppers) as well as other socially relevant entities, such as laws and public issues, among many others, as suggested by the examples above.

The most obvious research questions that arise in queueing systems concern patterns of arrival A and servicing S, which are typically expressed in the form of distributions, as well as the organizational arrangement among the C processing components. Given some queuing system Q,

  • What are the patterns of arrival and service times in terms of distributions and moments?

  • Does the system have sufficient capacity for processing demands within reasonable time?

  • Are patterns of arrival and service stationary with respect to epochal time τ?

  • If non-stationary patterns exist, how can they be described?

Each of these questions in fact represents a whole set of research issues that are investigated through queuing models in CSS. For example, the question concerning the capacity of a given polity for dealing with a relentless stream of public issues that arise in the normal life of a society (example 3 in the list above) is anything but purely theoretical, although it may sound that way at first. A country that is overwhelmed by unresolved public issues and unattended policy demands will eventually experience state failure, ceteris paribus (all other variables held constant). In another example, people get killed when a stampede of panicked individuals seeks to exit a stadium, church, discotheque, or theater when some frightening event has occurred within. This happens because all of a sudden AS, whereas the system is normally designed for AS or, at best, AS, from a queuing systems perspective.

From the preceding discussion it should be apparent that there are multiple theoretical and policy applications of queuing systems in CSS. That being said, applications of queuing systems to social simulation domains have prevailed in applied areas, such as management science and operations research, with fewer applications investigating basic theoretical questions in social theory (such as examples 3–6 in the list above). Such an imbalance is unjustified, as we will demonstrate by examining the process of social simulation model development from a queuing systems perspective.

There are also purely technological queueing systems, such as the physical Internet, with which we are not concerned. Queuing systems are also important in the context of coupled socio-techno-natural systems, especially in terms of social and technological components and all three coupling interfaces.

9.4.2 Design: Abstracting Conceptual and Formal Models

Given a referent system of interest, the next step toward developing a social queuing system simulation consists of identifying and abstracting relevant information for purposes of developing a conceptual model of the referent system. Based on Definition 9.7, the following three variables each require empirical identification and formal specification:

Definition 9.8

(Arrival Time A)

Arrival time A is a continuous random variable defined by a probability density function p(t), or p.d.f., with realizations {t 1,t 2,t 3,…,t n }.

Definition 9.9

(Service Time S)

Service time S is a continuous random variable defined by a p.d.f. p(s) with realizations {s 1,s 2,s 3,…,s m }.

Note that:

  1. 1.

    Both A and S are c.r.v.s (continuous random variables) measured in time units.

  2. 2.

    Accordingly, arrival and service are also defined by all probability functions formally derived from a p.d.f. p(x), such as (1) the cumulative probability function (c.d.f.) Φ(x), (2) the intensity function I(x), also known as the hazard rate function H(x) or social force function F(x), (3) the stress function Λ(x) as the integral of I(x), and (4) others, as defined earlier in Chap. 7. These other probability functions are important because each describes a different, specific facet of randomness that is important to understand.

  3. 3.

    All probability functions of A and S can be estimated from empirical data, using various methods, although some purposes require more data than others.

  4. 4.

    Density functions p(t) and p(s) provide precise descriptions of numerous forms of randomness, including the special case of deterministic arrival or service, as we shall examine below. Empirical data and social theory should be used for choosing distributions, not purely mathematical or algorithmic convenience.

  5. 5.

    Statistical moments m i also characterize a given distribution, most importantly \(m_{1} = \overline{x}\) (mean), m 2=σ 2 (variance), m 3= skewness, and m 4= kurtosis. The median and the mode are also useful, especially since many social distributions are not normal.

  6. 6.

    Empirically, A is often exponential while S is often normal, at least to a first approximation. The Weibull distribution is also significant for many social processes, as explained below.

The number of service or process components is the third element of a queueing system, based on Definition 9.7.

Definition 9.10

(Service Components C)

The number of service components C in a queueing system is a discrete variable with finite integer values 1,2,3,…,k.

Following Kendall's notation, the following are important elementary types of social queueing systems:

$$\begin{aligned} Q_1 = & M/D/1 \end{aligned}$$
(9.5)
$$\begin{aligned} Q_2 = & M/M/1, \end{aligned}$$
(9.6)

where M denotes a Markovian or memoryless process with simple negative exponential (Poissonian) arrivals, D denotes a deterministic processing time, and C=1 component processing node. Equation (9.5) specifies a queueing system characterized by: Markovian (exponential) M arrivals given by p(t)=λe kt, where k is the arrival rate measured in number of arrivals per unit of time; deterministic D (constant) time is required to process each arrival; and a single processing component. Equation (9.6) defines a similar but different queue with the same arrival and component features but processing is Markovian.

The Weibull distribution (Fig. 9.8) is also socially significant, because it includes the simple exponential distribution, an approximation of the normal distribution, as well as a variety of qualitatively different intensity functions that are applicable to many social systems and processes. The Weibull distribution is defined by the following probability functions:

$$\begin{aligned} p(x) = & \kappa x^{\alpha} \exp\biggl(- \frac{\kappa}{\alpha} x^{\alpha+ 1} \biggr) \end{aligned}$$
(9.7)
$$\begin{aligned} \varPhi(x) = & 1 - \exp\biggl(- \frac{\kappa}{\alpha} x^{\alpha+ 1}\biggr) \end{aligned}$$
(9.8)
$$\begin{aligned} I(x) = & \kappa x^\alpha \end{aligned}$$
(9.9)
$$\begin{aligned} \varLambda = & \frac{\kappa}{\alpha} x^{\alpha+ 1}, \end{aligned}$$
(9.10)

where κ and α are scale and shape parameters, respectively.

Fig. 9.8
figure 8

The Weibull distribution. Probability density functions (left) and associated event intensity functions (right) shown for different values of the shape parameter. The Weibull distribution reduces to the exponential distribution when the shape parameter is 1.0 and approximates the normal distribution when the shape parameter is around 5

Numerous mathematical results exist for queueing systems, although the theory of an M/G/k queue, where G is a generic probability distribution, remains incomplete—so simulation methods are appropriate for obtaining computational solutions. The following eponymous laws are among the better known for queues with one or more generic probability distributions G:

Little's law :

Average number of units being processed in a G/G/1 queue in steady-state.

Pollacsek-Khinchine's equation :

Expected waiting time for a M/G/1 queue.

Kingman's formula :

Expected waiting time for a G/G/1 queue.

The behavior of processing components in a queue matters greatly and can be based on various specific scheduling policies. These are usually described in terms of agents, but they can refer to any entity being processed by a queue.

First-in-first out (FIFO) :

The agent with longest waiting time is served first.

First-in-last-out (FILO) :

The agent who arrived first is served last.

Last-in-last-out (LILO) :

The agent who arrived last is served last.

Last-in-first-out (LIFO) :

The agent with shortest waiting time is served first, or stack.

Sharing :

Processing capacity C is shared equally among agents.

Priority :

Agents are processed according to some ranking.

Fastest job first :

The agent with the shortest processing time is served first.

Preemptive :

Processing is interrupted to permit servicing a priority agent.

Some queuing policies, such as FIFO and LIFO, are also used in accounting systems. The LIFO stack was discussed in Chap. 2 as a data structure.

Simple, unitary queues are important for understanding how queue-based processes operate under various probability distributions. However, it is often the case that a real-world referent system will contain a network of queues, as well as internal queues embedded within larger queues as in a system-of-systems. A common example would be a bookstore where one would enter, browse, select some books, and then proceed to the cashier for payment. The bookstore as a whole is a queueing system where one enters, shops, and departs. But within the store, the time spent browsing, as well as the time spent paying, constitute queues within the “macro” store-level queue. The same is true in the example of a polity that processes public issues, and within governmental institutions, laws and policies have their own, internal processing dynamics. Assuming an exponential onset of issues as well as policymaking and implementation—which is a reasonable approximation in many cases—an abstract queue-based model of a polity can be presented as an M/M/k system, where k denotes the number of government agencies involved. Hence, a network of this kind has links provided by probability distributions and nodes by distributions and service stations.

9.4.3 Implementation: Queuing Systems Software

Social simulations based on queuing models can be implemented in native code or by using a specialized simulation system. There are scores of simulation software packages for queueing systems—not counting some ingenious spreadsheet implementations (not really recommended). Two simulation systems that are frequently used are the Queuing Package for GNU Octave and a suite of queueing modeling software in the Java Modeling Tools, both available at Sourceforge.

9.4.4 Verification

Verifying a social simulation using a queuing model involves several aspects. First, it is good practice to verify that proper ranges are being used for arrival and service random variables, as these need to be positive real values. Second, results need to be consistent with assumed parameter values and at least the qualitative form of probability distributions being used. For example, a queue that has Weibull arrival time A with shape parameter value 2.0 should show an intensity function that is approximately linear, corresponding to the Rayleigh distribution.

More specifically, verifying a social queuing model usually begins with verifying that the entities being processed or serviced (whether they are human agents or other entities such as public issues, vehicles, or other) are being generated in a proper way. This means verifying that the relevant probability distribution function is operating properly. Features to check include low or high arrival frequencies, as well as any temporal clustering that is deemed significant in the conceptual model. Arrival volume might also be variable, which should also be verified.

Common sense is one valid way to verify a queue-based model. For instance, changes in arrival and service times should have direct and measurable effects on the length of queues, otherwise something is wrong with the implementation. Another way is to have the implementation checked by someone other than the coder, which is a general verification procedure along with others discussed in the previous chapter.

Another feature of the model to verify concerns the possible presence of bottlenecks, saturation effects, and issues regarding processing capacity. For example, bottlenecks tend to produce departures at an approximately constant rate. Models of pedestrian traffic as well as vehicular traffic use many of these considerations in terms of verification standards. When agents have a choice in terms of which station or service node to use, decision-making rules must be properly verified. When multiple components are used, such as in a system of standby backup service stations, switching mechanisms for engaging backup units must also be carefully verified.

In sum, verification of a social simulation based on a queuing model always depends on the structure and details of the queuing network system. Each component and the overall organizational structure must be verified at a level of detail required by the research questions being asked.

9.4.5 Validation

The principal way of validating a social simulation based on a queuing model is to match simulated distributions with real-world empirical distributions. Face validity, as always, is a fundamental way of assessing a queueing model, and should be tried first, just as in all other social simulations. Direct familiarity with the referent system is fundamental for establishing face validity. Common technical ways of validating a queueing model include assessing goodness of fit using statistics, regression analysis, distribution moments, time series analysis, and Monte Carlo (MC) methods.

9.4.6 Analysis

Analysis of queue-based social systems and processes from a purely theoretical perspective is vastly undeveloped in social research. This is because there is a paucity of social theory that has been implemented in queueing models as opposed to other areas of social simulation. There are multiple reasons for this. One is that social scientists have favored other forms of formalization rather than making extensive use of probability distributions to model randomness. Another is simply lack of familiarity with the scientific potential offered by queueing systems. Finally, there is a misconception that this class of models is mostly intended for managers and systems operators. This is a fertile area for novel forms of analysis in CSS.

By contrast, analysis of queue-based social systems and processes from an applied, operational perspective is highly developed in management science, operations research, and related disciplines. Traffic flows, customer servicing systems, hospitals and healthcare facilities, supply chains, industrial production systems, and numerous other domains have benefitted from decades of practical applications that have improved many real-world systems through optimization, increasing resiliency, and numerous other improvements ranging from trivial to vitally important.