Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Simulation Modeling with Python

You're reading from   Hands-On Simulation Modeling with Python Develop simulation models for improved efficiency and precision in the decision-making process

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781804616888
Length 460 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1:Getting Started with Numerical Simulation
2. Chapter 1: Introducing Simulation Models FREE CHAPTER 3. Chapter 2: Understanding Randomness and Random Numbers 4. Chapter 3: Probability and Data Generation Processes 5. Part 2:Simulation Modeling Algorithms and Techniques
6. Chapter 4: Exploring Monte Carlo Simulations 7. Chapter 5: Simulation-Based Markov Decision Processes 8. Chapter 6: Resampling Methods 9. Chapter 7: Using Simulation to Improve and Optimize Systems 10. Chapter 8: Introducing Evolutionary Systems 11. Part 3:Simulation Applications to Solve Real-World Problems
12. Chapter 9: Using Simulation Models for Financial Engineering 13. Chapter 10: Simulating Physical Phenomena Using Neural Networks 14. Chapter 11: Modeling and Simulation for Project Management 15. Chapter 12: Simulating Models for Fault Diagnosis in Dynamic Systems 16. Chapter 13: What’s Next? 17. Index 18. Other Books You May Enjoy

How to run efficient simulations to analyze real-world systems

To perform a correct simulation, the simulation software must be properly structured. The program structure must consist of three software levels:

  • The simulation executive software controls the execution of the model program. It sequences operations and manages modularity problems by separating generic control from model details. Two techniques are possible: the synchronous execution technique and the event-scanning technique.
  • The model program implements the model of the system to be simulated and is executed by the simulator.
  • The routine tools generate random numbers by deriving them from typical probability distributions to obtain statistics and to manage problems related to modularity by separating generic functions from those specific to the model.

The main cycle of a simulation generally consists of three phases:

  • Start phase: The termination condition is initialized to false; the status variables are initialized, the clock is set to the simulation start time (usually zero), and the initial events are placed in the event list.
  • Loop phase: The cycle continues until the termination condition occurs. At each step, the clock is set equal to the start time of the first event in the queue, the event is simulated and removed from the queue, and finally, the statistics are updated.
  • End phase: The simulation ends by generating a report with the statistics of the simulated system.

The simulation can be applied to all systems that can be modeled, respecting the characteristics mentioned in the previous paragraphs. This approach is particularly suitable for diagnosing problems related to complex processes. Understand where the system bottlenecks are. These areas are critical as they significantly decrease system performance and are usually associated with slower components. The only way to significantly improve the performance of a process is to improve it precisely in these critical areas, which, unfortunately, in many processes, are clouded by excess inventory, overproduction, diversity of processes, different sequencing, and stratification.

Therefore, by modeling these processes accurately and inserting them into a simulator, it is possible to obtain a more detailed view of the entire system, find the bottlenecks, and use performance indicators to analyze the system and improve its performance.

A simulation is a numerical model that mimics the operations of a real existing system, such as the daily operations of a bank, the process of a factory assembly line, and the assignment of personnel in a hospital or call center. For this reason, it must consider all the resources and constraints related to the system and their interactions over time. It must also coincide as much as possible with reality and therefore consider that events can have variable completion times, and this is done by introducing pseudorandom generators. In this way, the simulation is much closer to the real situation, and therefore through it, it is possible to predict the behavior of the system in the face of changes in the input data or its structure, just as if the simulation were real. Therefore, with this type of simulation, you can test your ideas much faster and at a much lower cost than real simulation.

Generally, any real system that is expressible through a flow of processes with events can be simulated. The processes that can be most beneficial are those with more changes over time and with a high level of randomness. A good example is a vehicle filling station: you cannot predict exactly when the next customer will arrive, nor the type and quantity of fuel they will require.

Consequently, the simulation, where applicable, should be preferred to the real simulation since a gain in terms of cost, time, and repeatability of the simulation is obtained. Just think of the cost associated with each real simulation, not only as regards the expense of hiring new employees or purchasing new components, but also the consequences that these decisions can have on the real system, which can lead to positive but also negative results. On the other hand, this is avoidable in numerical simulation in which the system has no connections with the real system, and therefore the test does not cause economic consequences.

Furthermore, it is more difficult to simulate the same real system twice with the same conditions, while in numerical simulation, you can test a system with the same conditions by modifying only the input. This gives greater certainty that one idea is better than another. Finally, as mentioned before, the time needed to carry out a numerical simulation is much shorter than that of a real simulation, especially if the simulated system takes a very long time. For example, if we want to analyze the throughput of customers in a month, the real simulation must pass at least 1 month, and the numerical one just a few seconds.

You have been reading a chapter from
Hands-On Simulation Modeling with Python - Second Edition
Published in: Nov 2022
Publisher: Packt
ISBN-13: 9781804616888
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image