You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the general ValueError with a custom error, when infeasible point is found.
Motivation
We are calling the get_polytope_samples() function and would like to catch the error caused by infeasibility. Currently, infeasible case would raise a ValueError, see the code snippet below from find_interior_point()
if result.status == 2:
raise ValueError(
"No feasible point found. Constraint polytope appears empty. "
+ "Check your constraints."
)
elif result.status > 0:
raise ValueError(
"Problem checking constraint specification. "
+ f"linprog status: {result.message}"
)
To differentiate ValueErrors arising from various causes, it would be beneficial to assign a specific custom error, such as InfeasibleProblemError, for scenarios where no feasible point is found.
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
Replace the general
ValueError
with a custom error, when infeasible point is found.Motivation
We are calling the
get_polytope_samples()
function and would like to catch the error caused by infeasibility. Currently, infeasible case would raise aValueError
, see the code snippet below fromfind_interior_point()
To differentiate
ValueErrors
arising from various causes, it would be beneficial to assign a specific custom error, such asInfeasibleProblemError
, for scenarios where no feasible point is found.The text was updated successfully, but these errors were encountered: