Difference between revisions of "OptStatusNum"

 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Optimization Functions]]
 
[[Category:Optimization Functions]]
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 
LpStatusNum(lp) returns the status of the search for an optimal solution for a linear, quadratic or non-linear program.  Typically this provides an indication of which conditioned caused the termination of the search.  The result of LpStatusNum is a numeric value, while LpStatusText returns returns equivalent information in English.
 
  
requires Analytica Optimizer.
 
  
Analytica 4.0:  The actual status codes returned have changed between Analytica 3.1 and Analytica 4.0.  For Analytica 4.0, the following (needs to be cleaned up) listing provides a listing of the standard status codes:
+
''Requires Analytica Optimizer.''
  
<pre>
+
== OptStatusNum(opt'', reportIsFeasible'') ==
// Invalid status. Can be returned for API_QQ_RESTART_SOLVE.
+
 
Optimize_Status_Invalid = -3,
+
Returns the status of the search for an optimal solution for a linear, quadratic or non-linear program «opt» created using [[DefineOptimization]].  Typically this provides an indication of which conditioned caused the termination of the search.  The result of [[OptStatusNum]] is a numeric value,  while [[OptStatusText]] returns returns equivalent information in English.
// Ignore status. Used when dummy result code needs to be overridden.
+
 
Optimize_Status_Ignore = -2,
+
When the optional «reportIsFeasible» parameter is not included, returns status codes according to the following table (you can get the English-language text from [[OptStatusText]]:
// Invalid license status. (License expired, missing, invalid, etc.)
+
{| class="wikitable"
Optimize_Status_Lic_Problem = -1,
+
!Status code
// Optimal solution has been found.
+
!Status
Optimize_Status_Optimal = 0,
+
!Comment
// The Solver has converged to the current solution.
+
|-
Optimize_Status_Converged = 1,
+
|<code>'''-3'''</code>
// "No remedies" status. (All remedies failed to find better point.)
+
|<code>Optimize_Status_Invalid</code>
Optimize_Status_No_Remedies = 2,
+
|''Invalid status. Can be returned for API_QQ_RESTART_SOLVE.''
// Iterates limit reached. Indicates an early exit of the algorithm.
+
|-
Optimize_Status_Iterate_Limit = 3,
+
|<code>'''-2'''</code>
// Optimizing an unbounded objective function.
+
|<code>Optimize_Status_Ignore</code>
Optimize_Status_Unbounded = 4,
+
|''Ignore status. Used when dummy result code needs to be overridden.''
// Feasible solution could not be found.
+
|-
Optimize_Status_Unfeasible = 5,
+
|<code>'''-1'''</code>
// Optimization aborted by user. Indicates an early exit of the algorithm.
+
|<code>Optimize_Status_Lic_Problem</code>
Optimize_Status_User_Abort = 6,
+
|''Invalid license status. (License expired, missing, invalid, etc.)''
// Invalid linear model. Returned when a linearity assumption renders incorrect.
+
|-
Optimize_Status_Linear_Invalid = 7,
+
|<code>'''0'''</code>
// Bad data set status. Returned when a problem data set renders inconsistent.  
+
|<code>Optimize_Status_Optimal</code>
Optimize_Status_Bad_Dataset = 8,
+
|''Optimal solution has been found.''
// Float error status. (Internal float error.)
+
|-
Optimize_Status_Float_Err = 9,
+
|<code>'''1'''</code>
// Time out status. Returned when the maximum allowed time has been exceeded. Indicates an early exit of the algorithm.
+
|<code>Optimize_Status_Converged</code>
Optimize_Status_Time_Out = 10,
+
|''The Solver has converged to the current solution.''
// Memory dearth status. Returned when the system cannot allocate enough memory to perform the optimization.
+
|-
Optimize_Status_Memory_Dearth = 11,
+
|<code>'''2'''</code>
// Interpretation error. (Parser, Diagnostics, or Executor error.)
+
|<code>Optimize_Status_No_Remedies</code>
Optimize_Status_Interpret_Err = 12,
+
|''"No remedies" status. (All remedies failed to find better point.)''
// Fatal API error. (API not responding.)
+
|-
Optimize_Status_Api_Err = 13,
+
|<code>'''3'''</code>
// The Solver has found an integer solution within integer tolerance.
+
|<code>Optimize_Status_Iterate_Limit</code>
Optimize_Status_Incumb_Cand = 14,
+
|''Iterates limit reached. Indicates an early exit of the algorithm.''
// Branching and bounding node limit reached. Indicates an early exit of the algorithm.
+
|-
Optimize_Status_Bbnode_Limit = 15,
+
|<code>'''4'''</code>
// Branching and bounding maximum number of incumbent points reached. Indicates an early exit of the algorithm.
+
|<code>Optimize_Status_Unbounded</code>
Optimize_Status_Bbmips_Limit = 16,
+
|''Optimizing an unbounded objective function.''
// Probable global optimum reached. Returned when MSL (Bayesian) global optimality test has been satisfied.
+
|-
Optimize_Status_Probable = 17,
+
|<code>'''5'''</code>
// Missing bounds status. Returned for EV/MSL Require Bounds when bounds are missing.
+
|<code>Optimize_Status_Unfeasible</code>
Optimize_Status_Bounds_Missing = 18,
+
|''Feasible solution could not be found.''
// Bounds conflict status. Indicates <=  = > = bounds conflict with existing binary or alldifferent constraints.
+
|-
Optimize_Status_Bounds_Conflict = 19,
+
|<code>'''6'''</code>
// Bounds inconsistency status. Returned when the lower bound value of a variable is grater than the upper bound value,
+
|<code>Optimize_Status_User_Abort</code>
// i.e. lb[i] > ub[i] for some variable bound i.
+
|''Optimization aborted by user. Indicates an early exit of the algorithm.''
Optimize_Status_Bounds_Inconsist = 20,
+
|-
// Derivative error. Returned when API_Jacobian has not been able to compute gradients.
+
|<code>'''7'''</code>
Optimize_Status_Derivative_Err = 21,
+
|<code>Optimize_Status_Linear_Invalid</code>
// Cone overlap status. Returned when a variable appears in more than one cone.
+
|''Invalid linear model. Returned when a linearity assumption renders incorrect.''
Optimize_Status_Cone_Overlap = 22,
+
|-
// Exception occurred status. Returned when an exception has been caught by try/catch top-level.
+
|<code>'''8'''</code>
Optimize_Status_Exception = 999,
+
|<code>Optimize_Status_Bad_Dataset</code>
// Custom base status. (Base for Solver engine custom results.)
+
|''Bad data set status. Returned when a problem data set renders inconsistent.''
Optimize_Status_Custom_Base = 1000
+
|-
        // The quadratic constraints are non-convex, the SOCP engine cannot solve this problem.
+
|<code>'''9'''</code>
        Quadratic_Constraints_Not_Convex = 1102
+
|<code>Optimize_Status_Float_Err</code>
</pre>
+
|''Float error status. (Internal float error.)''
 +
|-
 +
|<code>'''10'''</code>
 +
|<code>Optimize_Status_Time_Out</code>
 +
|''Time out status. Returned when the maximum allowed time has been exceeded. Indicates an early exit of the algorithm.''
 +
|-
 +
|<code>'''11'''</code>
 +
|<code>Optimize_Status_Memory_Dearth</code>
 +
|''Memory dearth status. Returned when the system cannot allocate enough memory to perform the optimization.''
 +
|-
 +
|<code>'''12'''</code>
 +
|<code>Optimize_Status_Interpret_Err</code>
 +
|''Interpretation error. (Parser, Diagnostics, or Executor error.)''
 +
|-
 +
|<code>'''13'''</code>
 +
|<code>Optimize_Status_Api_Err</code>
 +
|''Fatal API error. (API not responding.)''
 +
|-
 +
|<code>'''14'''</code>
 +
|<code>Optimize_Status_Incumb_Cand</code>
 +
|''The Solver has found an integer solution within integer tolerance.''
 +
|-
 +
|<code>'''15'''</code>
 +
|<code>Optimize_Status_Bbnode_Limit</code>
 +
|''Branching and bounding node limit reached. Indicates an early exit of the algorithm.''
 +
|-
 +
|<code>'''16'''</code>
 +
|<code>Optimize_Status_Bbmips_Limit</code>
 +
|''Branching and bounding maximum number of incumbent points reached. Indicates an early exit of the algorithm.''
 +
|-
 +
|<code>'''17'''</code>
 +
|<code>Optimize_Status_Probable</code>
 +
|''Probable global optimum reached. Returned when MSL (Bayesian) global optimality test has been satisfied.''
 +
|-
 +
|<code>'''18'''</code>
 +
|<code>Optimize_Status_Bounds_Missing</code>
 +
|''Missing bounds status. Returned for EV/MSL Require Bounds when bounds are missing.''
 +
|-
 +
|<code>'''19'''</code>
 +
|<code>Optimize_Status_Bounds_Conflict</code>
 +
|''Bounds conflict status. Indicates <=  = > = bounds conflict with existing binary or all different constraints.''
 +
|-
 +
|<code>'''20'''</code>
 +
|<code>Optimize_Status_Bounds_Inconsist</code>
 +
|''Bounds inconsistency status. Returned when the lower bound value of a variable is grater than the upper bound value, i.e. lb[i] > ub[i] for some variable bound i.''
 +
|-
 +
|<code>'''21'''</code>
 +
|<code>Optimize_Status_Derivative_Err</code>
 +
|''Derivative error. Returned when API_Jacobian has not been able to compute gradients.''
 +
|-
 +
|<code>'''22'''</code>
 +
|<code>Optimize_Status_Cone_Overlap</code>
 +
|''Cone overlap status. Returned when a variable appears in more than one cone.''
 +
|-
 +
|<code>'''999'''</code>
 +
|<code>Optimize_Status_Exception</code>
 +
|''Exception occurred status. Returned when an exception has been caught by try/catch top-level.''
 +
|-
 +
|<code>'''1000'''</code>
 +
|<code>Optimize_Status_Custom_Base</code>
 +
|''Custom base status. (Base for Solver engine custom results.)''
 +
|-
 +
|<code>'''1102'''</code>
 +
|<code>Quadratic_Constraints_Not_Convex</code>
 +
|''The quadratic constraints are non-convex, the SOCP engine cannot solve this problem.''
 +
|}
 +
 
 +
 
 +
When «reportIsFeasible» is passed as <code>True</code>, return a boolean value -- <code>0</code> indicating no feasible solution was found, and <code>1</code> indicating that a feasible solution was found.  Feasible here means that the solution satisfies the given constraints.  When your problem also has an objective to be minimized or maximized, being feasible does not indicate that the global extrema was located.
  
 
In Analytica Optimizer 4.0, it is also possible to utilize add-on engines.  When these are used, additional engine-specific codes may be returned.
 
In Analytica Optimizer 4.0, it is also possible to utilize add-on engines.  When these are used, additional engine-specific codes may be returned.
  
= See Also =
+
==History==
 +
Renamed in [[What's new in Analytica 4.3?|Analytica 4.3]].  Prior to Analytica 4.3, it was called [[LpStatusNum]].
  
* [[LpStatusText]]
+
== See Also ==
* [[LpDefine]], [[QpDefine]], [[NlpDefine]]
+
* [[OptStatusText]]
* [[LpSolution]]
+
* [[DefineOptimization]]
 +
* [[OptSolution]]

Latest revision as of 21:30, 22 January 2016


Requires Analytica Optimizer.

OptStatusNum(opt, reportIsFeasible)

Returns the status of the search for an optimal solution for a linear, quadratic or non-linear program «opt» created using DefineOptimization. Typically this provides an indication of which conditioned caused the termination of the search. The result of OptStatusNum is a numeric value, while OptStatusText returns returns equivalent information in English.

When the optional «reportIsFeasible» parameter is not included, returns status codes according to the following table (you can get the English-language text from OptStatusText:

Status code Status Comment
-3 Optimize_Status_Invalid Invalid status. Can be returned for API_QQ_RESTART_SOLVE.
-2 Optimize_Status_Ignore Ignore status. Used when dummy result code needs to be overridden.
-1 Optimize_Status_Lic_Problem Invalid license status. (License expired, missing, invalid, etc.)
0 Optimize_Status_Optimal Optimal solution has been found.
1 Optimize_Status_Converged The Solver has converged to the current solution.
2 Optimize_Status_No_Remedies "No remedies" status. (All remedies failed to find better point.)
3 Optimize_Status_Iterate_Limit Iterates limit reached. Indicates an early exit of the algorithm.
4 Optimize_Status_Unbounded Optimizing an unbounded objective function.
5 Optimize_Status_Unfeasible Feasible solution could not be found.
6 Optimize_Status_User_Abort Optimization aborted by user. Indicates an early exit of the algorithm.
7 Optimize_Status_Linear_Invalid Invalid linear model. Returned when a linearity assumption renders incorrect.
8 Optimize_Status_Bad_Dataset Bad data set status. Returned when a problem data set renders inconsistent.
9 Optimize_Status_Float_Err Float error status. (Internal float error.)
10 Optimize_Status_Time_Out Time out status. Returned when the maximum allowed time has been exceeded. Indicates an early exit of the algorithm.
11 Optimize_Status_Memory_Dearth Memory dearth status. Returned when the system cannot allocate enough memory to perform the optimization.
12 Optimize_Status_Interpret_Err Interpretation error. (Parser, Diagnostics, or Executor error.)
13 Optimize_Status_Api_Err Fatal API error. (API not responding.)
14 Optimize_Status_Incumb_Cand The Solver has found an integer solution within integer tolerance.
15 Optimize_Status_Bbnode_Limit Branching and bounding node limit reached. Indicates an early exit of the algorithm.
16 Optimize_Status_Bbmips_Limit Branching and bounding maximum number of incumbent points reached. Indicates an early exit of the algorithm.
17 Optimize_Status_Probable Probable global optimum reached. Returned when MSL (Bayesian) global optimality test has been satisfied.
18 Optimize_Status_Bounds_Missing Missing bounds status. Returned for EV/MSL Require Bounds when bounds are missing.
19 Optimize_Status_Bounds_Conflict Bounds conflict status. Indicates <= = > = bounds conflict with existing binary or all different constraints.
20 Optimize_Status_Bounds_Inconsist Bounds inconsistency status. Returned when the lower bound value of a variable is grater than the upper bound value, i.e. lb[i] > ub[i] for some variable bound i.
21 Optimize_Status_Derivative_Err Derivative error. Returned when API_Jacobian has not been able to compute gradients.
22 Optimize_Status_Cone_Overlap Cone overlap status. Returned when a variable appears in more than one cone.
999 Optimize_Status_Exception Exception occurred status. Returned when an exception has been caught by try/catch top-level.
1000 Optimize_Status_Custom_Base Custom base status. (Base for Solver engine custom results.)
1102 Quadratic_Constraints_Not_Convex The quadratic constraints are non-convex, the SOCP engine cannot solve this problem.


When «reportIsFeasible» is passed as True, return a boolean value -- 0 indicating no feasible solution was found, and 1 indicating that a feasible solution was found. Feasible here means that the solution satisfies the given constraints. When your problem also has an objective to be minimized or maximized, being feasible does not indicate that the global extrema was located.

In Analytica Optimizer 4.0, it is also possible to utilize add-on engines. When these are used, additional engine-specific codes may be returned.

History

Renamed in Analytica 4.3. Prior to Analytica 4.3, it was called LpStatusNum.

See Also

Comments


You are not allowed to post comments.