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.


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

See Also


You are not allowed to post comments.