Difference between revisions of "Using a Solver Add-on Engine"

 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
With Analytica Optimizer 4.0, it is possible to add-in any external optimizer engine that is supported by Frontline solver.  On different optimization problems, some engines may outperform others.  These engines can be purchased directly from Frontline and added into an existing Analyica Optimizer license.  Alternatively, Lumina may act as a reseller.
+
[[Category: Optimization]]
  
= Available External Engines =
+
== Available External Engines ==
 +
With Analytica Optimizer, it is possible to add-in any external optimizer engine that is supported by [http://www.solver.com/ Frontline solver].  On different optimization problems, some engines may outperform others.
  
The prices shown are approximate prices charged by Frontline for each engine license, not including annual support charge. See [[http://www.solver.com/pricesdk.php |Solver Pricing]] for more details.
+
Add-on engines available for [[Analytica Optimizer Guide|Analytica Optimizer]] are listed below. See [http://www.lumina.com/products/analytica-optimizer/more-powerful-solver-engines/ Powerful Solver Engines available for Optimizer] for pricing info.
  
* Xpress LP/MIP only ( ~$6K)
+
:{| class="wikitable"
* Xpress LP/QP/MIP  ( ~$8K)
+
!Solver Engines
* Knitro (NLP)      ( ~$4K)
+
!Problems Solved
* Mosek SOCP        ( ~$4K)
+
|-
* Mosek SOCP/NLP     ( ~$5K)
+
|Ext. Large Scale LP Solver||LP
* OptQuest           ( ~$2.5K)
+
|-
 +
|Large Scale SQP Solver || QP, Global
 +
|-
 +
|Ext. Large Scale GRG Solver || NLP, Global
 +
|-
 +
|Gurobi Solver Engine || LP, QP
 +
|-
 +
|XPRESS Solver Engine || LP, QP
 +
|-
 +
|MOSEK Solver || cQCP, NLP
 +
|-
 +
|KNITRO Solver || NLP, Global
 +
|-
 +
|OptQuest Solver (32-bit only) || Global
 +
|}
  
= Licensing for Analytica and Excel =
+
== How to install ==
  
Suppose you have a license for Analytica Optimizer 4.0 and a license for Frontline Solver 7.0 for Excel.  If you purchase (in addition) one license for an external engine, such as Knitro, then that single license gives you access to Knitro from both Analytica Optimizer and Excel. [ Note: I am pretty sure this is the case, but we may need to verify with Frontline ]
+
Analytica Optimizer must be installed before an external solver engine can be added in.
  
= How to install =
+
To install a frontline engine for use with Analytica Optimizer, you will need the following items:
 
+
* The <code>EngineSetup.exe</code> or <code>EngineSetup64.exe</code> installer. This installer contains the add-on engines. (all you actually need in the Engine DLL, which you acquire by running the installer).
Analytica Optimizer 4.0 or later must be installed before an external solver engine can be added in.
+
* The EngineSetup installer password and activation key. These are Frontline items.
 
 
To install a frontline engine for use with Analytica Optimizer 4.0, you will need the following items:
 
* The engine add-on installer (or at least the DLL file containing the engine add-on).
 
 
* A full file path to the location where the engine DLL will be installed.
 
* A full file path to the location where the engine DLL will be installed.
 
* The name of the external engine.
 
* The name of the external engine.
* The license for the external engine, provided by Frontline as a Solver.lic file.
+
* The location of your Analytica installation, [ANALYTICADIR], usually <code>"C:\Program Files\Lumina\Analytica 4.5"</code>
* The location of your Analytica installation, [ANALYTICADIR], usually C:\Program Files\Lumina\Analytica 4.0
+
* A Lumina-issued engine license (usually provided as an activation key)
 +
 
 +
''A 15-day trial of all add-on engines is available from [http://solver.com Frontline systems].  Self-register and download <code>EngineSetup.exe</code>.  Although the installer will tell you that Premium Solver must be installed, it doesn't actually have to be, it will let you specify an installation directory where the DLLs will be placed.''
  
 
Steps:
 
Steps:
 +
# Install Analytica Optimizer (if not already installed)
 +
#Run the <code>EngineSetup.exe</code> for Analytica 32-bit, or <code>EngineSetup64.exe</code> for Analytica 64-bit. See [[#Release compatibility|Release compatibility]] to make sure you have the correct  release of the engines for the release of Analytica that you are using.
 +
#Run <code>RegEdit.exe</code>, navigate to:
 +
#:<code>HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/</code>
 +
#Create the subhives:
 +
#:<code>HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/SolverEngines/</code>
 +
#:<code>HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/SolverEngines/v14/</code>
 +
#::(the v14 in the hive should match the Solver release that you are installing)
 +
#Create a string value with the name of your engine (item C above).  Enter the fully qualified file path to your external engine DLL as the value for this key.  The following screen shot shows an example of what your RegEdit may look like when done:
 +
#:[[image:KnitroRegEdit.JPG]]
 +
#Activate the license for the add-on engine.
 +
#:Lumina will provide this in one of two ways. We may provide you with an Analytica Optimizer license that includes the add-on engine (this is the more common). If we have done this, then you have nothing to do in this step. Or, we may provide you with a separate license for just the engine. In that case, you need to activate it to get a <code>*.lic</code> file for your computer.
 +
#:If you need to activate the engine-only license, start Analytica, go to '''Help &rarr; Update License...''' and enter the activation key in the '''License ID''' box. Press the Activate button. After a successful activation, re-select your optimizer license in the '''License ID''' drop-down.
  
1. Copy or install the external engine files. (Note the full path to the DLL file for step 6 below).
+
== Using an External Engine ==
 +
Once an External engine is installed, you select this engine from [[DefineOptimization]] by specifying the optional «engine» parameter, e.g.
 +
:<code>DefineOptimization(... , engine: "Knitro")</code>
  
2. Append the license lines from item D above to the file [ANALYICADIR]\Solver.lic.  You can use a text editor for this.  Be extra careful not to delete any lines already in [ANALYTICADIR]\Solver.lic.
+
You can list the set of engines installed on your system using:
 +
:<code>OptEngineInfo(engine: "All", item: "Name")</code>
  
3. Run RegEdit.exe, navigate to:
+
When solving a particular optimization problem, it may be necessary to specify various parameters to tune the searchSome parameters may be unique to individual solver engines. To access the list of all settings for an engine, use (shown for the Knitro example):
HKLM/Software/Lumina Decision Systems/Analytica/4.0
 
 
 
4. Create the SolverEngines subfolder (if not already present), and inside it, create a string value with the name of your engine (item C above)Enter the fully qualified file path to your external engine DLL as the value for this key.  The following screen shot shows an example of what your RegEdit may look like when done:
 
 
 
[[image:KnitroRegEdit.JPG]]
 
 
 
= Using an External Engine =
 
 
 
Once an External engine is installed, you select this engine from LpDefine, QpDefine or NlpDefine by specifying the optional Engine parameter, e.g.
 
 
 
NlpDefine( ... , Engine: "Knitro" )
 
  
You can list the set of engines installed on your system using:
+
:<code>OptEngineInfo(engine: "Knitro", item: ["Defaults", "MinSetting", "MaxSetting"])</code>
  
  SolverInfo( Item: "AvailEngines" )
+
This returns an array indexed by a local index, <code>.Parameters</code>, also showing the default value and the range of possible parameter values. Normally, you will want to modify only a couple settings from their default value (out of the couple dozen settings typically exposed by each engine).  To modify these, set up an index having the values you intend to modify (this will be a subset of the .Parameters index returned in the previous call), and then set up a table based on this index having the new values.  It is convenient to use a self-indexed table for this, as in the following screen shot:
  
When solving a particular optimization problem, it may be necessary to specify various parameters to tune the search. Some parameters may be unique to individual solver engines. To access the list of all settings for an engine, use (shown for the Knitro example):
+
== Release compatibility ==
 +
Both Lumina and Frontline continuously improve their software and makes new releases available. When a new release of Analytica comes out, it will be compiled with the most recent Frontline Solver SDK available at that time. For example, Analytica 4.4 uses Solver SDK release v11. Hence, if you are using Analytica 4.4, you should install v11 engines. If you install a v14 or a v10 engine, you could encounter subtle incompatibilities (in some cases, it may work, in others not). The table below shows which Solver SDK release each release of Analytica uses. Also, you need this information in order to know which registry hive Analytica is looking at.
  
SolverInfo( Engine: "Knitro", Item: ["Defaults", "MinSetting", "MaxSetting"] )
+
:{| class="wikitable"
 +
!Analytica release(s) !! Solver SDK release
 +
|-
 +
|4.3 || v10
 +
|-
 +
|4.4 || v11
 +
|-
 +
|4.5.1, 4.5.2 || v12
 +
|-
 +
|4.5.3 || v14
 +
|}
  
This returns an array indexed by a local index, .Parameters, also showing the default value and the range of possible parameter values. Normally, you will want to modify only a couple settings from their default value (out of the couple dozen settings typically exposed by each engine). To modify these, set up an index having the values you intend to modify (this will be a subset of the .Parameters index returned in the previous call), and then set up a table based on this index having the new values.  It is convenient to use a self-indexed table for this, as in the following screen shot:
+
==See Also==
 +
* [[Solve]]
 +
* [[OptEngineInfo]]
 +
* [[Selecting the Optimization Engine]]
 +
* [[DefineOptimization]]
 +
* [http://www.solver.com/ Frontline solvers]
 +
* [[Installation and licenses]]
 +
* [[Using SetContext to efficiently solve NLPs]]

Latest revision as of 21:30, 29 March 2016


Available External Engines

With Analytica Optimizer, it is possible to add-in any external optimizer engine that is supported by Frontline solver. On different optimization problems, some engines may outperform others.

Add-on engines available for Analytica Optimizer are listed below. See Powerful Solver Engines available for Optimizer for pricing info.

Solver Engines Problems Solved
Ext. Large Scale LP Solver LP
Large Scale SQP Solver QP, Global
Ext. Large Scale GRG Solver NLP, Global
Gurobi Solver Engine LP, QP
XPRESS Solver Engine LP, QP
MOSEK Solver cQCP, NLP
KNITRO Solver NLP, Global
OptQuest Solver (32-bit only) Global

How to install

Analytica Optimizer must be installed before an external solver engine can be added in.

To install a frontline engine for use with Analytica Optimizer, you will need the following items:

  • The EngineSetup.exe or EngineSetup64.exe installer. This installer contains the add-on engines. (all you actually need in the Engine DLL, which you acquire by running the installer).
  • The EngineSetup installer password and activation key. These are Frontline items.
  • A full file path to the location where the engine DLL will be installed.
  • The name of the external engine.
  • The location of your Analytica installation, [ANALYTICADIR], usually "C:\Program Files\Lumina\Analytica 4.5"
  • A Lumina-issued engine license (usually provided as an activation key)

A 15-day trial of all add-on engines is available from Frontline systems. Self-register and download EngineSetup.exe. Although the installer will tell you that Premium Solver must be installed, it doesn't actually have to be, it will let you specify an installation directory where the DLLs will be placed.

Steps:

  1. Install Analytica Optimizer (if not already installed)
  2. Run the EngineSetup.exe for Analytica 32-bit, or EngineSetup64.exe for Analytica 64-bit. See Release compatibility to make sure you have the correct release of the engines for the release of Analytica that you are using.
  3. Run RegEdit.exe, navigate to:
    HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/
  4. Create the subhives:
    HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/SolverEngines/
    HKEY_LOCAL_MACHINE/Software/Lumina Decision Systems/SolverEngines/v14/
    (the v14 in the hive should match the Solver release that you are installing)
  5. Create a string value with the name of your engine (item C above). Enter the fully qualified file path to your external engine DLL as the value for this key. The following screen shot shows an example of what your RegEdit may look like when done:
    KnitroRegEdit.JPG
  6. Activate the license for the add-on engine.
    Lumina will provide this in one of two ways. We may provide you with an Analytica Optimizer license that includes the add-on engine (this is the more common). If we have done this, then you have nothing to do in this step. Or, we may provide you with a separate license for just the engine. In that case, you need to activate it to get a *.lic file for your computer.
    If you need to activate the engine-only license, start Analytica, go to Help → Update License... and enter the activation key in the License ID box. Press the Activate button. After a successful activation, re-select your optimizer license in the License ID drop-down.

Using an External Engine

Once an External engine is installed, you select this engine from DefineOptimization by specifying the optional «engine» parameter, e.g.

DefineOptimization(... , engine: "Knitro")

You can list the set of engines installed on your system using:

OptEngineInfo(engine: "All", item: "Name")

When solving a particular optimization problem, it may be necessary to specify various parameters to tune the search. Some parameters may be unique to individual solver engines. To access the list of all settings for an engine, use (shown for the Knitro example):

OptEngineInfo(engine: "Knitro", item: ["Defaults", "MinSetting", "MaxSetting"])

This returns an array indexed by a local index, .Parameters, also showing the default value and the range of possible parameter values. Normally, you will want to modify only a couple settings from their default value (out of the couple dozen settings typically exposed by each engine). To modify these, set up an index having the values you intend to modify (this will be a subset of the .Parameters index returned in the previous call), and then set up a table based on this index having the new values. It is convenient to use a self-indexed table for this, as in the following screen shot:

Release compatibility

Both Lumina and Frontline continuously improve their software and makes new releases available. When a new release of Analytica comes out, it will be compiled with the most recent Frontline Solver SDK available at that time. For example, Analytica 4.4 uses Solver SDK release v11. Hence, if you are using Analytica 4.4, you should install v11 engines. If you install a v14 or a v10 engine, you could encounter subtle incompatibilities (in some cases, it may work, in others not). The table below shows which Solver SDK release each release of Analytica uses. Also, you need this information in order to know which registry hive Analytica is looking at.

Analytica release(s) Solver SDK release
4.3 v10
4.4 v11
4.5.1, 4.5.2 v12
4.5.3 v14

See Also

Comments


You are not allowed to post comments.