Model modularity to optimize continuous development
1. Model modularity to optimize continuous development
In this video, we will learn the importance of modularity to optimize the continuous update and improvement of discrete-event models.2. What is model scalability?
Model scalability is the ability of models to expand their capabilities over time without losing performance and breaking down. The term is often used to refer to the ability of systems to increase their capacity based on the user's demand. Here, we use the term "scalability" to refer to the ability of a system to expand easily and remain stable. This is essential to the long-term success and value of discrete-event models - their ability to evolve. It depends on good coding practices such as model modularity.3. Scaled and less-scalable models
Let's look at an example. On the left, we have a scalable model. We can easily switch function B1 with function B2 without restructuring the code. This is the ideal situation as it allows to switch between functions to update the model or test different modeling hypotheses. On the right, we have a less scalable model because we cannot easily switch between functions B1 and B2. Since function C is within function B1, replacing function B1 with function B2 would require making a copy of function C inside function B2. This is a much less desirable situation because the copy of function C increases the amount of code to maintain, increasing the chance of introducing bugs.4. Model modularity
So, what is model modularity? It refers to the ability to use interchangeable components in models. In the context of discrete-event models, this could refer to compartmentalizing process generators into separate functions. This allows calling modules multiple times instead of creating multiple copies of the same code, which would increase the chance of introducing bugs. In this diagram, we show an example of an eCommerce business involving different processes. Imagine our modeling team has developed an improved version of function "func_b" named "func_b1". Switching between these two functions should be facilitated by a modular model. Our modeling team also realized that a new process needs to be introduced to account for the time of storage. They developed function "func_f" for this purpose that should be introduced between functions "func_c" and "func_d".5. Example: replacing and adding modules
Now, let's see what the eCommerce model could look like based on the SimPy package. On the left, we have the code before the update. We have a resource request that is first yielded. Once the request is granted, the different process functions are called. On the right, we have the updated code. Function "func_b" has been commented out, and a call to "func_b1" has been introduced. The new module "func_f" has also been added.6. Let's practice!
Let's now work through some discrete-event model examples to see how model modularity would apply.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.