DPMN AnyLogic Simio
DPMN AnyLogic Simio
Preprint
ABSTRACT
Business process modelling and simulation has been a core research topic both in the area of Discrete
Event Simulation and in the area of Business Process Management for a long time. However, both areas
have largely ignored each other’s research results. In particular, Discrete Event Simulation research has
not managed to establish a general conceptual foundation and modelling language for Processing
Networks, so vendors are using their own proprietary terminology and diagram language in their
“process modelling” tools, ignoring the process modelling language BPMN, which has been established
as a widely adopted standard in Business Process Management.
In this tutorial, we present the conceptual foundations of, and a modelling language for, Activity
Networks and Processing Networks. The Discrete Event Process Modelling Notation (DPMN) proposed
by Wagner (2018) combines the visual syntax of BPMN with the rigorous semantics of Event Graphs
(Schruben 1983). DPMN allows making platform-independent visual simulation models that can be
implemented with Discrete Event Simulation platforms such as AnyLogic or Simio.
1 INTRODUCTION
Business processes have been modelled and simulated both in the area of Discrete Event Simulation
(DES) and in the area of Business Process Management (BPM) for a long time. However, research in
both areas has not managed to develop a unified conceptual framework for business process (BP)
modelling and simulation.
While Schruben (1983) has proposed Event Graphs as a visual modelling language for the DES
paradigm of Event-Based Simulation (ES), no common modelling language has been established for the
DES paradigm of Processing Networks (often called “process modelling”). Each “process modelling”
tool (such as Arena, Simio, AnyLogic, etc.) is using their own proprietary terminology and diagram
language. In BPM, the BP modelling notation BPMN, officially called ‘Business Process Model and
Notation’ (OMG 2014), has been established as a widely adopted standard. BPMN has been largely
ignored in DES, while Event Graphs have been ignored in BPM.
The term Discrete Event Simulation has been established as an umbrella term subsuming various
kinds of computer simulation approaches, all based on the general idea of modelling the dynamics of a
discrete system as a series of (explicit or implicit) events that change the system’s state over time.
In the DES literature, it is often stated that DES is based on “entities flowing through a system”.
While this narrative applies to the DES paradigm of Processing Networks, called “process modelling”
by Pegden (2010), it characterizes a special (yet important) kind of DES only, and it does not apply to
all discrete event systems. The “process modelling” paradigm should be better called Processing
Network (PN) paradigm, since it is not about process modelling in general, but only about modelling a
particular kind of discrete processes that happen in Processing Networks (which generalize Queuing
Wagner
Networks). It has been pioneered by GPSS (Gordon 1961) and SIMAN/Arena (Pegden and Davis 1992)
and is implemented in various forms by all modern off-the-shelf simulation tools, including Simio and
AnyLogic.
software packages. Typically, DES practitioners are locked into the terminology (and implementation
idiosyncrasies) of the simulation platform they use, and often not aware of the general, platform-
independent and implementation-agnostic concepts.
The use of proprietary terminologies and diagram languages makes it hard for simulation beginners
to learn how to use a tool and for expert users of a tool to switch, or interchange models, from their tool
to another one. Notice especially the strange term “Agent” used by AnyLogic, instead of the Arena
term “Entity”, for processing objects like manufacturing parts in production systems or patients in
hospitals. It is confusing to call a manufacturing part, such as a wheel in the production of a car, an
“agent”.
arrows, which overlay an RDAS arrow with an object flow arrow. The PN concept is a
conservative extension of the AN concept, that is, a PN is a special type of AN.
In an AN, all activity nodes have a task queue filled with tasks (or planned activities) waiting for
the availability of the required resources. An RDAS arrow from an AN node to a successor activity
node expresses the fact that a corresponding activity end event (or plain event) triggers the deferred
scheduling of a successor activity start event, corresponding to the creation of a new task in the task
queue of the successor activity node.
A workflow model is a BP model that only involves performer resources (typically human
resources). Examples of industries with workflow processes are insurance, finance (including banks)
and public administration. Most other industries, such as manufacturing and health care, have business
processes that also involve non-performer resources or processing objects.
Business process (BP) models focus on describing the possible sequences of events and activities,
based on conditional and parallel branching, but they also describe the dependencies of activities on
resource objects, either declaratively, as in BPMN and DPMN, by defining resource roles for activities,
or procedurally, as in DES tools, by preceding and succeeding resource allocation and de-allocation
steps.
Object Event
Object Event Modelling and
+ Objects w/ State
Graphs
Simulation (OEM&S)
Changes
(Basic DPMN)
+ Activities
+ Resource Roles
+ Resource Cardinality
Activity
Constraints
Networks
+ Resource Pools
(DPMN-A)
+ Resource-Dependent
Activity Scheduling
Arrows
Wagner
+ Processing Activities
«entry node» «processing node» «exit node»
Processing + Entry/Processing/Exit partEntry workStation partExit
Networks Nodes arrivalRecurrence = tri(3,4,8) duration = exp(1/6)
(DPMN-PN) + Processing Flow
Arrows
In a PN, all processing nodes have a task queue and an input buffer filled with processing objects
that wait to be processed. A PN where all processing activities have exactly one abstract resource (often
called a "server") is also known as a Queuing Network in Operations Research where processing nodes
are called "servers" and processing objects are called "entities" or "jobs".
Figure 1 An Event Graph defining an ES model with two state variables and three event types
Event Graphs provide a visual modelling language with a precise semantics that captures the
fundamental ES paradigm. However, Event Graphs are a rather low-level DES modelling language:
they lack a visual notation for (conditional and parallel) branching, do not support OO state structure
modelling (with attributes of objects taking the role of state variables) and do not support the concept
of activities.
In OEM&S, object types and event types are modeled as special categories of classes («object type»
and «event type») in a special kind of UML Class Diagram/Model, called OE Class Diagram/Model.
Random variables are modeled as a special category of class-level operations (designated with «rv»)
constrained to comply with a specific probability distribution such that they can be implemented as
static methods. Finally, event rules are modeled in DPMN process diagrams (and possibly also in
pseudo-code), such that they can be implemented in the form of special onEvent methods of event
classes.
In a simulation model, certain types of events are characterized as exogenous, while the others are
endogenous (or caused by previous events). In an OE class model, we therefore categorize event types
as either «exogenous event type» or just «event type». The exogenous events of a DES model
Wagner
correspond to the Start events of a BPMN process model, whereas the caused events correspond to
BPMN Intermediate or End events.
In the OE class model shown in Figure 2, PartArrival, ProcessingStart and ProcessingEnd events
are associated with a WorkStation object (as their only participant). This is the workstation where these
events happen. As a class for exogenous events, the PartArrival class defines a random variable
recurrence, which generally determines the recurrence frequency of exogenous events (the elapsed time
between two consecutive events of the given type, also called inter-occurrence time). The
ProcessingStart event class defines a random variable processingTime.
Object Event (OE) Graphs, as a basic type of DPMN process diagrams, extend the Event Graph
diagram language by adding object rectangles containing declarations of typed object variables and
state change statements, as well as gateway diamonds for expressing conditional and parallel branching.
A DPMN process model, such as an OE Graph, is based on an underlying information model
defining the types of its objects and events. The process model shown in Figure 3 is an OE Graph that
is based on the OE class model shown in Figure 2.
Notice that in the OE Graph of Figure 3, the state variables of the Event Graph of Figure 1, L and
B, have been replaced by the attributes inputBufferLength and status defined in the OE class model of
Figure 2.
OE Graphs are a conservative extension of Event Graphs. This means that an OE Graph can be
transformed to an Event Graph preserving its dynamics by replacing its objects with corresponding sets
of state variables.
Figure 2 An OE class model defining an object type and three event types
Like Petri Nets, OE Graphs have a formal semantics. But while Petri Nets are an abstract
computational (“token flow”) formalism without an ontological foundation, OE Graphs are based on
the ontological categories of objects, events and causal regularities such that an OE Graph can be
decomposed into a set of event rules, representing causal regularities, which define the transitions of an
Abstract State Machine [15].
Wagner
An OE Graph specifies a set of chained event rules, one rule for each event circle of the model. The
above OE Graph specifies the following three event rules:
1. On each PartArrival event, the inputBufferLength attribute of the associated WorkStation object
is incremented and if the workstation's status attribute has the value AVAILABLE, then a new
ProcessingStart event is scheduled to occur immediately.
2. When a ProcessingStart event occurs, the associated WorkStation object's status attribute is
changed to BUSY and a ProcessingEnd event is scheduled with a delay provided by invoking
the processingTime function defined in the ProcessingStart event class.
3. When a ProcessingEnd event occurs, the inputBufferLength attribute of the associated
WorkStation object is decremented and if the inputBufferLength attribute has the value 0, the
associated WorkStation object's status attribute is changed to AVAILABLE. If the
inputBufferLength attribute has a value greater than 0, a new ProcessingStart event is scheduled
to occur immediately.
These event rules can be implemented as onEvent methods of their triggering event classes. The
resulting model can be run at https://sim4edu.com/oesjs/core1/workstation-1/ as a web-based simula-
tion.
DPMN consists of three layers. The first layer, for modelling OE Graphs, corresponds to an
extension of Event Graphs by adding the concept of Objects. The second layer (DPMN-A), for
modelling Activity Networks, adds the concepts of Resource-Constrained Activities and Resource-
Dependent Activity Scheduling based on resource roles and resource pools, while the third layer
(DPMN-PN), for modelling Processing Networks, adds the concepts of Processing Objects, Processing
Activities and Processing Flows.
Figure 4 Rewriting an OE class model with a pair of activity start and end event types to a model with a
corresponding activity type (Processing)
Wagner
The Activity-Start-End Rewrite Pattern exemplified in figures 4 and 5 can also be applied in the
inverse direction, replacing an Activity rectangle with a pair of Event circles. It allows reducing an
Activity Network model with Activity rectangles to an OE Graph as a basic DPMN diagram without
Activity rectangles.
The target model of Figure 5 specifies two event rules:
1. On each PartArrival event: (a) if the workstation's status is AVAILABLE, then a local rule
variable wsAllocated is set to true and the workstation's status is set to BUSY, else the
workstation's inputBufferlength is incremented; (b) if the wsAllocated variable has the value
true, then a new Processing activity is scheduled to start immediately (with a duration provided
by invoking the duration function defined in the Processing activity class).
2. When a Processing activity ends: (a) if the workstation's inputBufferlength is equal to 0, then
the workstation's status is set to AVAILABLE, else the local rule variable wsAllocated is set to
true and the inputBufferlength is decremented; (b) if the wsAllocated variable has the value
true, a new Processing activity is scheduled to start immediately (with a duration provided by
invoking the duration function defined in the Processing activity class).
Figure 5 Rewriting an OE Graph to a corresponding Activity Network model based on the target OE class
model of Figure 4
performed at that station, while in a processing network, processing activities can have many required
(and optional) resources of various types being allocated with various methods.
PNs have been investigated in operations management (Loch 1998) and in the mathematical theory
of queuing (Williams 2016), and have been the application focus of most industrial simulation software
products, historically starting with GPSS (Gordon 1961) and SIMAN/Arena (Pegden and Davis 1992).
They allow modelling many forms of discrete processing processes as can be found, for instance, in
the manufacturing and services industries.
In the field of DES, PNs have often been characterized by the narrative of “entities flowing through
a system”. In fact, while in Activity Networks (DPMN-A), there is only a flow of events (including
activities), in Processing Networks (DPMN-PN), this flow of events is over-laid with a flow of
(processing) objects.
It is remarkable that the PN paradigm has dominated the DES software market since the 1990s and
still flourishes today, often with object-oriented and “agent-based” extensions. Its dominance has led
many simulation experts to view it as a synonym of DES, which is a conceptual flaw because the
concept of DES, even if not precisely defined, is clearly more general than the PN paradigm.
A Processing Activity is a resource-constrained activity that is performed at a processing station
and takes one or more objects as inputs and processes them in some way (possibly transforming them
from one type of object to another type), creating one or more objects as outputs. The processed objects
have been called "transactions" in GPSS and "entities" in SIMAN/Arena, while they are called
Processing Objects in DPMN.
Each node in a PN model represents both an object and a typed event variable. An Entry Node
represents both an Entry Station (e.g., a reception area or an entrance to an inventory) and an Arrival
event variable. A Processing Node represents both a Processing Station (e.g., a workstation or a room)
and a processing activity variable. An Exit Node represents both an Exit Station and a Departure event
variable. A Processing Flow arrow connecting two processing nodes represents both an event flow and
an object flow. Thus, the node types and the flow arrows of a PN are high-level modelling concepts that
are overloaded with two meanings.
The (entry, processing and exit) stations of a PN define locations in a network space, which may be
abstract or based on a two- or three-dimensional Euclidean geometry. Consequently, PN models are
spatial simulation models, while Object Event Graphs and Activity Networks allow to abstract away
from space. When a processing object is routed to a follow-up processing station, it moves to the
location of that station. The underlying space model allows visualizing a PN simulation in a natural way
with processing objects as moving objects.
A PN modelling language should have elements for modelling each of the three types of nodes.
Consequently, DPMN-A has to be extended by adding new visual modelling elements for entry,
processing and exit nodes, and for connecting them with processing flow arrows.
The simulation modelling concepts of the PN paradigm have been adopted by most DES software
products, including Arena, Simio and AnyLogic. However, each of these products uses its own variants
of the PN concepts, together with their own proprietary terminology (and proprietary diagram
language), as illustrated by Table 1.
For accommodating PN modelling, the Activity Network modelling language OEM-A is extended
by adding pre-defined types for processing objects, entry nodes, arrival events, processing nodes,
processing activities, exit nodes and departure events, resulting in OEM-PN.
As an illustrating example, we re-model the workstation system (considered above) as a Processing
Network. Part arrivals are modeled with an «entry node» element (with name “partEntry”), the
Wagner
workstation is modeled with a «processing node» element, and the departure of parts is modeled with
an «exit node» element (with name “partExit”).
DPMN is extended by adding the new modelling elements of PN Node rectangles, representing
node objects with associated event types, and Processing Flow arrows, representing combined object-
event flows. PN Node rectangles take the form of stereotyped UML object rectangles, while PN Flow
arrows have a special arrow head, as shown in Figure 6.
The PN model implicitly defines a process model where the workstation process node stands both
for a processing activity and a processing station resource object, as shown in the upper part of Figure
7, while using the built-in types shown in the lower part of Figure 7. Since the PN model is completely
based on built-in types, no separate OE class model is needed. Notice how the entry node’s
arrivalRecurrence function defines the recurrence function of the corresponding Arrival event class,
and the processing node’s duration function defines the duration function of the corresponding
ProcessingActivity event class.
Depar
Arrival ProcessingActivity
ture
Figure 7 The elements implicitly defined (or used) by the workstation PN model of Figure 6
In our simulation design, we make the following simplifications. We consider only one particular
pizza service company, which does not have to be modeled as an explicit object. Also, we abstract away
from individual customers, orders and pizzas. And we merge the resource roles delivery scooter driver
and scooter, keeping only scooters as resources of deliver pizza activities.
We consider a scenario with the following resource pools: 2 order takers, 6 pizza makers, 3 ovens
and 10 scooters.
Figure 8 An OE class model defining object, event and activity types for the Make-and-Deliver-
Pizza process model
Notice that the association end stereotype «rr» stands for "resource role". The OE class model
specifies, for instance, that a MakePizza activity requires an oven and two pizza makers as resources.
Notice how functions representing random variables, like the duration function of all activity types,
are marked with the keyword (or UML 'stereotype') «rv» standing for "random variable". These random
variable functions sample from a probability distribution function (PDF), which is symbolically
indicated with expressions like Tri(30,40,50) standing for the triangular PDF with lower and upper
bounds 30 and 50 and a median of 40, or DU(1,4) standing for the discrete uniform PDF with lower
and upper bounds 3 and 6.
In the case of the event type OrderCall, the random variable function recurrence samples from an
exponential PDF with five different event rates given for the five consecutive hours during which the
pizza service operates.
The activity type TakeOrder is associated with the object type OrderTaker via the implicit resource
role orderTaker (with a resource cardinality constraint of "exactly 1"), indicated with the association
end stereotype «rr» standing for "resource role". A resource role assigns resource objects to activities.
Likewise, MakePizza is associated with PizzaMaker and Oven via the (implicitly named) resource
roles pizzaMakers, having a resource cardinality constraint of "exactly 2", and oven, having a resource
cardinality constraint of "exactly 1".
An OE class design diagram like the one above, defines resource roles (like pizzaMakers), resource
role types (like PizzaMaker) and resource cardinality constraints (like "exactly 2") for all types of
activities. Normally, in an OE simulation there is a one-to-one correspondence between resource role
types and resource pools. By convention, a resource pool has the same name as the corresponding
resource role type, yet pluralized and starting with a lowercase character. For instance, the name of the
resource pool for PizzaMaker is pizzaMakers.
Wagner
Notice that OrderCall events are exogenous, having a recurrence function defined case-wise for
each of the five hours per day operation of the pizza service company (in the attached invariant box).
For implementing the waiting timeout event defined in the process model, the activity type
TakeOrder has a class-level waitingTimeout function implementing a random variable with PDF U(3,6).
A DPMN process design model (like the one shown in Figure 9) essentially defines the admissible
sequences of events and activities (together with their dependencies and effects on participating
objects), while its underlying OE class model (like the one shown in Figure 8) defines the types of
objects, events and activities, together with the participation of objects in events and activities, including
the resource roles of activities, as well as resource cardinality constraints.
The process model shown in Figure 9 is enriched by definitions of items from its underlying OE
class model, such as activity duration functions or resource dependencies. Such an enriched DPMN
process design model includes all computational details needed for an implementation without a
separate explicit OE class design model, which is defined implicitly. For instance, the enriched DPMN
model of Figure 9 implicitly defines the OE class model of Figure 8 above.
Notice that in the model of Figure 9, performer roles are defined in the form of Lanes consisting of
a name (such as pizzaMakers) and and an object type name (such as PizzaMaker) denoting its range,
separated by a colon. When the performer role name is appended by a multiplicity expression in
brackets, as in pizzaMakers[2], this denotes a resource cardinality constraint (stating that exactly 2
pizzaMakers are required). When only a performer type prefixed with a colon (such as :OrderTaker) is
provided, this means that the implicit performer role name is obtained by lowercasing the performer
type name (as in orderTaker:OrderTaker).
Notice that the model of Figure 9 does not include any element representing a resource pool. It is
assumed that for any organizational position described in the underlying OE class model, the
organization under consideration has a corresponding resource pool. By default, each resource role of
an activity type is associated with a resource pool having the same (yet pluralized) name, such that its
resource objects are instances of a corresponding resource role type, which is an organizational position
in the case of human resources.
In the following subsections, we show how to implement the Make-and-Deliver-Pizza business process
model shown in Figure 9 with AnyLogic and Simio. In addition to the simulation model expressed by
this DPMN process diagram, we also need the data of a simulation scenario, like the initial states of
variables and objects, including the resource pools, for being able to run a simulation. We use a baseline
scenario with 2 order takers, 6 pizza makers, 3 ovens, and 10 scooters.
Since Simio and AnyLogic do not support Activity Networks, but only Processing Networks (PN)
with "entities flowing through the system", we need to impose a PN view on the Make-and-Deliver-
Pizza business process. This requires to figure out what could be used as "entities" for being able to
make a PN model.
Wagner
Since in the real pizza service system there are no entities that flow through the system, we need to
assume an artificial abstract entity like "the order", which arrives at the order taker and then takes the
form of the ordered pizza being delivered to the customer.
2. six individual Resource objects pizzaMaker1, ..., pizzaMaker6, which are placed in a Simio
Object List pizzaMakers representing a resource pool for the MakePizza activity;
3. two count pools ovens and scooters in the form of Simio Resource objects with capacities 3 and
10, respectively.
This results in the following Simio process diagram:
REFERENCES
Banks J, Carson J S, Nelson B L, and Nicol D M (2010). Discrete-Event System Simulation. 5th ed.
Upper Saddle River, New Jersey: Prentice-Hall, Inc.
Banks J (1998). Principles of Simulation. In: Banks J (eds). Handbook of Simulation. New York: John
Wiley & Sons, Inc.
BPMN (Version 2.0), 2011. http://www.omg.org/spec/BPMN/2.0, accessed 5th July 2021.
Gordon, G. 1961. “A general purpose systems simulation program”. In AFIPS '61: Proceedings of the
Eastern Joint Computer Conference, 87–104, New York: Association for Computing Machinery.
Guizzardi, G., and G. Wagner. 2010. “Towards an Ontological Foundation of Discrete Event
Simulation”. In Proceedings of the 2010 Winter Simulation Conference, edited by B. Johansson, S.
Jain, J. Montoya-Torres, J. Hugan, E. Yücesan. 652−664. Piscataway, New Jersey: Institute of
Electrical and Electronics Engineers, Inc.
Gurevich, Y. 1985. “A New Thesis”. Abstracts, American Mathematical Society, 6(4):317.
Loch, C.H. 1998. Operations Management and Reengineering. European Management Journal, 16,
306−317.
Markowitz, H., B. Hausner, and H. Karr. 1962. SIMSCRIPT: A Simulation Programming Language.
Englewood Cliffs, N. J.: Prentice Hall.
Pegden, C.D. and D.A. Davis. 1992. “Arena: a SIMAN/Cinema-Based Hierarchical Modelling
System”. In Proceedings of the 1992 Winter Simulation Conference, edited by J.J. Swain, D.
Goldsman, R.C. Crain, and J.R. Wilson, 390–399. Piscataway, New Jersey: Institute of Electrical
and Electronics Engineers, Inc.
Pegden, C.D. 2010. “Advanced Tutorial: Overview of Simulation World Views”. In Proceedings of the
2010 Winter Simulation Conference, edited by B. Johansson, S. Jain, J. Montoya-Torres, J. Hugan,
and E. Yücesan, 643−651. Piscataway, New Jersey: Institute of Electrical and Electronics
Engineers, Inc.
Wagner
Schruben, L.W. 1983. “Simulation Modelling with Event Graphs”. Communications of the ACM
26:957–963.
Tocher, K.D. 1960. An Integrated Project for the Design and Appraisal of Mechanized Decision-
Making Control Systems. Operational Research 11(1/2) :50–65.
Wagner, G. 2022. Discrete Event Simulation Engineering. https://sim4edu.com/reading/des-
engineering/, accessed 1 December 2022.
Wagner, G. 2021. “Business Process Modelling and Simulation with DPMN: Processing Activities”. In
Proceedings of the 2021 Winter Simulation Conference, edited by S. Kim, B. Feng, K. Smith, S.
Masoud, Z. Zheng, C. Szabo and M. Loper. Piscataway, New Jersey: Institute of Electrical and
Electronics Engineers, Inc.
Wagner, G. 2020. “Business Process Modelling and Simulation with DPMN: Resource-Constrained
Activities”. In Proceedings of the 2020 Winter Simulation Conference, edited by K.-H. Bae, B.
Feng, S. Kim, S. Lazarova-Molnar, Z. Zheng, T. Roeder, and R. Thiesing. 45–59. Piscataway, New
Jersey: Institute of Electrical and Electronics Engineers, Inc.
Wagner, G. 2018. “Information and Process Modelling for Simulation – Part I: Objects and Events”.
Journal of Simulation Engineering 1:1–25.
Wagner, G. 2017. “An Abstract State Machine Semantics for Discrete Event Simulation”. In
Proceedings of the 2017 Winter Simulation Conference, edited by W. K. V. Chan, A.D'Ambrogio,
G. Zacharewicz, N. Mustafee, G. Wainer, and E. Page. 762–773. Piscataway, New Jersey: Institute
of Electrical and Electronics Engineers, Inc.
Williams, R.J. 2016. Stochastic Processing Networks. Annual Review of Statistics and Its Application
3:1, 323–345.
AUTHOR BIOGRAPHY