github-actions[bot] on v0.3.4
blegat on gh-pages
build based on dec396a (compare)
odow on odow-patch-1
guilhermebodin on master
Stop abusing the TagBot CI (#10… (compare)
blegat on gh-pages
build based on ecea018 (compare)
guilhermebodin on master
Fix test in julia 1.6 (#106) (compare)
guilhermebodin on fix-julia1.6-ci
Fix test in julia 1.6 (compare)
soc1f: Error During Test at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Test/config.jl:45
Got exception outside of a @test
MethodError: no method matching allocate_variables(::CSDP.Optimizer, ::Int64)
Closest candidates are:
allocate_variables(!Matched::MathOptInterface.Utilities.AbstractModel, ::Any) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/model.jl:653
allocate_variables(!Matched::MathOptInterface.Utilities.MockOptimizer, ::Any) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/mockoptimizer.jl:472
Stacktrace:
[1] copy_free_variables(::CSDP.Optimizer, ::MathOptInterface.Utilities.IndexMap, ::Array{MathOptInterface.VariableIndex,1}, ::typeof(MathOptInterface.Utilities.allocate_variables)) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:272
[2] allocate_load(::CSDP.Optimizer, ::Dualization.DualizableModel{Float64}, ::Bool) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:675
[3] #automatic_copy_to#97 at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/copy.jl:17 [inlined]
[4] #automatic_copy_to at ./none:0 [inlined]
[5] #copy_to#19 at /home/guilhermebodin/.julia/packages/CSDP/LdybZ/src/MOI_wrapper.jl:130 [inlined]
[6] #copy_to at ./none:0 [inlined]
[7] attach_optimizer(::MathOptInterface.Utilities.CachingOptimizer{CSDP.Optimizer,Dualization.DualizableModel{Float64}}) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/cachingoptimizer.jl:138
[8] optimize!(::MathOptInterface.Utilities.CachingOptimizer{CSDP.Optimizer,Dualization.DualizableModel{Float64}}) at /home/guilhermebodin/.julia/packages/MathOptInterface/016Ol/src/Utilities/cachingoptimizer.jl:174
[9] optimize! at /home/guilhermebodin/Documents/Github/Dualization.jl/src/MOI_wrapper.jl:95 [inlined]
conic_config = MOIT.TestConfig(atol = 1e-4, rtol = 1e-4)
conic_cache = MOIU.UniversalFallback(Dualization.DualizableModel{Float64}())
conic_cached = MOIU.CachingOptimizer(conic_cache, conic_optimizer)
conic_bridged = MOIB.full_bridge_optimizer(conic_cached, Float64)
conic_bridged
add_constrained_variable
add_constraint
conic_optimizer = DualOptimizer(CSDP.Optimizer(printlevel = 0))
conic_config = MOIT.TestConfig(atol = 1e-4, rtol = 1e-4)
conic_cache = MOIU.UniversalFallback(Dualization.DualizableModel{Float64}())
conic_cached = MOIU.CachingOptimizer(conic_cache, conic_optimizer)
conic_bridged = MOIB.full_bridge_optimizer(conic_cached, Float64)
@testset "coninc linear, soc, rsoc and sdp test" begin
MOIT.contconictest(conic_bridged, conic_config, ["lin3", # Feasibility problem
"lin4", # Feasibility problem
"normone2", # Feasibility problem
"norminf2", # Feasibility problem
"soc3", # Feasibility problem
"rotatedsoc2", # Feasibility problem
"exp", # Tested in exponential and power cone test
"pow", # Tested in exponential and power cone test
"rootdet", # Not yet implemented
"logdet" # Not yet implemented
])
end
function DualOptimizer{T}(dual_optimizer::OT) where {T, OT <: MOI.ModelLike}
dual_problem = DualProblem{T}(MOIB.full_bridge_optimizer(MOIU.CachingOptimizer(DualizableModel{T}(), dual_optimizer), T))
# discover the type of MOIU.CachingOptimizer(DualizableModel{T}(), dual_optimizer)
OptimizerType = typeof(dual_problem.dual_model)
return DualOptimizer{T, OptimizerType}(dual_problem)
end
Added a bridge inside the DualOptimizer constructor
supports_constraint(optimizer, MOI.VectorOfVariables, MOI.Reals)
Zeros
bridge that bridges F
-in-Zeros
into F
-in-Nonnegatives
and F
-in-Nonpositives
FreeBridge
that you apply before the optimizer in you workaround
dual_problem
in some special way