-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
The following code throws an informative error message:
function foo(N, solver)
A, b = Matrix{N}(undef, 0, 1), N[]
backend = Polyhedra.IntervalLibrary{N}()
Q = Polyhedra.polyhedron(Polyhedra.hrep(A, b), backend)
Polyhedra.chebyshevcenter(Q, solver)
end
julia> solver = LazySets.default_lp_solver_polyhedra(eltype(P); presolve=true);
julia> foo(Float64, solver)
ERROR: The polyhedron contains euclidean ball of arbitrary large radius.
For an exact solver, the analogous code throws a different error message:
julia> solver = JuMP.optimizer_with_attributes(() -> GLPK.Optimizer(; method=GLPK.EXACT));
julia> foo(Rational{Int}, solver)
glp_exact: problem has no rows/columns
ERROR: Solver returned `INVALID_MODEL` when computing the H-Chebyshev center. Solver specific status: The problem instance has no rows/columns.
The reason for this difference is that the first example results in the solver status MOI.DUAL_INFEASIBLE
, while the second example results in the solver status INVALID_MODEL
.
Lines 92 to 99 in d38979c
if term ∉ [MOI.OPTIMAL, MOI.LOCALLY_SOLVED] | |
if term == MOI.INFEASIBLE | |
error("An empty polyhedron has no H-Chebyshev center.") | |
elseif term == MOI.DUAL_INFEASIBLE | |
error("The polyhedron contains euclidean ball of arbitrary large radius.") | |
else | |
_unknown_status(model, term, "computing the H-Chebyshev center.") | |
end |
This is really a minor issue, but I thought I should still report it.
Metadata
Metadata
Assignees
Labels
No labels