OptStatusText

Revision as of 20:30, 21 June 2007 by Lchrisman (talk | contribs)


LpStatusText(lp)

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 LpStatusText 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 LpStatusNum function provides a numeric code corresponding to the status, while LpStatusText 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 LpStatusNum 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 LpStatusText 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, LpStatusText will generally return "unknown Frontline solver status code", but LpStatusNum will vary.

See Also

Comments


You are not allowed to post comments.