AnyLogic
Expand
Font size

Process Modeling Library

AnyLogic Process Modeling Library supports discrete-event, or, to be more precise, process-centric modeling paradigm. Using the Process Modeling Library blocks you can model the real-world systems in terms of agents (transactions, customers, products, parts, vehicles, etc.), processes (sequences of operations typically involving queues, delays, resource utilization), and resources. The processes are specified in the form of flowcharts — a widely adopted graphical representation used in many areas: manufacturing, call centers, business processes, logistics, healthcare, etc. AnyLogic flowcharts are hierarchical, scalable, extensible, and object-oriented, which enables the user to model large complex systems at any level of detail. Another important feature of the Process Modeling Library is ability to create very sophisticated animations of process models.

Extending the process models

As anything in AnyLogic, the process models can be extended to any depth with custom functionality. First, you can create your own agent and resource unit types with any fields and functions added. By specifying those types in the generic parameters of the process blocks you enable easy access to the custom fields. In the Airport model you may want to have special agent types for Passenger, SecurityOfficer, Baggage, etc.

Second, every Process Modeling Library block has “extension points” — places where you can insert your own actions or expressions. These extension points are dynamic parameters and are evaluated during the simulation when the agents go through the process flowchart. For example, in, say, a Delay block corresponding to boarding pass printing in CheckIn you may assign a gate to the passenger by writing agent.gate = main.gateof( agent.flightno ) in the On exit parameter. Here gate and flightno are custom properties of the passenger, and gateof — a function within the Main airport object. Note that you can access any part of AnyLogic model from any other part, and moreover, as long as this is Java code that you are using, you can communicate with any external software and/or use any of numerous Java packages.

Developing animations for the process models

Process Modeling 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, say 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.

For the majority of the Process Modeling Library blocks the animation is defined in the following way: you add a space markup shape, path or node and provide that element in the Agent location parameter of, say, a Delay block and indicate that you wish the agents being delayed to move along the path. Then while agents are inside the delay, the agent animation shapes are drawn at the corresponding positions on the path.

Combining the process models with models and constructs of other types

One of the greatest advantages of AnyLogic is the ability to combine different modeling styles to capture the complexity and heterogeneity of the real-world systems. The Process Modeling Library is an open framework that enables you to combine your process models with e.g. System Dynamics or Agent Based models, or simply to develop custom blocks using AnyLogic core primitives and include them in the process flow.

There is a wide range of techniques, here are some examples.

  • A link from SD stock and flow diagram to a process model may be implemented as, say, the Source block agent generation rate controlled by a System Dynamics variable.
  • A reverse link may be, say, an SD stock incremented each time an agent arrives at Sink block in the process flow.
  • An agent may live in an agent population and at a certain point in its lifetime become injected into a process via Enter block.

If you need an block with specific functionality different from any Process Modeling Library block (and not achievable by combining them), you can develop your own agent type and use Exit and Enter blocks on its interface — then you will be able to insert such reusable component in the process flow. Inside such agent you can use statecharts, events, variables, etc. See Exit for more information.

Hierarchical models and reusable model components

If the system you are modeling is complex, it makes sense to identify the components and model the component’s processes separately in different agents. You can define ports (like sub-process start and end points) and 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 agent can be parameterized and instantiated many times, this also provides a good basis for component reuse within one model or across models.

Example: in an airport model you may wish to have components like CheckIn, PassportControl, Boarding, etc. Within the check-in you may have a CheckInDesk, which is modeled once and set to be an agent population composed of multiple individual blocks. The resources in the model can be shared from different agents, so you can, say, have a separate component InformationSystem proving the resources for those sub-processes.

How can we improve this article?