Difference between revisions of "Selecting the Optimization Engine"

Line 5: Line 5:
 
* '''LP/Quadratic''' - uses a dual simplex method combined with branch-and bound for mixed-integer constraints, with a variety of integer cut-set procedures. This is generally the engine of choice for LPs and mixed-integer LPs. For hard mixed-integer LPs, however, the Evolutionary engine uses a very different approach and might be worth trying.
 
* '''LP/Quadratic''' - uses a dual simplex method combined with branch-and bound for mixed-integer constraints, with a variety of integer cut-set procedures. This is generally the engine of choice for LPs and mixed-integer LPs. For hard mixed-integer LPs, however, the Evolutionary engine uses a very different approach and might be worth trying.
  
* '''SOCP Barrier''' - uses interior point methods designed specifically for quadratically constrained convex problems. The GRG Nonlinear engine is often a good alternative for thi type of problem, especially if the constraints end up being non-convex.
+
* '''SOCP Barrier''' - uses interior point methods designed specifically for quadratically constrained convex problems. The GRG Nonlinear engine is often a good alternative for the type of problem, especially if the constraints end up being non-convex.
  
 
* '''GRG Nonlinea'''r - The Generalized Reduced Gradient solver is suitable for smooth non-linear problems. If gradients and Jacobians can be analytically determined, the speed of this method will be dramatically faster.
 
* '''GRG Nonlinea'''r - The Generalized Reduced Gradient solver is suitable for smooth non-linear problems. If gradients and Jacobians can be analytically determined, the speed of this method will be dramatically faster.
Line 13: Line 13:
  
 
The following matrix shows engine compatibility for each problem type:
 
The following matrix shows engine compatibility for each problem type:
{| class="wikitable" cellpadding="2"
+
:{| class="wikitable"
 
|-
 
|-
 
! width="100pt" |  
 
! width="100pt" |  
Line 39: Line 39:
 
|Quadratically Constrained Program
 
|Quadratically Constrained Program
 
|
 
|
|*<ref>You may not know whether your QCP is convex when you formulate it, and [[DefineOptimization]]’s quadratic analysis does not determine convexity. Testing for convexity can be more computationally intensive than solving the problem, so if you think SOCP Barrier is the preferred engine, you can attempt to solve it using SOCP Barrier. During the solution, it may succeed, or it may detect the non-convexity and terminate without a feasible solution. Always check '''OptStatusText'''().</ref>
+
|*<ref>You may not know whether your QCP is convex when you formulate it, and [[DefineOptimization]]’s quadratic analysis does not determine convexity. Testing for convexity can be more computationally intensive than solving the problem, so if you think SOCP Barrier is the preferred engine, you can attempt to solve it using SOCP Barrier. During the solution, it may succeed, or it may detect the non-convexity and terminate without a feasible solution. Always check [[OptStatusText]]().</ref>
 
|*
 
|*
 
|*
 
|*
Line 73: Line 73:
  
 
If you have purchased other add-on engines, other options might also be available to you. You can obtain a full list of installed engines and the problem types supported by each by evaluating the following Analytica expression.
 
If you have purchased other add-on engines, other options might also be available to you. You can obtain a full list of installed engines and the problem types supported by each by evaluating the following Analytica expression.
<nowiki>  OptEngineInfo("All","ProblemTypes")</nowiki>
+
:<code>  OptEngineInfo("All", "ProblemTypes")</code>
To explicitly select the engine to be used, include the <code>Engine</code> parameter to [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization]().
+
 
<nowiki>  Engine : Optional Text</nowiki>
+
To explicitly select the engine to be used, include the <code>Engine</code> parameter to [[DefineOptimization]].
 +
:<code>  Engine : Optional Text</code>
 +
 
 
For example:
 
For example:
<nowiki>  DefineOptimization( ..., Engine: "Evolutionary" )</nowiki>
+
:<code>  DefineOptimization(..., Engine: "Evolutionary")</code>
 +
 
 
If you do not specify the engine, Analytica selects an appropriate engine based on the properties of the problem that you specified. However, if the engine does not perform satisfactorily on that problem, you might obtain better results with a different engine.  
 
If you do not specify the engine, Analytica selects an appropriate engine based on the properties of the problem that you specified. However, if the engine does not perform satisfactorily on that problem, you might obtain better results with a different engine.  
  
 
To determine what engine is actually used on a problem, evaluate this Analytica expression.  
 
To determine what engine is actually used on a problem, evaluate this Analytica expression.  
<nowiki>  OptInfo(Opt, "Engine")</nowiki>
+
:<code>  OptInfo(Opt, "Engine")</code>
Where <code>Opt</code> is the object returned by [http://wiki.analytica.com/index.php?title=DefineOptimization DefineOptimization]().
+
 
 +
where <code>Opt</code> is the object returned by [[DefineOptimization]]().
  
 
==See Also==
 
==See Also==
Line 88: Line 92:
 
* [[OptInfo]]
 
* [[OptInfo]]
 
* [[OptEngineInfo]]
 
* [[OptEngineInfo]]
 +
* [[OptStatusText]]
 
* [[Using a Solver Add-on Engine]]
 
* [[Using a Solver Add-on Engine]]
 
* [[Using SetContext to efficiently solve NLPs]]
 
* [[Using SetContext to efficiently solve NLPs]]

Revision as of 21:11, 24 March 2016


Four optimization engines come standard with Analytica Optimizer:

  • LP/Quadratic - uses a dual simplex method combined with branch-and bound for mixed-integer constraints, with a variety of integer cut-set procedures. This is generally the engine of choice for LPs and mixed-integer LPs. For hard mixed-integer LPs, however, the Evolutionary engine uses a very different approach and might be worth trying.
  • SOCP Barrier - uses interior point methods designed specifically for quadratically constrained convex problems. The GRG Nonlinear engine is often a good alternative for the type of problem, especially if the constraints end up being non-convex.
  • GRG Nonlinear - The Generalized Reduced Gradient solver is suitable for smooth non-linear problems. If gradients and Jacobians can be analytically determined, the speed of this method will be dramatically faster.
  • Evolutionary - Best suited for non-smooth problems the evolutionary engine creates a population of potential solutions and keeps the best ones.. By default, the Evolutionary engine does not use gradient information. However, if the LocalSearch setting is on, then it optimizes sample points before adding them to the population using various techniques including gradient-based search.


The following matrix shows engine compatibility for each problem type:

LP/Quadratic SOCP Barrier GRG Nonlinear Evolutionary
LP Linear Program * * * *
QP Quadratic Program (linearly constrained) * * * *
QCP Quadratically Constrained Program *[1] * *
CQCP Convex QCP * * *
NCQCP Non-Convex QCP * *
NLP Non-Linear Program (smooth) * *
NSP Non-Smooth Program * *

If you have purchased other add-on engines, other options might also be available to you. You can obtain a full list of installed engines and the problem types supported by each by evaluating the following Analytica expression.

OptEngineInfo("All", "ProblemTypes")

To explicitly select the engine to be used, include the Engine parameter to DefineOptimization.

Engine : Optional Text

For example:

DefineOptimization(..., Engine: "Evolutionary")

If you do not specify the engine, Analytica selects an appropriate engine based on the properties of the problem that you specified. However, if the engine does not perform satisfactorily on that problem, you might obtain better results with a different engine.

To determine what engine is actually used on a problem, evaluate this Analytica expression.

OptInfo(Opt, "Engine")

where Opt is the object returned by DefineOptimization().

See Also


  1. You may not know whether your QCP is convex when you formulate it, and DefineOptimization’s quadratic analysis does not determine convexity. Testing for convexity can be more computationally intensive than solving the problem, so if you think SOCP Barrier is the preferred engine, you can attempt to solve it using SOCP Barrier. During the solution, it may succeed, or it may detect the non-convexity and terminate without a feasible solution. Always check OptStatusText().
Comments


You are not allowed to post comments.