When you attempt to solve an optimization problem, either linear, quadratic, non-linear, or mixed-integer varieties of these, it is important to check the status that results. Calling OptStatusText ensures that the optimization search has taken place, and returns an English-language description of the status, usually indicating the condition that led to the termination of the search. The «opt» is an optimization problem specification returned by a call to DefineOptimization.
The OptStatusNum function provides a numeric code corresponding to the status, while OptStatusText returns an English-language description. Be aware that the set of codes has changed in Analytica 4.0 from the set of possible codes returned in Analytica 3.1, as a result of an upgrade to Frontline System's newer and restructured solver library.
The following table needs to be cleaned up here, but provides a listing of the possible text that can be returned from LpStatusText. See also OptStatusNum for the numeric values. This should be re-organized here into a two column table, with LpStatusNum in the first column (as an integer) and OptStatusText in the second.
case Optimize_Status_Invalid: return "Invalid status"; case Optimize_Status_Ignore: return "Ignore status. Used when dummy result code needs to be overridden."; case Optimize_Status_Lic_Problem: return "Invalid license status. (License expired, missing, invalid, etc.)"; case Optimize_Status_Optimal: return "Optimal solution has been found."; case Optimize_Status_Converged: return "The Solver has converged to the current solution."; case Optimize_Status_No_Remedies: return "No remedies: All remedies failed to find better point."; case Optimize_Status_Iterate_Limit: return "Iterates limit reached. Indicates an early exit of the algorithm."; case Optimize_Status_Unbounded: return "Optimizing an unbounded objective function."; case Optimize_Status_Unfeasible: return "Feasible solution could not be found."; case Optimize_Status_User_Abort: return "Optimization aborted by user."; case Optimize_Status_Linear_Invalid:return "Invalid linear model. Returned when a linearity assumption renders incorrect."; case Optimize_Status_Bad_Dataset: return "Bad data set status. Returned when a problem data set renders inconsistent."; case Optimize_Status_Float_Err: return "Float error status. (Internal float error.)"; case Optimize_Status_Time_Out: return "Time out status. Returned when the maximum allowed time has been exceeded. Indicates an early exit of the algorithm."; case Optimize_Status_Memory_Dearth: return "Memory dearth status. Returned when the system cannot allocate enough memory to perform the optimization."; case Optimize_Status_Interpret_Err: return "Interpretation error. (Parser, Diagnostics, or Executor error.)"; case Optimize_Status_Api_Err: return "Fatal API error. (API not responding.)"; case Optimize_Status_Incumb_Cand: return "The Solver has found an integer solution within integer tolerance."; case Optimize_Status_Bbnode_Limit: return "Branching and bounding node limit reached."; case Optimize_Status_Bbmips_Limit: return "Branching and bounding maximum number of incumbent points reached."; case Optimize_Status_Probable: return "Probable global optimum reached. Returned when MSL (Bayesian) global optimality test has been satisfied."; case Optimize_Status_Bounds_Missing:return "Missing bounds status. Returned for EV/MSL Require Bounds when bounds are missing."; case Optimize_Status_Bounds_Conflict: return "Bounds conflict status. Indicates = >= bounds conflict with existing binary or alldifferent constraints."; case Optimize_Status_Bounds_Inconsist: return "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."; case Optimize_Status_Derivative_Err:return "Derivative error. Returned when API_Jacobian has not been able to compute gradients."; case Optimize_Status_Cone_Overlap: return "Cone overlap status. Returned when a variable appears in more than one cone."; case Optimize_Status_Exception: return "Exception occurred status. Returned when an exception has been caught by try/catch top-level. Optimize_Status_Custom_Base 1000 Custom base status. (Base for Solver Engine custom results.)"; case 1101: return "No problem information is available"; // custom SOCP error code, should never occur in the SDK, but could occur in Excel version case 1102: return "The quadratic constraints are non-convex. The SOCP engine cannot solve this problem."; default: return "unknown Frontline solver status code";
Custom or add-on solver engines may return additional status codes not listed here. In these cases, OptStatusText will generally return "unknown Frontline solver status code", but OptStatusNum will vary.
Add-on solver engines may issue OptStatusNum codes greater than or equal to 1000. These are not unique, with the error message depending on the particular solver engine.
Add-on solver engines may issue "Invalid license status. (License expired, missing, invalid, etc.)" status also when the add-on solver engine DLL installed is not compatible with the Analytica release. You should install Version 10 of the add-on solver engine for Analytica 4.3 and Version 11 for Analytica 4.4.