Mastering simulation techniques: tips and insights from an AnyLogic expert

Monitors with simulation model and code

Simulation modeling has emerged as a promising direction for enhancing business operations. As a simulation modeler, you're likely to encounter numerous challenges and complexities in crafting optimal models.

Whether you're an experienced professional with various simulation techniques in your inventory or a newcomer eager to embrace new technologies, key simulation tips can empower you across diverse domains.

Contents:

  1. Insights and simulation techniques overview
  2. Three main struggles of simulation modelers
  3. Stages of applying simulation techniques
  4. Simulation tips for understanding models
  5. Final thoughts

Insights and simulation techniques overview

Dr. Benjamin Schumann is a well-known simulation-modeling consultant with considerable experience in solving complex operational and strategic challenges. Our blog contains many materials and guides by Benjamin.

This article focuses on his workshop at the AnyLogic Conference 2023. In the presentation, he shares an approach to building a flexible twin model that can be used for 90% of modeling tasks in any industry.



For detailed technical instructions on building the model, watch the video. In the blog post, we want to highlight another important point of the presentation — simulation modelers' pains. We provide you with several simulation tips that will help you cope with modeling challenges.

Three main struggles of simulation modelers

Simulation modeling is a complex field with its own challenges. Before you know what simulation techniques and tips to use, you should understand what you use them for. Let's explore the common pains that simulation modelers face.

Models’ death

No model can last forever. It may be carefully built to mirror real-life systems, but sooner or later, they will become outdated because of real-world changes. It might be the influence of global changes or even new bosses who don't trust the old models and demand new ones.

Scalability and flexibility

Models might work well for one small part of a system, but it's hard to make them handle bigger projects. It's also challenging to create models that can grow, even if this is only sometimes needed. Models made for specific jobs must deal with getting bigger while still doing their jobs well.

Navigating changes

Change is always present in simulation projects, and it's not easy for modelers to deal with. Models are like ships on a rough sea, trying to navigate through all these changes — some big, some small. Adapting quickly is important for making good models that can handle whatever comes their way.

In our study of simulation techniques, we delve into the shared challenges practitioners face. Once you get used to a new simulation technique, you can use tips to boost the experience and be ready for the next step.

Stages of applying simulation techniques

On the way from beginner to advanced AnyLogic practitioner, you will go through five stages of mastering simulation techniques.

Five stages of mastering AnyLogic with simulation techniques

Five stages of mastering AnyLogic with simulation techniques

  1. Engage with basic functionalities. For example, you can drag and drop elements and observe actions in AnyLogic software.
  2. You learn to manipulate custom agents within the system, enhancing its capabilities. It is a good time to start looking for simulation tips.
  3. Delve deeper into the system's intricacies, and value agents' potential to replace traditional flowchart blocks. This realization often signifies a transition towards creating more sophisticated, agent-based models.
  4. You opt to combine flowchart blocks with agent-based simulation techniques, thereby merging different modeling approaches to achieve unparalleled flexibility and power.
  5. You understand the importance of leveraging object-oriented principles and proficient Java coding. So, you create scalable, elegant, and reproducible models by implementing different simulation techniques.

Quick simulation tip from Ben: Remember to add comments to your code while building a model.

Dr. Benjamin Schumann

Don't write what this is doing because you can see that in the code. Write why this is there. Why should you use this? What is this for?
– Dr. Benjamin Schumann

Simulation tips for understanding models

The core of Dr. Benjamin Schumann’s workshop is a generic model and understanding of it at first glance. Ben shares helpful simulation tips that will make you feel more comfortable with models.

Identify the hierarchy

Starting from the top, you have the Main component, which serves as the overarching framework. Within the Main element, there is an embedded agent type called Factory. Each Factory can contain one or several Machines and Inventories. Additionally, Products move between machines, follow their recipes, and perform tasks. If Products require materials for their operations, a Material Request agent exists within this setup.

Generic simulation model structure

Simulation tip: before building or interacting with an existing model, understand the hierarchy

Note: Keep animation-related components separate from the logical structure, ensuring the modeling approach is clear and simple.

Understand the components

Main component: Characterized by parameters like the number of Machines per Factory and machine duration, which define its operation.

Factory component: Contains populations of Machines, Products, and Inventories. It is defined by parameters such as the number of machines.

Machine component: Contains an empty Inventory population and is characterized by a single parameter determining if it has an Inventory. A set Inventory function is called at startup to determine Inventory instantiation.

Inventory component: Inventories are created by adding elements to a population. It has an initial quantity parameter and gets copied into a separate object at startup.

Advanced Java classes: Utilize linked hash maps and POJO (Plain Old Java Object) materials to ensure clarity and consistency. JC quantity objects represent mutable quantities with built-in checks for unit compatibility and availability.

Understand the dynamics

Understanding simulation model dynamics helps improve decision-making and system performance by finding problems and predicting outcomes in different situations. There are three tips for understanding model dynamics:

  • Explore dynamics: Identify events and experiments to grasp the model's dynamic behavior. For example, an event can initiate Inventory restocking based on set replenishment parameters.
  • Find dynamic elements: Pinpoint key objects like source blocks, which generate agents during runtime. In this example, the source block generates Product agents with defined arrival rates.
  • Examine Products: Products run under recipes, dynamically engaging with Machines and Materials. They can request Materials from Inventories and generate Material Request agents.

Final thoughts

There is always room for improvement, whether you're just starting out or have years of experience. With Ben's simulation tips, becoming a model expert is a lot easier. You go through five stages, starting with basic skills and progressing to more advanced simulation techniques.


Stay updated on the latest advancements in simulation techniques with AnyLogic. Sign up for our newsletter for monthly insights and updates, ensuring you stay ahead of the curve in enhancing your modeling skills

Subscribe to our newsletter

Postes connexes