1 #ifndef LPINTERFACE_ERRORS_H
2 #define LPINTERFACE_ERRORS_H
19 explicit LpException(
const char *msg) : std::runtime_error(msg) {}
21 template <
typename... Args>
23 : std::runtime_error(std::forward<Args>(args)...) {}
50 :
LpException(
"Unsupported constraint type was supplied") {}
58 "Invalid matrix entry; does your row/column contain duplicate "
66 :
LpException(
"Unsupported variable type for this backend") {}
73 :
LpException(
"Variable lower bound should be smaller than upper bound") {}
80 :
LpException(
"Error occured in Gurobi, code " + std::to_string(code)),
84 :
LpException(
"Error occured in Gurobi, code " + std::to_string(code) +
85 " - " + std::string(msg)),
88 int code()
const {
return code_; }
99 std::to_string(code)) {}
106 :
LpException(
"Feature not available for this solver backend") {}
113 :
LpException(
"Failed to set an LP solver parameter") {}
187 inline std::ostream &operator<<(std::ostream &os,
const Status &status) {
188 os << static_cast<int>(status);
195 #endif // LPINTERFACE_ERRORS_H
Equivalent to SoPlex NOT_INIT status.
Attempt to construct a variable with invalid bounds.
Definition: errors.hpp:70
Solutions found exceeded solution limit.
No Linear Program has been loaded.
Model was proven to be unbounded.
Attempt set a parameter that is not supported by the current backend.
Definition: errors.hpp:39
No pricer loaded (SoPlex).
Attempt to use a status code that is not supported.
Definition: errors.hpp:95
Optimization is currently in progress.
Class for wrapping exception occurring in lpinterface. The linear program interface can return errors...
Definition: errors.hpp:17
Model was proven to be infeasible.
Solving process aborted as objective limit has been reached.
Attempt to use a variable type that is not supported by the current backend.
Definition: errors.hpp:63
LP has a usable basis (SoPlex).
Attempt to add a matrix entry containing duplicate indices.
Definition: errors.hpp:54
Solving process aborted due to presence of cycling.
Definition: errors.hpp:122
Solving process aborted due to commence decomposition simplex (SoPlex).
Optimization interrupted by user.
Failed to set a parameter value.
Definition: errors.hpp:110
Attempt to use a feature that is not supported by the current backend.
Definition: errors.hpp:103
Number of iterations exceeded user-specified iteration limit.
User-specified objective limit has been reached.
Model was solved to optimality, solution available.
Solving process aborted to exit decomposition simplex (SoPlex).
Could not satisfy tolerances; sub-optimal solution is available.
No ratiotester loaded (SoPlex).
Internal error occured in SoPlex.
Definition: errors.hpp:117
Definition: errors.hpp:47
Model was proven to be either infeasible or unbounded.
Linear program loaded, but no solution information available.
Optimizer ran into unrecoverable numerical difficulties.
Attempt to access solution of an unsolved model.
Definition: errors.hpp:33
Status
Enum class representing LP solution status.
Definition: errors.hpp:129
Internal error occured in Gurobi.
Definition: errors.hpp:77
Attempt to use a feature that is not yet implemented.
Definition: errors.hpp:27
Problem solved to optimality, but unscaled solution contains violations.