Home → Techniques and Tips → Evolver and RISKOptimizer → For Faster Optimizations
Disponible en español: Para optimizaciones más rápidas
Applies to:
@RISK 5.x–7.x, Industrial Edition
Evolver 4.x–7.x
RISKOptimizer 1.x
RISKOptimizer Developer's Kit (RODK) 4.1
Evolver Developer's Kit (EDK) 4.1
My optimization seems to take a long time to execute. Is there anything I can do to speed it up?
Here is our checklist. (The OptQuest engine mentioned in some of these hints is available in @RISK Industrial 6.0 and newer, and Evolver 6.0 and newer.)
If you have an older release of Evolver or RISKOptimizer, upgrade to the current release. The optimization engine in 6.x is significantly faster than earlier releases, even more so for linear problems, and 7.x is faster still.
Choose the most appropriate solving method, and limit the adjustable cells to as small a range as possible. This improves the proportion of valid (feasible) trials to invalid trials. For instance, if you have numbers 1 to 20 to assign in an optimal way to 20 cells, don't choose Recipe and try to set constraints that weed out duplicate assignments. Instead, choose Order and the duplicates will never be generated in the first place.
Set hard constraints where hard constraints are appropriate. Advice is sometimes given to users of evolutionary solvers to replace hard constraints with soft constraints and a penalty function, but Evolver and RISKOptimizer do just fine with hard constraints. Their OptQuest engine and Genetic Algorithm handle hard constraints intelligently, using methods that quickly find solutions that meet the hard constraints. (The Genetic Algorithm uses the method of "backtracking"; it is explained in the software manuals.)
Make constraints linear if you can. If all constraints are linear, the OptQuest engine (available beginning with release 5.0) can avoid generating solutions that violate constraints, so all trials will be valid trials. Eliminating these invalid trials can make some optimizations reach a solution much faster. And if you select = in your constraint, using the OptQuest engine, only a linear constraint will find valid trials within any reasonable time period.
Hint: MAX and MIN are not linear functions. Instead of constraining the maximum or minimum of a cell range to be less or greater than a certain amount, constrain the cell range directly.
For adjustable cells, use discrete or integer rather than "any", if you can. When adjustable cells are discrete, the OptQuest engine may be able to enumerate them, thus generating only valid trials. (See Defining Decision Variables, accessed 2015-07-22.)
If you use the Genetic engine (optional in 6.x/7.x, standard in 1.x–5.x), start with a feasible solution, meaning a state in which all the constraints are met. If you start off with some constraints violated, the software's genetic algorithm must take time to find a feasible solution as a base for the optimization. If your model is complicated and you need help getting to an initial feasible solution, please see Debugging RISKOptimizer and Evolver Models.
Optimize on a continuous value that conveys meaningful information. The idea is that small changes in the adjustable cells should make small changes in the target value. Sometimes a customer model is essentially binary: the target cell is essentially a yes/no. It is always better to use a target cell that is a continuous number, so that the optimizer can tell when it is making progress. If your target cell is a 1/0, all infeasible solutions are equally bad and the optimizer has no way to choose one over another. Use constraints, not the target cell, to rule out unacceptable solutions.
Constrain on a continuous value when that is natural in the model. Suppose you need cell C5 to be no more than 120. Set your constraint as C5<=120. Sometimes people try to "help" an optimizer by putting the formula =IF(C5<=120,1,0) in a separate cell and constraining that cell to equal 1. But doing that deprives the algorithms of the information about how far or how close the constraint is to being met. When you use the real constraint, C5<=120, the algorithm can determine that a solution with C5=150 is better than one with C5=200.
If you have Excel 2007 or later, enable multi-threaded calculations. In Excel 2010–2016, File » Options » Advanced » Formulas » Enable multi-threaded calculations. In Excel 2007, click the round Office button and then Excel Options » Advanced » Formulas » Enable multi-threaded calculations.
Use the optimization stopping conditions on the RISKOptimizer or Evolver options screen. Sometimes the last little bit of convergence isn't needed or provides little improvement, but accounts for a large chunk of the optimization time (the 80-20 rule).
In RISKOptimizer, set the separate simulation stopping conditions in addition to the optimization stopping conditions. In RISKOptimizer 6.x/7.x, the simulation stopping conditions are on the Convergence tab of the @RISK Simulation Settings dialog; in RISKOptimizer 1.x and 5.x they are on the RISKOptimizer Options screen.
With RISKOptimizer, you can do some things to speed up the simulation portion of the optimization. Generally, good advice for @RISK is good advice for the simulation part of RISKOptimizer. Please see For Faster Simulations.
With RISKOptimizer, if you don't have any @RISK distribution functions in your model, set the number of iterations to 1, or use Evolver if you have it. For more information, please see Running RISKOptimizer Deterministically.
RISKOptimizer 7.5.0 and newer will split the optimization among multiple CPUs (cores). Look at the General tab of Simulation settings to be sure that multiple CPU is set to Automatic, or to Enabled. If this computer has only a few cores, try the optimization in a more powerful machine, with more cores and plenty of RAM.
Last edited: 2020-07-28