Part III. Activity-Based Simulation and Activity Networks
Activity-Based Simulation is a form of DES where the concept of activities is used in addition to the basic concept of instantaneous events. A simple Activity Network (AN) is obtained from an OEG by adding activity nodes in the form of rectangles with rounded corners, as shown in the following example:
More formally, a simple AN is defined on the basis of a set of object types OT, a set of event types ET and a set of activity types AT as a directed graph ⟨ N, D ⟩ with two types of nodes N = EN ⋃ AN, event nodes and activity nodes, and a set of directed edges D ⊆ N ⨉ N , such that
each event node n ∈ EN is associated with
- an event type E ∈ ET,
- an event variable e representing an event of type E,
- a (possibly empty) set of auxiliary object variables o,
- a (possibly empty) set of on-event object state transition functions;
each activity node n ∈ AN is associated with
- an activity type A ∈ AT,
- an activity variable a representing an activity of type A,
- a (possibly empty) set of auxiliary object variables o,
- a (possibly empty) set of on-activity-start object state transition functions,
- a (possibly empty) set of on-activity-end object state transition functions;
- each directed edge ⟨ n1, n2 ⟩ ∈
D may be associated with
- a numeric delay expression δ possibly expressed with the help of the variables associated with n1,
- a condition (or Boolean expression) C expressed with the help of the variables associated with n1.
Chapter 9. Simple Activities
A simple activity is an activity with zero or more participants, none of which is having a special meaning (such as being a resource or a processing object).
9.1. Conceptual Modeling of Simple Activities
Conceptually, an activity is a composite event that is composed of, and temporally framed by, a pair of start and end events. Consequently, whenever a model contains a pair of related start and end event types, like processing start and processing end in the model of a manufacturing workstation shown on the left-hand side of Figure 9-1 and Figure 9-2, they can be replaced with a corresponding activity type, like processing, as shown on the right-hand side.
It is obvious that applying this replacement pattern leads to a conceptual and visual simplification of the models concerned.
9.2. Design Modeling of Simple Activities
Like in a conceptual model, also in a design model, a pair of
corresponding activity start event and end event circles, like
ProcessingStart
and ProcessingEnd
in the source
models shown in Figure 9-3 and Figure 9-4, can be replaced with a corresponding
activity rectangle, like Processing
, as in the target models
shown in these figures.
Extending basic OE class design models by adding activity types
In the case
of an OE class design model, this
replacement pattern implies allocating all features (attributes,
associations and operations) of the classes defining the start and the end
event type in the class defining the corresponding activity type, possibly
with renaming some of them. In the example of Figure 9-3, there is only one such feature: the
class-level operation ProcessingStart::processingTime
, which is
allocated to Processing
and renamed to
time
.
Extending Object Event Graphs by adding Activity rectangles
In the case of a process design model, the rewrite pattern implies that an Event circle pair consisting of an Event circle intended to represent activity start events and an Event circle intended to represent related activity end events, with an event scheduling arrow from the start to the end Event circle annotated by a delay expression, is replaced by an Activity rectangle such that:
- All Data Objects attached to the end Event circle get attached to the Activity rectangle (since an activity occurs when it it is completed).
- All event scheduling arrows going out from the end Event circle are turned into event scheduling arrows going out from the Activity rectangle.
- All start event scheduling arrows are replaced with corresponding
activity scheduling arrows having an additional creation parameter
assignment for the duration of a scheduled activity, which is
set to the delay expression defined for the end event scheduling arrow.
In the example above, the duration parameter in the annotation of the
two activity scheduling arrows is set to
Processing::time()
in the target diagram, which is the same as the delayProcessingStart::processingTime
in the source diagram. - When the start Event circle has one or more attached Data Objects or any outgoing event scheduling arrow that does not go to the end Event circle, then a start Event circle has to be included in the Activity rectangle for attaching the Data Object(s) and as the source of the outgoing event scheduling arrow(s).
This Activity-Start-End Rewrite Pattern, which can also be applied in the inverse direction, replacing an Activity rectangle with an Event circle pair, defines the meaning of an Activity rectangle in a DPMN diagram. It allows reducing a DPMN-A diagram with Activity rectangles to an Object Event Graph (a basic DPMN diagram without Activity rectangles).
Notice that, like the source model, also the target model of Figure 9-4 specifies three event rules:
- On each PartArrival event, the arrived part is added to the workstation's input buffer and if the workstation's status is AVAILABLE, then a new Processing activity is scheduled to start immediately with a duration provided by invoking the time function defined in the Processing activity class.
- When a Processing activity starts, the workstation's status is changed to BUSY.
- When a Processing activity ends, the processed part is removed from the input buffer and, if the input buffer is not empty, a new Processing activity is scheduled to start immediately, otherwise (if the input buffer is empty) the workstation's status is changed to AVAILABLE.
An alternative process design model of the single workstation system
Based on the same information design model, shown in the target model of Figure 9-3, we can make another process design model of the single workstation system as an alternative to the target model of Figure 9-4. This alternative model makes it more clear that a workstation is, in fact, an exclusive resource of its processing activity. The concepts of resources and resource-constrained activities are discussed in the following sections, and in Section 10.2, it is shown how to simplify the basic DPMN model of Figure 9-5 by using the higher-level modeling elements introduced in DPMN-A.