OptEngineInfo(engine, item, asRef)
The OptEngineInfo function provides information about a specific optimizer engine, or about the solver engines that are currently installed and ready for use.
«Engine» is the name of a solver engine. The following are included with Analytica:
- "SOCP Barrier"
- "GRG Nonlinear"
Various add-on engines can be purchased separately. These include:
«Item» may be from this table:
«Item» Dimensionality Type Description
List numeric Array of control setting names.
Local .Parameter numeric upper bounds for setting
Local .Parameter numeric lower bounds for setting
Local .Parameter numeric default value for setting
atomic text The engine name (null without error if engine not installed)
atomic text File path to solver engine's DLL, "" for bulit-in engines.
atomic numeric number of days until Frontline solver trial license expires
Local .ProblemType boolean A list of the problem types handled by each engine
Local .ProblemType numeric Maximum number of decision variables supported by engine
Local .ProblemType numeric Maximum number of integer variables supported by engine
Local .ProblemType numeric Maximum number of constraints supported by engine
Local .ProblemType numeric Maximum number of variable bounds supported by engine
atomic numeric Time spent in computation.
atomic numeric # of iterations engine has performed
atomic numeric # of function evaluations that have occurred
atomic numeric # of jacobians evaluations that have occurred
atomic numeric # of hessians evaluations that have occurred
All Available Engines
The special usage:
returns an unindexed list of all solver engine names present on the computer.
When you use "All" with an item specified, then that item information is returned for all engines. The result is indexed by a local index named
.Engine. For example, to get the DLL location for all add-on engines, use:
note: for the four standard built-in engines, the DLL evaluates to the empty text value, "". For add-on engines, this a non-empty file path. For mal-configured add-on engines, Null is returned.
Getting the result as a Reference
When the optional parameter, «asRef», is specified as
True a reference to the requested value is returned. This is useful when you are requesting multiple items with different dimensionalities at the same time, or when requesting one of the items indexed by .Parameter for multiple engines at the same time. If you don't use
asRef: True in these cases, the dimensions will be combined, which may not be desired.
To illustrate, consider an example:
OptEngineInfo("LP/Quadratic", ["MaxSetting", "MaxVars"])
OptEngineInfo("LP/Quadratic","MaxSetting") is indexed by
OptEngineInfo("LP/Quadratic","MaxVars") is indexed by
.ProblemType. The result of the above expression will thus be a 3-D array indexed by both
.ProblemType, as well as by the implicit index
["MaxSetting", "MaxVars"]. When you examine just the
MaxSetting slice, there is an extra index
.ProblemType that has nothing to do with the
The use of references avoids this undesired combination of dimensions. When the above is replaced by:
OptEngineInfo("LP/Quadratic", ["MaxSetting", "MaxVars"], asRef: true)
It is recommended that you use references when obtaining the parameter settings for multiple engines, since it is possible for different engines to have a different set of parameters. When the parameter sets are identical for all engines, then the same index will be used. But this is not guaranteed as some parameters are unique to specific engines, and in that case you could end up with multiple .Parameter indexes in the same array. Hence, you should use, e.g.:
OptEngineInfo("All", "Defaults", asRef: True)
OptEngineInfo("All", "ProblemTypes") →
OptEngineInfo("Evolutionary", ["MaxSetting", "Default", "MinSetting"]) →