**Chapter 9 – Optimization**

See Optimizing Models Using SimRunner video tutorial.

**9.1 – What is SimRunner?**

SimRunner is a decision support tool used to help optimize simulated processes. SimRunner takes your existing ProcessModel models, evaluates them* for you*, then performs tests to find better ways to achieve the results you desire.

Typically, most people use simulation tools to predict and improve system performance or to establish the relationships between various system elements. By modeling the actual facility or process, you can conduct *what-if* analyses to determine the best way to improve system performance—this is optimization. Although SimRunner cannot guarantee it will identify *the* optimal solution for all processes every time, it will find better solutions than you would likely get on your own.

With each optimization project, SimRunner runs sophisticated optimization algorithms on your model to help you optimize multiple factors simultaneously. Each project requires a validated model, a standard by which to measure system performance (an objective function), and a group of factors that SimRunner may change to improve system performance.

**9.1.1 – Benefits**

Simulation allows you to find solutions to complex problems without incurring the tremendous costs associated with a trial and error approach. Optimization helps ensure that the solutions you implement are at or near their optimal values.

Unlike manual simulation experimentation which answers only specific what-if questions, SimRunner automatically seeks a *course of action* that will help optimize your entire system’s performance—essentially answering *how* to meet your objectives.

To help you present your findings, SimRunner allows you to output various types of reports:

• **Data reports** (for spreadsheets)

• **Analysis reports** (for text and word processing reports)

• **Graphical reports** (for charts and graphs)

You can print each of these reports or export them to other applications through common clipboard functions.

**9.2 – Where Do I Begin?**

**Start with a validated model**

Once you complete and validate your simulation model, you are ready to begin an optimization project. If you are not working with a valid model, you don’t need to perform an optimization until the output from the simulation is valid.

**Identify your simulation type**

It is important to properly identify the simulation type—terminating or nonterminating. What does it mean to refer to a simulation as terminating or nonterminating? A terminating system stops when some key event occurs like the end of the day. When you come back the next day, you start fresh again. A non-terminating system is not necessarily a system that never stops production, rather it is a system that resumes from the point it left off. For both terminating and nonterminating simulations, you need to determine the appropriate run length and number of replications. For non-terminating simulations it is also necessary to determine the warm-up period.

**Determine if model is a true candidate for optimization**

Not every simulation model is built with the express purpose of optimizing some particular element. Many simulation models are built to demonstrate the relationships that exist between various elements of your system. If optimization is appropriate, define the objective function—the output statistics used to measure the performance of proposed solutions.

**Use simulation to identify and examine potential solutions**

Simulation has always been trial and error when it comes to optimization. We have some sort of optimization method that we apply to the model and we examine the model’s output statistics to see if we achieved the desired outcome. This is not a bad approach if you have *one* decision variable you are trying to optimize—but what if you are trying to optimize *multiple* decision variables at once? Interaction becomes very complex and requires more advanced optimization methods like SimRunner.

**Define scenario parameters**

When you build your model, you must define a scenario parameter for any variable you want to optimize. This provides SimRunner with a series of values it can change as it seeks to optimize your model. In SimRunner, these values are called factors. For information on how to add and modify Scenario Parameters see Chapter 3, Section 3.13.1, Scenario Parameters.

**Screen factors**

Part of the simulation process is to evaluate the relationships that exist between model elements, or factors. Often, you will take the time to adjust some part of your model to find that the adjustment has no impact on system performance. Factor screening is the process of identifying which model elements (factors) do not affect the output of your model, and narrowing your search to include only those factors that affect the model’s output. Be discriminant in your selections.

**Relax and wait**

While some models contain relatively few factors that you can quickly optimize, others contain many. In a previous inventory reduction project, a high-end computer took approximately 24 hours to compute what it estimated to be the optimal value for the model. Although it took a long time to produce this result, the net savings were tremendous.

**Consider the results**

While there is no promise that SimRunner will identify *the* optimal solution to your process, it is possible. SimRunner will, however, find better solutions than you would likely get with your own trial and error experimentation. The surest way to know *the* optimal solution to any model is to run an infinite number of replications of all possible inputs. Since this is not an option, take into consideration the number of experiments you are able to perform and act accordingly.

**9.2.1 – Concepts and Theories**

SimRunner uses both *genetic* and *evolution strategies* algorithms with its primary algorithm being evolution strategies. The specific design of these algorithms for SimRunner is based on the work of Dr. Royce Bowden and other experts. Evolutionary algorithms have been extensively evaluated by academics and have proved reliable in optimizing simulated systems.

**Evolutionary algorithms**

An evolutionary algorithm is a numerical optimization technique based on simulated evolution. Solutions generated from the evolutionary algorithm must adapt to their environment in order to survive. Since each potential solution returns a specific result, you must establish an objective function to measure the performance of each solution. If the returned value falls within the acceptable range defined by the objective function, SimRunner will continue to examine the value as it searches for the optimal solution.

**Example**

To help you better understand how SimRunner’s optimization process works, consider the following analogy. If you and a group of explorers found yourselves on the slopes of a mountain, in the dark, with nothing but radios and altimeters, how would you find the summit?

The first step would be to establish the current altitude of everyone in your group by recording each person’s altimeter reading.

Next, you would direct your group members to wander out in any direction for various distances, then stop and review their new altimeter readings. At the second reading, you find that some of your group has moved higher and some have moved lower.

By comparing the results of each altimeter reading, you can determine the general direction in which to proceed. Since you want to climb to the summit, you proceed in the general direction that had the highest reading (in this case, 2). Again, after everyone moves various distances, you stop to take another altimeter reading.

By taking the average of the group’s new altimeter readings, you can see that the overall reading increased. This confirms that you are moving in the right direction. Just to be sure, you repeat the process and take another reading.

As you will notice from the example, your group is beginning to converge upon a single point. The more you repeat the data collection process, the closer the group will get to one another, and the more certain you will be that you are at or near the summit. Just to be on the safe side, however, you even send a few members of your group out to remote parts of the terrain to be sure that there is nothing higher than the point you already identified.

Once your average altimeter reading is equal to the best in your group, you have converged upon the summit and can be confident that you have achieved your goal.

Conceptually, this is how SimRunner works—only the terminology is different. Instead of altimeters, explorers, and tests, you will use objective functions, input factors, and replications. Each time the explorers move, SimRunner calls this a generation. The concepts are the same.

**Not an exhaustive search**

In spite of what some may think, you don’t want an algorithm that will do an exhaustive search. In a previous inventory reduction project, modelers estimated the number of possible solutions to be around 9.38 x 10^37 —it