8.5.2. Result Code¶
8.5.2.1. Result Code in C/C++¶
Result codes, or Error codes.
Result code |
Result status |
Description |
---|---|---|
0 |
MDO_OKAY |
Nothing wrong. |
-1 |
MDO_ERROR |
Unspecified internal error. |
-2 |
MDO_NOMEMORY |
Insufficient memory. |
-10 |
MDO_INVALID_LICENSE |
License is not valid. |
-11 |
MDO_HOME_ENV_NOT_FOUND |
MINDOPT_HOME not exists. |
-12 |
MDO_DLL_ERROR |
Failed to load a dynamic library. |
-1000 |
MDO_IO_ERROR |
(I/O) General IO error. |
-1001 |
MDO_FILE_READ_ERROR |
(I/O) Failed to read data from file. |
-1002 |
MDO_FILE_WRITE_ERROR |
(I/O) Failed to write data to file. |
-1003 |
MDO_DIRECTORY_ERROR |
(I/O) Invalid directory. |
-1100 |
MDO_FORMAT_ERROR |
(I/O) Failed to parse the file. |
-1101 |
MDO_VERSION_ERROR |
(I/O) Failed to load model/parameter from file due to incompatiable version error. |
-1200 |
MDO_REMOTE_INVALID_TOKEN |
(I/O) The input token ID for the remote computing is not valid. |
-1201 |
MDO_REMOTE_CONNECTION_ERROR |
(I/O) Failed to connect to the remote computing server. |
-2000 |
MDO_MODEL_INPUT_ERROR |
Failed to input/load a model. |
-2001 |
MDO_MODEL_EMPTY |
Model is empty. |
-2002 |
MDO_MODEL_INVALID_ROW_IDX |
Row index is not valid. |
-2003 |
MDO_MODEL_INVALID_COL_IDX |
Column index is not valid. |
-2004 |
MDO_MODEL_INVALID_ROW_NAME |
Row name is not valid. |
-2005 |
MDO_MODEL_INVALID_COL_NAME |
Column name is not valid. |
-2006 |
MDO_MODEL_INVALID_SYM_MAT_IDX |
Index of the symmetric matrix is not valid. |
-2007 |
MDO_MODEL_INVALID_SYM_MAT_ROW_IDX |
Row index of a symmetric matrix is not valid. |
-2008 |
MDO_MODEL_INVALID_SYM_MAT_COL_IDX |
Column index of a symmetric matrix is not valid. |
-2010 |
MDO_MODEL_INVALID_STR_ATTR |
A string attribute was not recognized. |
-2011 |
MDO_MODEL_INVALID_INT_ATTR |
An integer attribute was not recognized. |
-2012 |
MDO_MODEL_INVALID_REAL_ATTR |
A real attribute was not recognized. |
-2013 |
MDO_MODEL_INVALID_REAL_ATTR_SYM_MAT |
A real attribute for symmetric matirx was not recognized. |
-2014 |
MDO_MODEL_INVALID_CHAR_ATTR |
A char attribute was not recognized. |
-2019 |
MDO_MODEL_INVALID_ATTR_NAME |
A name for attribute was not recognized. |
-3000 |
MDO_NO_SOLN |
Solution is not available. |
-3001 |
MDO_NO_RAY |
Unbounded ray is not available. |
-3002 |
MDO_NO_STATISTICS |
Solver statistics is not available. |
-3003 |
MDO_INVALID_BASIS_STATUS |
Unrecognized basis status. |
-3004 |
MDO_IIS_NO_SOLN |
No IIS available for the current model. |
-3005 |
MDO_IIS_FEASIBLE |
IIS is not available on a feasible model. |
-4000 |
MDO_PARAM_SET_ERROR |
Failed to change a parameter value. |
-4001 |
MDO_PARAM_GET_ERROR |
Failed to retrieve a parameter value. |
-9000 |
MDO_ABORT_ITERATION_LIMIT |
Iteration limit was reached in optimization. |
-9001 |
MDO_ABORT_TIME_LIMIT |
Time limit was reached in optimization. |
-9002 |
MDO_ABORT_CTRL_C |
Control-C command was captured in optimization. |
-9003 |
MDO_ABORT_NODE_LIMIT |
Node limit was reached in optimization. |
-9004 |
MDO_ABORT_STALLING_NODE_LIMIT |
Stalling node limit was reached in optimization. |
-9011 |
MDO_ABORT_INVALID_METHOD |
Selected optimization method is not supported. |
-9012 |
MDO_ABORT_SOLVER_NOT_AVAILABLE |
Optimization solver is not available for the input model. |
-10000~-19999 |
MDO_SIMPLEX_NUMERIC |
Numerical difficulties in Simplex algorithm. |
-20000~-29999 |
MDO_INTERIOR_NUMERIC |
Numerical difficulties in Interior-point algorithm. |
-30000 |
MDO_IIS_NUMERIC |
Numerical difficulties occurred while computing IIS. |
8.5.2.2. Python¶
The error code of MindOpt Python SDK can be obtained in the following ways:
model = MdoModel() try: # Input and solve the problem. ... model.solve_prob() except MdoError as e: print("Received Mindopt exception.") print(" - Code : {}".format(e.code)) print(" - Reason : {}".format(e.message))