Optimization Settings
The Optimization Settings dialog contains options that control the optimization process.
Runtime Tab
Figure 1 - Optimization Settings Runtime Tab
The Runtime tab (Figure 1, right) contains settings that control how and when RISKOptimizer will stop a standard optimization; Efficient Frontier optimizations are controlled by the Efficient Frontier Runtime Tab (see below).
Once an optimization is started, RISKOptimizer will continue to run, searching for better solutions and running simulations until any one of the selected stopping criteria is met. Any number of these conditions can be set, or none at all; if no stopping conditions are indicated, RISKOptimizer will run until all possible solutions have been tried, or until it is stopped manually by pressing the Stop button in the Progress Window or Watcher Window.
The Runtime tab contains the following configurations:
- Standard Optimization - Settings for a standard, non-Efficient Frontier analysis.
-
- Trials – When this option is set, RISKOptimizer stops when the given number of trial simulations have been performed.
- Time – When this option is set, RISKOptimizer stops after the given number of hours, minutes, or seconds have elapsed.
- Progress - When this option is set, RISKOptimizer will stop simulating scenarios when the improvement in the objective is less than the specified amount.
-
- Maximum Change – Defines the most change that can occur and still trigger the stopping condition. This value can be a percentage of the target or an actual value.
- Number of Trials – Specifies how often RISKOptimizer will check, at equal intervals, for improvement between intervals.
-
Example: suppose the objective is to maximize the mean of a target cell and the Progress stopping condition is defined with Maximum Change set to 0.1 and Number of Trials set to 100. If after 500 trial simulations, the best value of the target found is 354.8, at trial 600, RISKOptimizer will continue only if it finds an objective value of at least 354.9 during those last 100 simulations. In other words, the target value has not improved at least 0.1 over the last 100 simulations, so RISKOptimizer assumes there is little more improvement to be found, and stops the search.
This is a popular stopping condition, because it provides an effective way to stop RISKOptimizer after the improvement rate is slowing down and better solutions are not being found.
- Formula is True – When this option is set, RISKOptimizer stops whenever the specified Excel formula or cell reference evaluates to TRUE.
- Stop on Error – When this option is set, it causes the optimization to stop whenever an error value is calculated for the target cell.
- Efficient Frontier Optimization - Contains settings that control how and when RISKOptimizer will stop an Efficient Frontier optimization.
-
- Trials per Constraining Value – When this option is set, it causes RISKOptimizer to stop after the specified number of trials has been run for each possible constraining value. For example, If this field is set to 250, and the Efficient Frontier analysis is defined by specifying 5 alternative values in a constraint, the Efficient Frontier analysis will stop after 1250 simulations (5 x 250 simulations).
- Time - When this option is set, RISKOptimizer stops simulating scenarios after the given number of hours, minutes, or seconds has elapsed.
- Progress - When set, stops RISKOptimizer from simulating scenarios when the improvement in the objective is less than the specified amount for each one of the multiple parallel optimizations.
-
- Maximum Change – Defines the most change that can occur and still trigger the stopping condition. If can be a percentage of the target objective or an actual value.
- Number of Trials – Specifies how often RISKOptimizer will check, at equal intervals, for improvement between intervals.
-
Example: Suppose the objective is to maximize the mean of a target cell and the Progress stopping condition is defined with Maximum Change set to 0.1 and Number of Trials set to 100. If after 500 trial simulations performed for one of the alternative constraining values, the best value of the target found is 354.8, at trial 600, RISKOptimizer will continue only if it finds an objective value of at least 354.9 during those last 100 simulations. If it cannot, then this particular optimization (among the parallel optimizations) has not made enough progress. If none of the parallel optimizations has made enough progress, the Efficient Frontier run will stop.
Advanced Tab
Figure 2 - Optimization Settings Advanced Tab
The Advanced tab (Figure 3, right) contains options to control how multiple CPUs are used during optimatization, as well as for specifying macros that run as part of an optimization and the selection of the optimization engine.
- Multiple CPUs
-
-
Please note: When running an optimization, these settings override the similar set of configurations associated with simulations in the Simulation Setting dialog.
- Use Multiple CPUs During Optimization – When checked, indicate that multiple CPUs should be used to perform the optimization. Because stochastic optimization is generally very computationally expensive, this option is on by default.
- Number of CPUs – Specifies the number of CPUs that should be utilized. The default of 'Automatic' leaves the number of CPUs under the control of @RISK.
-
- Run an Excel Macro - VBA macros can be run at different times during an optimization and during the simulation run for each trial solution.
-
-
Please note: Optimization macros are specified in these settings. Simulation macros are specified in Simulation Settings.
Macros may not work correctly for Multiple CPUs optimizations; the code will make simultaneous calls to the defined macros.
- At the Start of the Optimization - The macro runs after the optimization is started, prior to the first trial solution being generated.
- After Storing Output - The macro runs after each trial simulation is completed and after the statistic that is being optimized for the target cell's distribution is calculated and stored.
- At the End of the Optimization - The macro runs when the optimization is completed.
-
- Engine - Contains settings that control the optimization algorithms used by RISKOptimizer.
-
- Optimization Engine – In most cases, RISKOptimizer can automatically detect which engine and settings will give the best and fastest solutions to a model; the 'Automatic' setting specifies this. However, there might be times where control of the optimization engine is desirable. There are two engines available:
-
- OptQuest - uses metaheuristic, mathematical optimization, and neural network components to guide the search for best solutions to decision and planning problems of all types. OptQuest’s methods integrate state-of-the-art metaheuristic procedures, including Tabu Search, Neural Networks, Scatter Search, and Linear/Integer Programming, into a single composite method.
- Genetic Algorithm – This engine originated in Evolver, Palisade’s optimizer for deterministic models, and was the only engine available in early versions of RISKOptimizer. The Genetic Algorithm engine mimics Darwinian principles of natural selection by creating an environment where hundreds of possible solutions to a problem can compete with one another, and only the fittest survive. Just as in biological evolution, each solution can pass along its good “genes” through “offspring” solutions so that the entire population of solutions will continue to evolve better solutions.
-
The Genetic Algorithm engine contains three additional options that control how the “organisms” (the genetic algorithm term for a complete set of trial solution variables) interact and change from generation to generation of the optimization process.
-
- Population Size – Controls how many “organisms” to store in memory at any given time. Although there is still much debate and research regarding the optimal population size to use on different problems, the general recommendation is to use a population size of 30-100, depending on the size of the problem (bigger population for larger problems). The common view is that a larger population takes longer to settle on a solution but is more likely to find a global solution because of its more diverse gene pool.
- Crossover Rate – A number between 0 and 1 that controls the likelihood that new “organisms” will contain a mix of information from the previous generation of parent organisms. A rate of 0.5 means that an offspring organism will contain roughly 50% of its variable values from one parent and the remaining values from the other parent. A rate of 0.9 means that roughly 90% of an offspring organism’s values will come from the first parent and 10% will come from the second parent.
- Mutation Rate – A number between 0 and 1 that controls the likelihood that future scenarios will contain some random changes. A higher mutation rate means that more mutations, or random values, will be introduced into the population.