Discrete Event

The world around us appears to be "continuous": the greater majority of processes we observe consist of continuous changes. However, when we analyze those processes, in many cases it makes sense to abstract from their continuous nature and consider only some "important moments", "events" in the system lifetime. The modeling paradigm that suggests to approximate the real-world processes with such events is called Discrete Event Modeling.

Here are some examples of events: a customer arrives at a shop, a truck finishes unloading, a conveyor stops, a new product is launched, the inventory level reaches a certain threshold, etc. In discrete event modeling the movement of e.g. a train from point A to point B would be modeled with two events: departure and arrival, and the actual movement will become a time delay (interval) between them. (This does not mean however that you cannot animate the train as moving, in fact in AnyLogic you can produce visually continuous animations for logically discrete models).

Process workflow definition in AnyLogic Enterprise LibraryThe term Discrete Event is however mainy used in the narrower sense to denote "Process-Centric" modeling that suggests representing the system being analyzed as a sequence of operations: (arrival, delay, use resource, split, combine, etc.) being performed on entities (transactions) of certain types: customers, documents, parts, data packets, vehicles, phone calls. The entities are passive, but can have attributes that affect the way they are handled (e.g. call type, task complexity) or may change as the entity flows through the process (e.g. accumulated waiting time or cost). Process-centric modeling is a medium-low abstraction level modeling approach: although each object is modeled individually as an entity, typically, the modeler throws away many “physical level” details, such as exact geometry, accelerations/decelerations. Process-centric modeling is widely applied in business processes, manufacturing, logistics, healthcare areas.

Before deciding to use this approach we recommend to verify that the system [from the viewpoint of the project objectives!] is indeed naturally described as a (possibly hierarchical) sequence of operations. You should always have in mind alternative approaches; for example, if it is easier to describe the behavior of each individual entity than trying to put together a global workflow, agent based modeling may be the way to go. Similarly, if you are interested in aggregates and not in individual unit interaction, system dynamics may be applied. AnyLogic supports all three modeling approaches, so you may experiment with the abstraction levels and approaches staying within one tool.

AnyLogic Enterprise Library

The primary AnyLogic toolkit for process-centric modeling is the Enterprise Library. The Enterprise Library is a collection of objects for defining the process workflow: Source, Sink, Delay, Queue, Service, SelectOutput, etc., and the associated resources. All objects are highly customizable: their parameters can be changed dynamically, the actions may depend on the entity attributes, etc. Objects have onEnter/onExit extension points where you can define the actions that need to be performed on the entities going through the object. The generic class Entity (which is actually a Java class) in turn can be extended by adding custom fields and methods. The Enterprise Library based model components can naturally interoperate with system dynamics and agent based components or with AnyLogic primitives like events or statecharts.

If the system you are modeling is complex, it makes sense to break it down into components and model them separately in different Active Objects. You can define sub-process start and end points, expose them as the interface of the model component and hide the sub-process implementation. At the top level model you will be instantiating and connecting those high-level components together. As any Active Object can be instantiated and parameterized many times this also provides a good basis for component reuse within one model or across models.

Enterprise Library works closely with AnyLogic presentation/animation framework and enables you to develop very sophisticated process animations. The animations can be made hierarchical with multiple views, e.g. the high-level view on the process may show only key aggregate indicators, but you can switch to components view with detailed sub-process animation.

Network Based Modeling

Process workflow defnition in AnyLogic Network Based ModelingThe Enterprise Library also contains a set of objects specifically designed for "space-aware" processes - those that take place in a certain physical space and involve movement of entities and resources. The object set simplifies modeling of such systems a lot and is called Network Based Modeling. To use this technique you need to define the network topology (e.g. by drawing AnyLogic shapes over a facility map used as a background), the resource pools, and the process itself. The process definition may be a mixture of network-specific objects, such as "move to location" or "attach resource unit" and regular Enterprise Library objects. The entities and resources are automatically animated moving along the network segments or staying at nodes; this can be interleaved with regular animations.