From b9befe810f6611e4044f98031f1c12bfd2f90604 Mon Sep 17 00:00:00 2001 From: joaquimgarcia Date: Sat, 16 Sep 2017 18:02:28 -0300 Subject: [PATCH 1/2] fix ray in contlin8 --- test/contlinear.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/contlinear.jl b/test/contlinear.jl index 5e7859213e..cea89bacca 100644 --- a/test/contlinear.jl +++ b/test/contlinear.jl @@ -791,10 +791,15 @@ function linear8test(solver::MOI.AbstractSolver; atol=Base.rtoldefault(Float64), @test MOI.getattribute(m, MOI.TerminationStatus()) == MOI.Success @test MOI.getattribute(m, MOI.DualStatus()) == MOI.InfeasibilityCertificate @test MOI.cangetattribute(m, MOI.ConstraintDual(), c) - @test MOI.getattribute(m, MOI.ConstraintDual(), c) ≈ -1 atol=atol rtol=rtol + cd = MOI.getattribute(m, MOI.ConstraintDual(), c) + @test cd < -atol # TODO: farkas dual on bounds - # @test MOI.getattribute(m, MOI.ConstraintDual(), x) ≈ ? atol=atol rtol=rtol - # @test MOI.getattribute(m, MOI.ConstraintDual(), y) ≈ ? atol=atol rtol=rtol + # xd = MOI.getattribute(m, MOI.ConstraintDual(), bndx) + # yd = MOI.getattribute(m, MOI.ConstraintDual(), bndy) + # @test xd > atol + # @test yd > atol + # @test yd ≈ -cd atol=atol rtol=rtol + # @test xd ≈ -2cd atol=atol rtol=rtol else # solver returned nothing @test MOI.getattribute(m, MOI.ResultCount()) == 0 From a8f9a3a37f859a52dbaadc5f1d32b7690566417c Mon Sep 17 00:00:00 2001 From: Joaquim Dias Garcia Date: Sat, 16 Sep 2017 18:35:08 -0300 Subject: [PATCH 2/2] Update contlinear.jl --- test/contlinear.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/contlinear.jl b/test/contlinear.jl index cea89bacca..18bd242793 100644 --- a/test/contlinear.jl +++ b/test/contlinear.jl @@ -793,7 +793,7 @@ function linear8test(solver::MOI.AbstractSolver; atol=Base.rtoldefault(Float64), @test MOI.cangetattribute(m, MOI.ConstraintDual(), c) cd = MOI.getattribute(m, MOI.ConstraintDual(), c) @test cd < -atol - # TODO: farkas dual on bounds + # TODO: farkas dual on bounds - see #127 # xd = MOI.getattribute(m, MOI.ConstraintDual(), bndx) # yd = MOI.getattribute(m, MOI.ConstraintDual(), bndy) # @test xd > atol