diff --git a/test/runtests.jl b/test/runtests.jl index 1aeb744..5793346 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,5 @@ using Clp +include("ticket82.jl") + include("mathprog.jl") diff --git a/test/ticket82.jl b/test/ticket82.jl new file mode 100644 index 0000000..6e9859e --- /dev/null +++ b/test/ticket82.jl @@ -0,0 +1,10 @@ +# See https://projects.coin-or.org/Clp/ticket/82 +using Clp, Base.Test + +m = MathProgBase.LinearQuadraticModel(ClpSolver()) +MathProgBase.loadproblem!(m, "ticket82.mps") +MathProgBase.optimize!(m) +@test MathProgBase.status(m) == :Unbounded +expunbray = [0,-1] +unbray = MathProgBase.getunboundedray(m) +@test !isempty(unbray) && norm(unbray - expunbray) < 1e-6 diff --git a/test/ticket82.mps b/test/ticket82.mps new file mode 100644 index 0000000..fc7f57b --- /dev/null +++ b/test/ticket82.mps @@ -0,0 +1,11 @@ +NAME +ROWS + N OBJ +COLUMNS + C0 OBJ 1 + C1 OBJ 1 +RHS +BOUNDS + LO BND1 C0 0 + FR BND1 C1 +ENDATA