“Don’t leave Money on the Table,” These words, or questions of a similar nature, are heard time and time again in most meetings where simulation has been presented. Most of the time systems are so complex, that finding the “right solution” is easier said than done. To find the exact combination of conditions that will give you the ‘best’ possible system performance, you need to examine multiple scenarios.

money wasted for not using process optimization

Every situation can require some modification of your simulation model. The sheer number of parameters and combinations can create thousands or even hundreds of thousands of possible experiments. You’re left facing an impractical task. And yet potential improvements are never realized due to a lack of time for experimentation.

Great presentation! Are you sure you’ve found the best solution for our business?

With ProcessModel, the task becomes a whole lot easier. ProcessModel has an optimization tool called SimRunner that automates the process of creating, running and analyzing scenarios. You give SimRunner a goal or an objective, and the software will adjust the parameters of the model to meet that goal. For example, you set a goal of reaching the highest throughput with the minimum number of resources and the lowest WIP (Work In Progress). SimRunner intelligently runs scenarios, changes the parameters, compares the output. and shows you the best settings of parameters to achieve your goal…while you work on another project!

When to Use Process Optimization

When should you use optimization? Well, you will need to run optimization when the number of choices exceeds the number of experiments you are willing to run to find the answer. A natural starting point is when the number of experiments exceed 15, then you should start setting up the model for optimization. It only takes a few minutes to set up and you can do other things while the computer is running experiments. In the case where there could be large numbers of experiments then you might want to let the optimizer run while. You can go to lunch or home for the night. When you return, the optimizer will have identified the best solution. It just doesn’t get any better than that!

scenario planning for process optimization

How Many Experiments Might be Needed

It depends on the number of factors and the number of choices for each of those factors. To figure out the number of scenarios required, multiply number of possible options for one choice by the number of possible options of the next choice. For example if there are 3 job functions (factors) and each of the personnel in those job functions can vary by 5 (i.e. vary from 15 to 20) then the number of possibilities would be 125.

Think of it like this: you have 5 choices for the first factor. For each of those choices, there are 5 choices for the second factor, making 5 * 5 = 25. For each of those 25 combinations, there are 5 choices for the third factor, and so on. Thus, we get 125. It is easy to see how easily the number of experiments can get completely out of hand. If you have only 6 factors, with five choices each, then the number of experiments would be almost to 16,000! If two more factors are added then the number of possible experiments exceeds 390,000.

Design of Experiments

tsetse fly survival of the fittest

In a complex system, the design of experiments is used to limit the number of possible trials to save time and money. That means some experiments won’t be run because of an arbitrarily decision not to try those combinations. Rather than artificially eliminate possibilities, why not let the computer eliminate possible trials based on the response achieved? That is what simulation optimization does. It does a smart design of experiments and evolves along the way.

It is kind of like the selection process for the Tsetse fly. The weak ones die off and the strong one’s mate and proliferate. In an optimization you can perform over 400,000 possible experiments, but the intelligent optimization of ProcessModel may be able to find you a great solution only after running 270 experiments! That’s intelligent automated design of experiments.

Next, is design of experiments wasn’t really designed to handle a range of possibilities for each factor (i.e. 15 to 20). If a range of possibilities is used then the number of experiments grows dramatically. Now, we are back to analyzing large numbers of experiments to figure out which is best. This is a bad choice, because you still do the work to analyze the results. In a complex system this could mean hundreds of hours of pouring over data find the “best” result.

Start Your Process Optimization Journey Toady!

The trial software now continues functioning after the trial period has ended. It transforms into a limited version of ProcessModel and stays active permanently. This feature enables you to experience the full capabilities of ProcessModel during the trial and then use the personal version as a continual learning aid.

How To Do Optimization

a digital twin for process optimization

It’s really not that hard.

  1. Prepare a Validated Model
  2. Insert Scenario Parameters
  3. Run the Model and Launch SimRunner
  4. Set the Goals for Optimization
  5. Select the Parameters to Adjust
  6. Optimize
  7. Plug Optimization Values into the Model

Prepare a Validated Model

Since this article is not on validating models, I am not going to spend much time on validating and verifying your model. That being said, don’t optimize unless the model is validated. It is kind of like kissing the wrong girl. The outcome is uncertain and probability of failure is high.

Some of the simple things that you can do include:

  • Watch the animation to determine that the model performs all intended functions.
  • Make certain that the data going into the model is correct
  • Compare the overall output to real data from company systems. This is one of the vital reasons for doing a model of the as-is system…you can gain confidence in the predictive capability of the model before making changes.
  • Compare critical parts of the model with known or estimated data.

Insert Scenario Parameters

Now that you have a validated model to work with, create scenario parameters for each aspect of the model that you want to change. To help the learning process, we are going to use a very simple model to illustrate the steps used. The same procedure will apply to complex models.

process optimization model

In this simple model; Items arrive every 20 minutes. The first process, called Process1, takes 60 minutes to complete, while the second process, called Process2, takes 180 minutes to complete. The goal of this model will be to Maximize Throughput with the Minimum Resources. You could easily calculate in your head that three workers would be needed at the first process, while nine would be needed at the second process. Obviously, you wouldn’t do simulation on model that you already knew the answer for, but I think you will find this simple example illustrative and helpful to your understanding.

Now we need to define the scenario parameters for the elements that will be changed in the model. Scenario parameters are like a control levers used to set the number of resources (or any other parameter you want to change). When used with the optimizer, they are automatically adjusted through a range that you specify.

The scenarios dialog is found in the simulation menu.

defining scenarios for process optimization

We will be adding a scenario parameter for each of the workers. Remember this tip; always start the scenario parameters with “s_” so that I can spot them in my model. You can immediately know that parameter is for scenarios rather than a variable or attribute.

I am defining two scenario parameters. One scenario parameter will be used for each resource type.

The Default Value acts as a starting point for the optimizer. Although we already know the answer, I am going to pretend that I don’t know the answer and set the default values to 2 and 8 respectively.

setting up scenario parameters for process optimization

The scenario parameter then needs to be placed in the dialog where the adjustments will be made. Since quantity of resources will be changed, we will go to the resource dialog. Delete the contents of the quantity field and right-mouse-click in the same field. Use the keywords selection to select the appropriate scenario parameter.

changing resource quantity to a scenario parameter

Since the Worker1 is assigned to the activity titled Process1, we need to make certain that the capacity of the activity is large enough to handle the assigned workers. Without making the change to the Capacity of Activity1 it is as if we have a lot of resources but no workspace for them to perform their tasks. To make this change, delete out the contents of the capacity field and right-mouse-click in the same field. Use the keywords selection to select the appropriate scenario parameter.

changing the activity capacity with a scenario parameter

Repeat the procedure for Worker2 and the Activity2 where that resource is assigned.

Run the Model and Launch SimRunner

With scenario parameters in place the model, Simulate the model and then click No to not see the results.

This important because when you simulate the model, it creates and saves the output, this creates a “map” of the things that can be compared by the optimizer. This “map” will allow us to set a target for which the optimizer can then hunt.

Launch SimRunner from the Tools menu.launching simrunner tool for process optimization

Set the Goals for Optimization

money on the dart - square image

The objective function is an expression used to quantitatively evaluate a simulation model’s performance. In other words, you are going to create a target that SimRunner will intelligently aim for.

By measuring various performance characteristics and taking into consideration how you weigh them, SimRunner can measure how well your system operates. However, SimRunner knows only what you tell it via the objective function. For instance, if your objective function measures only one variable, Total_Throughput, SimRunner will attempt to optimize that variable. If you do not include an objective function term to tell it that you also want to minimize the total number of workers used, SimRunner will assume that you don’t care how many workers you use. Since the objective function can include multiple terms, be sure to include all of the response statistics about which you are concerned.

In our example we are going to maximize the Items Processed while minimizing the number of Resources.

setting entity response statistics for process optimizationEntity:Max: 1 * Item – Qty Processed

In the Response Category field, select Entity. The statistics for entities that can be used in the objective are now shown the Response Statistic field. Double-click on the “Item – Qty Processed” to move it into the Objective Function (to make it part of the targeting formula). Weighting could be added to adjust the relative importance of each response statistic.

We are not going to be making changes to the weighting factors in this example, but a brief explanation will help to show how it will be used. Weights serve as a means of load balancing for statistics that might bias the objective function. Since most simulation models produce a variety of large and small values, it is often necessary to weight these values to ensure that the objective function does not unintentionally favor any particular statistic. For example, suppose that a run of your model returns a throughput of .72 and an average WIP of 4.56. If you maximize throughput and minimize WIP by applying the same weight to both (W1=W2), you will bias the objective function in favor of WIP:

Maximize (W1)*(Throughput)] = .72

Minimize (W2)*(WIP)] = 4.56using weighting factors to optimize throughput

In this case, since you want to ensure that both statistics carry equal weight in the objective function, you will apply a weight of 6.33 (W1=6.33) to throughput and 1.0(W2=1.0) to WIP to make them of equal weight in the objective function.

Maximize[(W1)*(Throughput)] = 4.56

Minimize[(W2)*(WIP)] = 4.56distributing weight to equalize objective function

In situations where it is necessary to favor one statistic over another, balancing the statistics first will make it easier to control the amount of bias you apply. For example, if you apply a weight of 12.67 (W1=12.67) to throughput and 1.0 (W2=1.0) to WIP, the objective function will consider throughput to be twice as important as WIP

The other two statistics that need to be part of the Object Function are the number of resources.  In the Response Category field, select Resource. Double-click on “Worker1 – Units” and “Worker2 – Units.” Both of these statistics need to be minimized. To minimize the number of workers, click on the line in the objective function that needs modification. Select the Min (minimize) radio button and select the Update button, as show below.

setting the response statistics for resource optimization

Do the same for Worker2.

Select the Parameters to Adjust

Now that the “Target” has been identified, set the range for which scenario parameters are allowed to change. All scenario parameters defined in your model are displayed in SimRunner as Macros. In this article, macros will consistently be referred to as Scenario Parameters. SimRunner will use these scenario parameters to improve the value of your objective function.

The reason for setting the range is twofold: first, by limiting the range, the number of experiments is reduced allowing the targeting system to find a result faster; second, the system being optimized may have physical limitations that cannot be exceeded. An example physical limitation would be space constraints for the number of machines. The physical layout may restrict the number of machines to three. To allow the number of machines to vary from 1 to 5 would be useless unless building changes were going to be allowed as part of the project. In the more conservative case, the range of the changes would be restricted from 1 to 3.

Select the Define Inputs button and select the Scenario Parameter (Macros) to be adjusted in this optimization.

adding macros to simrunner for process optimization

Select each Scenario Parameter in turn (in the Macros Selected as Input Factors field) and set a Lower Bound and Upper Bound then select the Update button.

setting resource quantity in simrunner for process improvementWorker1; Lower Bound: 1 – Upper Bound: 4
Worker2; Lower Bound 7 – Upper Bound: 10 

Set the bounds as shown above.

There are a lot of capabilities that won’t be covered in this tutorial. As a matter of fact the whole area dealing pre-analysis of the model to determine the warm-up length and number of replications are discussed in out Basics II Training Class.

Process Improvement Certification

This certification is a three-day Basics 1 Training Class focused on process improvement. It equips you with the crucial skills and understanding necessary to swiftly realize a substantial return on investment for your business by utilizing the full capabilities of ProcessModel’s advanced simulation and business improvement tools. You’ll gain practical experience through hands-on exercises that build upon the knowledge you gain.

Optimize

With a few final settings the optimizer is ready to run. Select the Optimize button off of the top toolbar.

choosing the optimization settings for simrunner

Optimization ProfileSimRunner provides three optimization profiles: Aggressive, Moderate, and Cautious. The optimization profile is a reflection of the number of possible solutions SimRunner will examine. For example, the cautious profile tells SimRunner to consider the highest number of possible solutions—to cautiously and more thoroughly conduct its search for the optimum. As you move from aggressive to cautious, you will most often get better results because SimRunner examines more results—but not always. Depending on the difficulty of the problem you are trying to solve, you may get solutions that are equally good. If you are pressed for time or use relatively few input factors, a more aggressive approach—the aggressive profile—may be appropriate

Convergence Percentage — With every experiment, SimRunner tracks the objective function’s value for each solution. By recording the best and the average results produced, SimRunner is able to monitor the progress of the algorithm. Once the best and the aver-age are at or near the same value, the results converge and the optimization stops. The convergence percentage controls how close the best and the average must be to each other before the optimization stops. A high percentage value will stop the search early, while a very small percentage value will run the optimization until the points converge. What more is there to learn? The remaining options are very self explanatory.

The next step is to hit the Optimize button and then the Run button.

optimizing using simrunner

SimRunner tries to maximize the objective function. It just so happens that this model found the best results on experiment number 1. That won’t happen often. We had a simple problem with a limited number of experiments and the algorithm guessed correctly. In this simple example it is easy to see how the objective function was reached. The objective function was given 108 points (one for each entity that exited the model) and lost a point for each of the workers (minus 3 for Worker and 9 for Worker2), leaving the final objective function at 96. Note that experiment number 8 had the same number of Items processed, but lost one additional point because of having an additional worker.

objective function achieved for process optimization using simrunner

Plug Optimization Values into the Model

The optimization should not be the final run of the model. Take the time to try the results in the simulation model, turn on the animation and watch the simulation run. This provides additional assurance that the model is working correctly with the new values. It also provides an opportunity to identify other areas for improvement not included in the objective function.

SimRunner intelligently and reliably seeks the optimal solution to your problem based on the feedback from your simulation model by applying some of the most advanced search techniques available today.

The SimRunner optimization method is based upon Evolutionary Algorithms. Evolutionary Algorithms are a class of direct search techniques based on concepts from the theory of evolution. The algorithms mimic the underlying evolutionary process in that entities adapt to their environment in order to survive. Evolutionary Algorithms manipulate a population of solutions to a problem in such a way that poor solutions fade away and good solutions continually evolve in their search for the optimum. Search techniques based on this concept have proven to be very robust and have solved a wide variety of difficult problems. They are extremely useful because they provide you with not only a single, optimized solution, but with many good alternatives.

Process Improvement Basics 2 Certification

ProcessModel Basics 2 Training builds on the skills learned in Basics 1. You will continue your business development training by learning critical skills needed to optimize your processes, become proficient at modeling the really tough problems. learn how optimize your model and help you find the best combination of solutions to maximize your entire system, combine constructs to shorten the time to model and increase results.