More on dynamics

Copyright 2017 Graham Berrisford. A paper at http://avancier.website. Last updated 09/05/2021 14:23

                                                             

Reading online? If your screen is wide, shrink the width for easier reading.

 

This is the fourth chapter in part one of the book. It includes notes on converting between continuous dynamics and discrete dynamics.

 

Part one: General view

Preface to the book

Ideas you should know

Classic system ideas – part one

Abstraction of systems

The dynamics of systems

More on dynamics

Disambiguating terms

Interpretations, use & abuse

Relating cybernetics to EA

Forrester’s system dynamics

Meadows’ generalizations

 

Contents

Continuous and discrete dynamics. 1

Converting the continuous to the discrete. 2

Event-driven business activity systems. 4

Converting the discrete to the continuous. 5

Conclusions and remarks. 6

Appendix: Dynamical (Mathematical) Systems Theory. 7

 

Continuous and discrete dynamics

All the systems of interest here are dynamic, meaning they display behavior and change from state to state over time. And there is a body of mathematical knowledge about how to model the dynamics of change.

 

“Dynamic models include assumptions about the time-evolution of the system. Simulation is a process based on a dynamic model that specifies (besides some static properties) assumptions about the time evolution of the considered object or system.”

(The World as a Process: Simulations in the Natural and Social Sciences, Stephen Hartmann.).

 

A system can change state continuously in response to signals that are analogue (vary continuously along a spectrum) or forces that are continuous. Consider the hands of a clock driven by an electric motor. A system can change state in discrete steps, in response to signals that are discrete events in time or values of a variable. Rather than speak clumsily of discrete event dynamic systems (DEDS), this chapter will speak of “event-driven systems”. Consider the score board of a tennis match, which is driven by the winning of points.

 

The continuous or discrete dynamics of a system can be expressed in mathematics.

Dynamical systems theory is an area of mathematics used to describe the behavior of dynamical systems. When difference equations are employed, the theory is called discrete dynamical systems. When differential equations are employed, the theory is called continuous dynamical systems.” Wikipedia

 

Here however, you don’t need to understand either difference or differential equations.

 

Continuous-variable dynamics. This presumes a system's state changes continuously. The rates of change of state variables can be defined in equations. Mathematically, the model is a set of coupled, nonlinear, first-order differential (or integral) equations. This approach is rarely used in modelling a business or software system. And if time is divided into small enough intervals, the next approach is approximately the same.

 

Discrete dynamics. This presumes a system's state changes in discrete steps

 

·       Fixed-increment time progression. This is the basis for software tools that help people use Forrester's system dynamics. Time is divided into time steps, which can each contain several events. The system state is updated according to the set of events that happened in the preceding time step. A tool can step through the model - one time step at a time - and report how stocks, populations or resources change over time.

 

·       Next-event time progression. This is the basis for most business and software system modelling. In a discrete event driven system, the state advances over time in response to discrete inputs. Each event occurs at a particular instant in time. Between events, no change in the system occurs.

 

Continuous dynamics simulations, formed in the language of differential equations, are favoured by natural scientists (especially physicists). Discrete dynamics simulation, formed in the language of cellular automata (CA), are favoured by social scientists.

The World as a Process: Simulations in the Natural and Social Sciences, Stephen Hartmann 1996.

 

Given our interest is in social and business systems, and flows of information (rather than physical systems, and flows of matter or energy) our interest is mostly in event-driven dynamics.

Converting the continuous to the discrete

In his “system dynamics”, Forrester was concerned in the first place with entities that can be modelled as having continuous dynamics. Mathematically, the model is a set of coupled, nonlinear, first-order differential (or integral) equations.

 

Two models of a dynamic system, one continuous the other discrete, may lead to different results. Ashby realized that conversions between continuous and discrete models can be problematic. They can lead to errors in predicting the trajectory of a system’s state change over time. Not all continuous systems can be modelled by discrete systems and vice versa - but many can. In practice, we often find it useful to model continuous behavior as though it were discrete.

 

Nevertheless, in his introduction to cybernetics, Ashby promoted using discrete dynamics, since by making the time steps small enough, any difference between continuous and discrete dynamics can be reduced to the point it is not important.

 

2/1 Often a change occurs continuously, that is, by infinitesimal steps, as when the earth moves through space, or a sunbather's skin darkens under exposure. The consideration of steps that are infinitesimal, however, raises a number of purely mathematical difficulties, so we shall avoid their consideration entirely.

 

Instead, we shall assume in all cases that the changes occur by finite steps in time and that any difference is also finite. We shall assume that the change occurs by a measurable jump, as the money in a bank account changes by at least a penny.

 

Though this supposition may seem artificial in a world in which continuity is common, it has great advantages in an Introduction and is not as artificial as it seems. When the differences are finite, all the important questions, as we shall see later, can be decided by simple counting, so that it is easy to be quite sure whether we are right or not. Were we to consider continuous changes we would often have to compare infinitesimal against infinitesimal, or to consider what we would have after adding together an infinite number of infinitesimals questions by no means easy to answer.

 

As a simple trick, the discrete can often be carried over into the continuous, in a way suitable for practical purposes, by making a graph of the discrete, with the values shown as separate points. It is then easy to see the form that the changes will take if the points were to become infinitely numerous and close together.

 

In fact, however, by keeping the discussion to the case of the finite difference we lose nothing. For having established with certainty what happens when the differences have a particular size we can consider the case when they are rather smaller.

 

When this case is known with certainty we can consider what happens when they are smaller still. We can progress in this way, each step being well established, until we perceive the trend; then we can say what is the limit as the difference tends to zero. This, in fact, is the method that the mathematician always does use if he wants to be really sure of what happens when the changes are continuous.

 

Thus, consideration of the case in which all differences are finite loses nothing; it gives a clear and simple foundation; and it can always be converted to the continuous form if that is desired.” Ashby 1956

 

Later

Chapter 3/3. The discrete machine.

At this point it may be objected that most machines, whether man-made or natural, are smooth-working, while the transformations that have been discussed so far change by discrete jumps. These discrete transformations are, however, the best introduction to the subject. Their great advantage is their absolute freedom from subtlety and vagueness, for every one of their properties is unambiguously either present or absent. This simplicity makes possible a security of deduction that is essential if further developments are to be reliable.

 

In any case the discrepancy is of no real importance. The discrete change has only to become small enough in its jump to approximate as closely as is desired to the continuous change. It must further be remembered that in natural phenomena the observations are almost invariably made at discrete intervals; the "continuity" ascribed to natural events has often been put there by the observer's imagination, not by actual observation at each of an infinite number of points. Thus, the real truth is that the natural system is observed at discrete points, and our transformation represents it at discrete points. There can, therefore, be no real incompatibility.

 

In any case, when a system dynamics model is built and run using a software tool, continuous dynamics are simulated by discrete dynamics. The software advances the model time step by time step. After several steps, the tool can report how stocks (populations or resources) change over time (and perhaps smooth the graph between time steps).

 

While the cause-effect flows in a system dynamics model may be seen as deterministic in each time step, the behavior of the whole system over many time steps may be surprisingly chaotic. Multiple simultaneous actions and interactions between actors may lead to unpredictable outcomes.

Event-driven business activity systems

EA and BA almost alway presume qualities can be differentiated and changes occur in discrete steps. Continuous qualities are divided into discrete values (colours of the rainbow.) Continuous state change is modelled as discrete change steps (hot to cold). Continuous system mutation is divided into discrete versions or generations – it is incremental.

 

The focus is on digitizable business activity systems. The systems are modelled in terms of discrete entities and events, discrete actors and activities. Events trigger actors to perform activities that advance the system’s state. The state variables in data stores and data flows have discrete (rather than continuous) values.

 

To say a system or actor is event-driven is to say it acts in response to discrete inputs or signals, and to conditions that arise when a state variable moves in a discrete step to a threshold value. A system is composed of discrete state spaces and event-driven state transition mechanisms.

 

Over millennia, businesses have regularized how actors behave in particular activity systems. In some (far from all) business operations, actors are expected to play defined roles and respond to defined events by performing defined activities.

 

In the UML (2.1) standard for modelling business activity systems, the actors are called active objects, and the activities are called behaviours.

 

 “all behavior in a modeled system is ultimately caused by actions executed by so-called “active objects

“behavioral semantics only deal with event-driven, or discrete, behaviors” 

 

So, to model a business activity system involves defining discrete events (including requests for services), the activities they trigger, and the roles actors play in those activities. To do this, business analysts use data and process modelling techniques which are (though few know it) underpinned by event-driven dynamics.

 

A business activity system is designed to meet business goals, by producing particular effects or outputs. Typically, it is seen as a black box that makes a complex input to output transformation. A variety of discrete inputs are transformed into a variety of discrete outputs, by a set of interacting processes.

 

The processes are supported and enabled by digital business information systems, which record the current state of the business in one or more data stores, which hold the qualitative attributes (identifiers, names, addresses etc.) of individual business entities as well as the quantities of stocks and resources.

 

Diagrams are drawn to show how information flows into, out of and between systems.

 

Gas meters

Meter reading à

Billing system

(customer accounts)

Invoice à

ß Payment

Customers

 

Information flows contain events that identify individual entities, and may lead to an update of their qualitative and quantitative attributes, in one or more data stores.

 

Aside: commonly a business detects events in parallel via distributed sensors or input channels, and processes events in parallel against distributed data stores. This leads to problems and the need to synchronize state data that is related, but stored separately.

Converting the discrete to the continuous

Abstracting system dynamics from event-driven dynamics

Forrester’s model (of stocks connected by flows, which act to increase or decrease the stock levels) is a simplifying abstraction.

 

All systems, everywhere, consist of these two kinds of concepts --levels and flows--and none other. Such a statement is powerful in simplifying our view of the world.” Forrester 1996.

                     

Can we abstract an event-driven system dynamics model from event-driven model at the lower level of individual entities? Yes.

 

·       Think of stocks as entity/actor populations. An individual entity/actor appears only as a unit of 1 in a quantity (the number of people in a city).

·       Think of a stock level as an abstraction from qualitative facts. E.g. the quantity of wolves in a pack is derivable by counting every wolf currently in the "alive" state.

·       Think of a flow as a batch of discrete real-world events occurring in one time step. E.g. the flows in our predator-prey system represent batches of birth and death events.

·       Think of quantitative variables as abstractions from individual entities and their qualities, as might be recorded in a more detailed event-driven model.

 

Business analysts do need the richer semantics of an event-driven model, which contains a wider and more varied collection of entity types, attribute types and event types.

 

 

System Dynamics model

event-driven model

State variables

Quantitative

Qualitative

as well as quantitative

Structures

Aggregates

(quantities of entities)

Individual entities and events

as well as aggregates of them

Stimuli

Time units

(batches of events)

Real-world events

as well as time-unit events

 

How to abstract an event-driven system dynamics model from event-driven model at the level of individual entities? A method for doing this must abstract aggregates from individuals, abstract quantities from qualities, divide time into time steps, then treat each time step as a discrete input event. The process below is reverse-engineered from an exercise.

 

Model discrete events and entities as well as aggregates

1.     Model the events that affect entities (define their life histories or state machines).

2.     Annotate events with operations to maintain entity state (so complete the event-driven model).

 

Abstract the system dynamics model

1.     Remove individual detail entities, leaving only aggregate population entities.

2.     Remove qualitative variables, leaving only quantities.

3.     Aggregate all “real-world” events into time-unit events.

4.     Add a volume-per-time-unit variable (be it fixed or an expression).

5.     Make all variables global.

 

This method for looks reasonably generic. It is presented here only for academic interest. In practice, people never complete an event-driven model to the level of detail required to apply the process above, and perhaps there is no good reason to do so.

 

Much is lost and something is gained in this process, since a system dynamics model holds information not in an event-driven system model, notably in the mathematics of flow rates.

 

Can we go further? Ashby presumed a continuous dynamics model can be derived from discrete dynamics model if desired.

Thus, consideration of the case in which all differences are finite loses nothing; it gives a clear and simple foundation; and it can always be converted to the continuous form if that is desired.” Ashby 1956

 

Could we do the reverse, derive a lower-level event-driven model from a system dynamics model?  It might be possible to convert stock level variables into attributes of data entities, and convert flow rates into business rules by applied by discrete events when updating data entities. However, abstraction by omission (reverse engineering) is much easier to do and explain than elaboration (forward engineering).

Conclusions and remarks

Since most business activity systems are event-driven, event-driven modelling takes us a long way. EA and BA are about business activity systems where:

 

A logical process for system design may define things in this sequence.

  1. Aims of system sponsors
  2. Actors served by the system
  3. Results (effects and outputs) needed by actors
  4. Activities needed to produce results
  5. Inputs needed to maintain state and perform activities
  6. Actors needed to perform activities.

 

Criticisms of this process as reductionist or linear are misplaced since designers always start by taking a holistic view of a system’s required outcomes, and event-driven systems can indeed behave in a non-linear way over time. Although the range of possible inputs and activities is defined, the behaviour of an actor or the whole system may be unpredictable for various reasons not explored here. And of course, human actors are not only free to act outside of any defined activity system, but are usually expected to use their own initiative to a greater or lesser extent.

Appendix: Dynamical (Mathematical) Systems Theory

Several quotes below are from http://www.scholarpedia.org/article/Dynamical_systems

 

This appendix draws from correspondence with Ilia Bider who says: “my journey started with the following book: Topics in Mathematical System Theory. R.E. Kalman, P.L Falb, and M.A. Arbib, McGraw-Hill, 1969.”

 

Ilia told me that dynamical (aka mathematical) systems theory is about how to model dynamical systems that may be characterized as in the headings below.

It relates system input and output, through the notion of state

“A system is part of reality which we think to be a separated unit within this reality. The reality outside the system is called the surroundings. The interaction between system and surroundings is realized via quantities, which are called input and output. Quite often one wants, through a proper choice of the input, the system to behave in a certain way. Mathematical Systems Theory is concerned with the study and control of input/output phenomena. The emphasis is on the dynamic behaviour of these phenomena”

(G.J. Olsder, J.W. van der Woude, J.G. Maks, D. Jeltsema 2012 ISBN 978-90-6562-280-8)

 

Every business has inputs, outputs and a current state. For decades these ideas have provided a platform for EA. A business activity system is encapsulated behind its input/output boundary. Outside – is a context or environment. Inside – is an internal state or structure of things that may be acted on and changed by processes.

 

The state space is a collection of coordinates that describe all the modeler feels is needed to give a complete description of the system. http://www.scholarpedia.org/article/Dynamical_systems

 

EA describes a system's internal structure. In theory, the enterprise state space covers every component and process inside the system. In practice, only some of this is recorded in information systems.

 

A dynamical system is a rule for time evolution on a state space. The evolution rule provides a prediction of the next state or states that follow from the current state space value. 

http://www.scholarpedia.org/article/Dynamical_systems

 

“Take a mathematical space. It might represent physical variables, or biological ones, or social, or whatever…each variable will be a different coordinate in the space. Come up with a rule (function) which, given any point in the space, comes up with another point in the space. The combination is a discrete-time dynamical system, or a map. The space of points is the state space. The function the mapping or the evolution operator or the update rule, or any of a number of obviously synonymous phrases.” http://masi.cscs.lsa.umich.edu/~crshalizi/notebooks

 

A system of mathematical functions is a system of processes that consume input, update state and produce output. A system of business functions is similar, since many business operations are deterministic. 

 

EA describes internal behaviour, process steps, with logic or rules that are defined by people or by nature. Also, describes the things engaged in process steps, the acted-upon objects, and the actors or components that execute steps.

The next state is determined by the next input and the current state

A dynamical system is a rule for time evolution on a state space… Given the current state of the system, the evolution rule predicts the next state or states.

http://www.scholarpedia.org/article/Dynamical_systems

 

Here is an example from a computer game design, where the enemy is modelled as a state machine.

·       If the enemy is in their patrolling state, and catches sight of you, they’ll move into a shooting-in-your-direction state.

·       If the enemy is in their shooting-in-your-direction state, cannot see you, and 5 seconds elapse, they’ll return to their patrolling state.

 

Here is an example from a business system, in which the customer accounts and orders are modelled as state machines.

·       If the customer has not enough credit and orders an item, the system will move the customer account into a debt state.

·       If the customer is already in debt and orders another item, the system will place the order into a pending state and refer it for approval.

·       If the customer stays in a debt state for 9 months, the system will freeze the customer account and send a message to a debt collector.

 

An evolution rule is deterministic if each state has a unique consequent, and is stochastic (or "random") if there is more than one possible consequent for a given state.

http://www.scholarpedia.org/article/Dynamical_systems

 

Is all human behaviour deterministic? Ross Ashby (in “Design for a Brain”) treated the brain as a deterministic machine. Boulding wrote that humans act according to input messages and remembered mental images. Whether that is true or not, we always treat human actors as having free will.

The behavior can be linear or nonlinear

“The behavior of a system is its performance over time—its growth, stagnation, decline, oscillation, randomness, or evolution. A linear relationship between two elements in a system can be drawn on a graph with a straight line. It’s a relationship with constant proportions. A nonlinear relationship is one in which the cause does not produce a proportional effect. The relationship between cause and effect can only be drawn with curves or wiggles, not with a straight line.” (Meadows)

 

“Dynamical Systems can be Chaotic: Chaotic systems have many fascinating properties, and there is a good deal of evidence that much of nature is chaotic; the solar system, for instance. (This is actually, by a long and devious story, where dynamical systems theory comes from.) It raises a lot of neat and nasty problems about how to understand dynamics from observations, and about what it means to make a good mathematical model of something. But it's not the whole of dynamics, and in some ways not even the most interesting part, and it's certainly not the end of "linear western rationalism" or anything like that.” http://masi.cscs.lsa.umich.edu/~crshalizi/notebooks

State changes can be continuous, discrete or hybrid

“The discrete event models naturally accommodate linguistic and qualitative information, and are used to model modes of operation of the system, such as the mode of flight of an aircraft, or the interaction and coordination between several aircraft. The continuous dynamics model the physical processes themselves, such as the continuous response of an aircraft to the forces of aileron and throttle.” Hybrid Systems: Modeling, Analysis and Control.

http://www-inst.cs.berkeley.edu/~ee291e/sp09/handouts/book.pdf

The state space can have any number of dimensions

State space is the set of all possible states of a dynamical system; finite, finite-dimensional, infinite-dimensional. The degrees of freedom is the dimension of its phase space, i.e., the number of variables the modeler feels is needed to completely describe the system. David H. Terman and Eugene M. Izhikevich (2008), Scholarpedia, 3(3):1924. http://www.scholarpedia.org/article/State_space

 

In EA, the business state is recorded in thousands of variable types, related in complex ways, and millions or billions of variable instances. The distribution and complexity of state is a major challenge.

 

Degrees of freedom: The number of independent ways by which a dynamical system can move without violating any constraint imposed. The minimum number of independent coordinates, which can specify the position of the system completely. Hybrid Systems: Modeling, Analysis and Control. http://www-inst.cs.berkeley.edu/~ee291e/sp09/handouts/book.pdf

 

In EA, the degrees of freedom are well-nigh infinite.