Posted by ""Timothy Quinn"" <
tdquinn@MIT.EDU> Dear Francisco,
I am also currently researching hybrid simulation. I am using AnyLogic, because it is seemingly the only off-the-shelf package that can accommodate such hybrid modeling.
I believe that hybrid modeling represents a promising avenue, but with an important caveat: the increased flexibility places a methodological burden on the modeler even greater than what is required for ""standard"" SD modeling. No offense intended toward the XJ Technologies folks, but I think AnyLogic's ability to assist in the *process* of modeling lags far behind its functional capabilities.
I define discrete-event simulation (DES) according to Geoffrey Gordon's
(1962) original intentions with GPSS. (I also observe how remarkably little DES simulation has changed conceptually from Gordon's original work). The focus is on entities (people, widgets, orders, etc.) flowing through a process flowchart or network comprising mostly servers and queues. Each step in the process is represented by a ""block"", which encapsulates the mathematical definition of that step's behavior. The term ""discrete-event""
refers to the points in time at which entities are passed from one block to another. I think the defining feature of DES is that the entities flowing through the model's blocks are passive: the timing, routing, and other behaviors of entity flow are determined by parameterization of the blocks, not of the entities.
Gordon G. A general purpose systems simulator. IBM Systems Journal.
September 1962;1:18-32. Available at
http://www.research.ibm.com/journal/sj/.
When I built models with GUI software packages like Extend (back in the days of version 4!), I was always frustrated by the lack of easy access to all the logic and parameters of the model. These details were ""hidden"" inside the model blocks. This problem persists with object-oriented software like AnyLogic, although AnyLogic at least provides a function that automatically creates (limited) model documentation in HTML.
Bernard Zeigler, at the University of Arizona, has formalized the mathematics of DES, which he calls DEVS. I'm not sure how much this formalism is applied outside of computer science circles (or even within them.). A short overview is
Zeigler BP. DEVS Today: Recent Advances in Discrete Event-Based Information Technology. Paper presented at: 11th IEEE/ACM International Symposium on Modeling, Analysis and Simulation of Computer Telecommunications Systems (MASCOTS); 12-15 October, 2003. Available at:
http://ieeexplore.ieee.org/iel5/8783/27 ... 27814?=STD&
arnumber=1240652&arnumber=1240652&arSt=+148&ared=+161&arAuthor=Zeigler%2C+B.
P.
but his authoritative reference is now the following:
Zeigler BP, Praehofer H, Kim TG. Theory of Modeling and Simulation:
Integrating Discrete Event and Continuous Complex Dynamic Systems. 2nd ed.
San Diego, CA: Academic Press; 2000.
In contrast to DES, ""traditional"" agent-based modeling (ABM) situates the logic of entity behavior within the entities themselves. ABM descends from the tradition of cellular automata: John Conway's Game of Life, Wolfram, Holland, etc. In this modeling approach, the environment is passive, but may provide the entities with data (e.g., spatial distribution of the population of entities, other environmental conditions).
Statecharts (see AnyLogic documentation) do a better job of organizing the logic of ABM entities than the ""mess"" of formulating and parameterizing a DES model. However, the transparency of ABM model structure for model validation (I use the term in the same sense as John Sterman 2000) still does not equal that of standard SD practice.
Given my definitions of DES and ABM above, it is obvious that there is grey area between the two approaches. An object-oriented environment like AnyLogic is nonpartisan: it does not care whether the logic of the model is placed within the entities or in the blocks (objects) constituting the entities' environment, or in both places.
Here is where AnyLogic's flexibility places increased demands on the modeler. Where should the logic for a given action be defined: in a block or within an entity? A tempting answer might be that is doesn't matter, as long as the desired aggregate model behavior is produced. An open empirical question is whether this answer is true or not. However, I argue that effort should be made to make these choices based upon the characteristics of the entities being modeled. I will use the Delay ActiveObject from the Enterprise Library (version 5.5) as an example.
The Delay object has a statechart that ""continuously"" monitors for entity arrivals at the input Port. An entity arrival triggers the entityIn() method of Delay, one step of which is to create a Dynamic Timer object to determine the entity's duration in the Delay. The Dynamic Timer is then ""attached"" to the entity. So far, these choices are okay. However, there is no Delay statechart corresponding to required entity departures from the output Port. Instead, the required processing is handled by the Dynamic Timer's expiration method. While this formulation accomplished the needed behavior, a more realistic formulation would have the Dynamic Timer send a signal event to the Delay block for processing.
Perhaps my criticism is just pedantic quibbling. (Perhaps the XJ Technologies folks have a retort based upon computing efficiency
considerations?) But given the difficulty of building an SD model that is robust to extreme conditions, I believe that these details should at least be examined rigorously.
Finally, there is the question of combining DES/ABM model structure with continuous-time model structure. It's useful to review Herbert Simon's concept of a ""production"". Each production is a process that consists of two parts: (1) a set of tests or conditions, and (2) a set of actions to be taken whenever the set of conditions are all true. The definition and application of Simon's production systems are discussed in
Newell A, Simon HA. Human Problem Solving. Englewood Cliffs, NJ:
Prentice-Hall; 1972.
but a short explanation is to be found in chapter 4 of
Simon HA. The Sciences of the Artificial. 3rd ed. Cambridge, MA: MIT Press; 1996.
The logic of ""productions"" underlies the interface between continuous-time and discrete-event model formulations. A transparent interface between the two is embodied by the use of statecharts (either in entities or in blocks).
In AnyLogic, different sets of continuous-time equations can be associated with different states of a statechart. Therefore, a discrete event triggering a state transition deactivates one set of model equations and activates a different set. In this way, the discrete-event-driven model components interact with the continuous-time components.
A state transition (action) can be triggered by a logical expression
(condition) evaluating to ""true"". The logical expression can be of the form ""if an event of type Z occurs"" (discrete condition, discrete action), but it can also be of the form ""if variable X > 5"" (continuous condition, discrete action).
Continuous-time formulations can also trigger discrete events without the explicit use of statecharts, such as when Java if-then expressions are used, either within AnyLogic's ""algorithmic functions"" or within object class definitions. Even without statecharts, however, these cases still conform to Simon's definition of ""productions"".
For the sake of stoking the fires of debate, I'll point out a few more relevant issues. First, computer programming must respect the rules of variable and object types - including the object-oriented complications of type-casting upward or downward - but there isn't yet the added constraint of dimensional consistency (or checking). A boolean value cannot be used where an integer is called for, but AnyLogic does not complain if counts of people are confounded with counts of widgets.
Second, much of the logic underlying AnyLogic's ""base"" object classes remains less than transparent, raising problems for clear theory-building using hybrid simulation. In particular, how the Port class handles sending and receiving entities is complicated and unintuitive.
Third, hybrid (and arguably DES and ABM) simulation doesn't yet have standard model-analysis tools analogous to SD's causal tracing, loop knockout analysis, or eigenvalue analysis, although goodness-of-fit statistics, parameter sensitivity analysis, optimization, and behavior-over-time graphs are all used in all three approaches. From AnyLogic's example models, I get the impression that a lot of emphasis is placed on flashy animation, but without a rigorous approach to understanding what is really going on (how structure leads to behavior).
Just my $0.02.
Regards,
Tim Quinn
~~~~~~~~~
PhD Candidate
System Dynamics Group
MIT Sloan School of Management
Posted by ""Timothy Quinn"" <
tdquinn@MIT.EDU> posting date Wed, 8 Nov 2006 14:23:09 -0600 _______________________________________________